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" |
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
After running it again I executed the following in the mysql client: update subscriber set rpid="NULL" where rpid !="NULL"
I hope someone can fix this once... and that my fix really helps...;-)
cheers, Bernie
PS: Here the diff for a quick and dirty fix:
bhoeneis@wil:~/ser/sip_router$ cvs diff -u scripts/ser_mysql.sh Index: scripts/ser_mysql.sh =================================================================== RCS file: /cvsroot/ser/sip_router/scripts/ser_mysql.sh,v retrieving revision 1.52 diff -u -r1.52 ser_mysql.sh --- scripts/ser_mysql.sh 13 Apr 2004 19:14:32 -0000 1.52 +++ scripts/ser_mysql.sh 20 Apr 2004 17:39:49 -0000 @@ -697,7 +697,8 @@ exit 1 fi sed "s/[uU][sS][eE][rR]_[iI][dD]/user/g" $tmp_file | - sed "s/[uU][sS][eE][rR]/$USERCOL/g" | + # 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 #3 drop original database echo "dropping table ($DBNAME)"
Thanks for the report, we will fix it.
Jan.
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" |
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
After running it again I executed the following in the mysql client: update subscriber set rpid="NULL" where rpid !="NULL"
I hope someone can fix this once... and that my fix really helps...;-)
cheers, Bernie
PS: Here the diff for a quick and dirty fix:
bhoeneis@wil:~/ser/sip_router$ cvs diff -u scripts/ser_mysql.sh Index: scripts/ser_mysql.sh =================================================================== RCS file: /cvsroot/ser/sip_router/scripts/ser_mysql.sh,v retrieving revision 1.52 diff -u -r1.52 ser_mysql.sh --- scripts/ser_mysql.sh 13 Apr 2004 19:14:32 -0000 1.52 +++ scripts/ser_mysql.sh 20 Apr 2004 17:39:49 -0000 @@ -697,7 +697,8 @@ exit 1 fi sed "s/[uU][sS][eE][rR]_[iI][dD]/user/g" $tmp_file |
sed "s/[uU][sS][eE][rR]/$USERCOL/g" |
# 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 #3 drop original database echo "dropping table ($DBNAME)"
Serusers mailing list serusers@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers
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.
On 25-04 21:32, Jan Janak wrote:
On 20-04 19:51, Bernie Hoeneisen wrote:
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 !
I'll reply to myself: perms column has been dropped by the serweb author because it is not needed anymore, I'll fix that as well.
Jan.
Hi Jan!
On Sun, 25 Apr 2004, Jan Janak wrote:
On 20-04 19:51, Bernie Hoeneisen wrote:
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 !
As you have already answered yourself, the perms column disappeared.
I just made the expression for the replacement easier by replacing just the column _names_. As the rpid column has been added in the meantime, I "misused" it for this. For the case the perms column contained some values before, I "initialized" every rpid column to NULL afterwards. As I mentioned, it was a hack, which might not work everywhere...;-)
Hope that clarifies...
cheers, Bernie