Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install SQL Procedures to your radius database (Syntax error when trying to load the procedure to MariaDB ) #2

Open
kraman2681 opened this issue Nov 15, 2024 · 1 comment

Comments

@kraman2681
Copy link

Hi Joze,

thanks very much for your API documentation, was trying to test this, on steps-3 when trying to install this procedure on MYSQL which is Maria-DB, I see there is syntax error, I am not a DB expert, hence struggling on how to find and fix the syntax, is this something you can help

I tried to load your NAS procedure-nasAdd.sql which is below,

USE radius;

DELIMITER $$
USE radius$$

CREATE PROCEDURE nasAdd (
IN _nasname VARCHAR(128),
IN _shortname VARCHAR(32),
IN _type VARCHAR(30),
IN _secret VARCHAR(60),
IN _description VARCHAR(200)
)
BEGIN
INSERT INTO nas (nasname, shortname, type, secret, description)
VALUES (_nasname, _shortname, _type, _secret, _description);

when I try to create a a stored procedure using mySql work bench and try to just paste your details, I get syntax error as shown below or attached

please can you help,
I have same issue even when I load the user add or edit SQL as well

Thanks
Kiran
Screen Shot 2024-11-15 at 12 42 11 PM

@kraman2681 kraman2681 changed the title Install SQL Procedures to your radius database (Synax error when trying to load the procedure to MariaDB ) Install SQL Procedures to your radius database (Syntax error when trying to load the procedure to MariaDB ) Nov 15, 2024
@kraman2681
Copy link
Author

The error is specifically for NAS
at line number 10

root@admin:/opt/radius-api/extra/database# cat -n procedure-nasAdd.sql
1 USE radius;
2
3 DELIMITER $$
4 USE radius$$
5
6 CREATE PROCEDURE nasAdd (
7 IN _nasname VARCHAR(128),
8 IN _shortname VARCHAR(32),
9 IN _type VARCHAR(30),
10 IN _secret VARCHAR(60), <<<<<<<
11 IN _description VARCHAR(200)
12 )
13 BEGIN
14 INSERT INTO nas (nasname, shortname, type, secret, description)
15 VALUES (_nasname, _shortname, _type, _secret, _description);
16 ENDroot@admin:/opt/radius-api/extra/database#

attached is error seen when I execute that SQL procedure.
Screen Shot 2024-11-15 at 12 52 48 PM

Thanks
Kiran

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant