On 20-04 19:51, Bernie Hoeneisen wrote:
In the current CVS unstable version there seams to be a bug in the ser_mysql.sh:
I have tried to upgrade from my stable 0.8.12 to the CVS unstable and found the following issues:
bhoeneis@wil:~/ser/sip_router$ scripts/ser_mysql.sh reinstall MySql password for root: creating backup database dumping table content (ser) dropping table (ser) creating new structures creating database ser ... restoring table content ERROR 1054 at line 42: Unknown column 'usernamename' in 'field list' reinstall: restoring table failed
I solved this by commenting out the following line in ser_mysql.sh # sed "s/[uU][sS][eE][rR]/$USERCOL/g" |
I slightly modified the regular expression to exclude username from matching:
sed "s/[uU][sS][eE][rR]($|[^a-zA-Z])/$USERCOL\1/g"
this should prevent expansion of username to usernamename
But then thow following error came as next after running the "fixed" ser_mysql.sh:
ERROR 1054 at line 108: Unknown column 'perms' in 'field list'
This one I circumvented by inserting a line, which does replace all the strings perms by rpid as follows:
sed "s/[uU][sS][eE][rR]_[iI][dD]/user/g" $tmp_file | # sed "s/[uU][sS][eE][rR]/$USERCOL/g" | sed "s/[pP][eE][rR][mM][sS]/rpid/g" | sed "s/[rR][eE][aA][lL][mM]/domain/g"> ${tmp_file}.2
I am not sure I understand this, column perms has been in the table for ages and we did not change it, rpid is a completely separate column, could you elaborate on this ?
After running it again I executed the following in the mysql client: update subscriber set rpid="NULL" where rpid !="NULL"
This erases all rpid entries, it that what you really wanted ?
I hope someone can fix this once... and that my fix really helps...;-)
The first one is fixed, I need a bit more clarification of the remaining two items. Thanks for the feedback !
thanks, Jan.