List:General Discussion« Previous MessageNext Message »
From:Michael Widenius Date:October 7 1999 1:19pm
Subject:bug report: ENCODE/DECODE syntax errors
View as plain text  
>>>>> "Martin" == Martin Ramsch <m.ramsch@stripped> writes:

Martin> Bug report
Martin> ==========


>> Description:

Martin> The function ENCODE() and DECODE() have syntax errors,
Martin> if both patameters are table fields, or
Martin> if at least one parameter is a function call.

Martin> SELECT DECODE( encdbpwd, DECODE(encusrpwd, 'dbpw') ) FROM logins;
Martin> ==>
Martin> ERROR 1064: You have an error in your SQL syntax near 'DECODE(encusrpwd,
> 'dbpw') ) FROM logins' at line 1

<cut>

As the setup for decode is very slow, we decided to only allow an
constant string for the second argument of DECODE to only have to do
the setup once.

I will document this more clearly.

Martin> Only work-around seems to be to calculate the string parameters in
Martin> advance and use ENCODE/DECODE with these string constants as
Martin> parameters only.

Regards,
Monty
Thread
bug report: ENCODE/DECODE syntax errorsMartin Ramsch7 Oct
  • bug report: ENCODE/DECODE syntax errorsMichael Widenius7 Oct