I'm afraid that it makes troubles. I found this because it didn't worked for me with MSSQL via ODBC. char(4) was translated to 4 digits number and every lcr_reload priority was changing. I changed it to tinyint and everything became OK and lcr_dump gives me correct rules.
I think it just typo in DOCs. In MySQL installation scripts the data type is int.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
But in both docs (http://www.opensips.org/html/docs/db/db-schema-devel.html#GEN-DB-LCR) and db schema, the priority is defined as "unsigned char" (with no size).
So, for MSSQL, this "unsigned char" is translated to a 4 digits number (xxxx) ? if so, what is the problem? do you have priorities larger then 4 digits, or the db_unixodbc is not properly loading the value?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
In /scripts/mysql/lcr-create.sql in 1.4.4:
priority TINYINT UNSIGNED NOT NULL
oracle script:
priority NUMBER(5)
postgres script:
priority SMALLINT NOT NULL
Only the doc says that it's char.
Yes it's translated to 4 digits number (xxxx).
The problem with ODBC and MSSQL is that this 4 digits number (xxxx) is every time different for every lcr_reload. This translation is somehow not unique. And I have in DB only number from 1 to 16 in priority column.
Changing it to tinyint fixing the problem.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
But this is ok, as char is an integer data type and it is translated correctly :
for mysql -> TINYINT
for postgres -> SMALLINT
for oracle -> NUMBER
I guess this is ok, right ?
Regards,
Bogdan
I'm afraid that it makes troubles. I found this because it didn't worked for me with MSSQL via ODBC. char(4) was translated to 4 digits number and every lcr_reload priority was changing. I changed it to tinyint and everything became OK and lcr_dump gives me correct rules.
I think it just typo in DOCs. In MySQL installation scripts the data type is int.
But in both docs (http://www.opensips.org/html/docs/db/db-schema-devel.html#GEN-DB-LCR) and db schema, the priority is defined as "unsigned char" (with no size).
So, for MSSQL, this "unsigned char" is translated to a 4 digits number (xxxx) ? if so, what is the problem? do you have priorities larger then 4 digits, or the db_unixodbc is not properly loading the value?
In /scripts/mysql/lcr-create.sql in 1.4.4:
priority TINYINT UNSIGNED NOT NULL
oracle script:
priority NUMBER(5)
postgres script:
priority SMALLINT NOT NULL
Only the doc says that it's char.
Yes it's translated to 4 digits number (xxxx).
The problem with ODBC and MSSQL is that this 4 digits number (xxxx) is every time different for every lcr_reload. This translation is somehow not unique. And I have in DB only number from 1 to 16 in priority column.
Changing it to tinyint fixing the problem.
To avoid any issues with less standard data-types, I already changed th column type to int.
Thanks and regards,
Bogdan