[ opensips-Bugs-2689928 ] In DB Scheme docs, LCR table, priority should be int

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[ opensips-Bugs-2689928 ] In DB Scheme docs, LCR table, priority should be int

SourceForge.net
Bugs item #2689928, was opened at 2009-03-17 13:16
Message generated for change (Comment added) made by bogdan_iancu
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=1086410&aid=2689928&group_id=232389

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
>Category: tools
>Group: trunk
>Status: Closed
>Resolution: Fixed
Priority: 5
Private: No
Submitted By: Alex Massover (cupotka2008)
Assigned to: Bogdan-Andrei Iancu (bogdan_iancu)
Summary: In DB Scheme docs, LCR table, priority should be int

Initial Comment:
Hi!

In DB Scheme docs, LCR table, priority column should be 'int' and not 'char'.

----------------------------------------------------------------------

>Comment By: Bogdan-Andrei Iancu (bogdan_iancu)
Date: 2009-03-19 11:41

Message:
To avoid any issues with less standard data-types, I already changed th
column type to int.

Thanks and regards,
Bogdan

----------------------------------------------------------------------

Comment By: Alex Massover (cupotka2008)
Date: 2009-03-18 12:53

Message:
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.



----------------------------------------------------------------------

Comment By: Bogdan-Andrei Iancu (bogdan_iancu)
Date: 2009-03-18 12:37

Message:
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?

----------------------------------------------------------------------

Comment By: Alex Massover (cupotka2008)
Date: 2009-03-18 12:06

Message:
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.

----------------------------------------------------------------------

Comment By: Bogdan-Andrei Iancu (bogdan_iancu)
Date: 2009-03-18 11:40

Message:
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

----------------------------------------------------------------------

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=1086410&aid=2689928&group_id=232389

_______________________________________________
Devel mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/devel