[Serusers] Bug-report: ser_mysql.sh, Error 1054
Bernie Hoeneisen
bhoeneis at switch.ch
Mon Apr 26 09:01:24 CEST 2004
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
More information about the sr-users
mailing list