Fw: Is it bug (replace with empty name) - MySQL 4.0.4 ?

Fw: Is it bug (replace with empty name) - MySQL 4.0.4 ?

am 12.11.2002 08:07:44 von Irek

I think, tahnt MySQL 4.0.4 have bug:

How-To-Repeat:

ALTER TABLE `dskat002` RENAME ``

Is a bug to reneme table to table with empty name ? Is it ?


Regards
IKS
ICQ: 67420570

------------------------------------------------------------ ---------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)

To request this thread, e-mail bugs-thread12961@lists.mysql.com
To unsubscribe, e-mail

Re: Fw: Is it bug (replace with empty name) - MySQL 4.0.4 ?

am 12.11.2002 16:03:40 von Sinisa Milivojevic

Irek writes:
> I think, tahnt MySQL 4.0.4 have bug:
>
> How-To-Repeat:
>
> ALTER TABLE `dskat002` RENAME ``
>
> Is a bug to reneme table to table with empty name ? Is it ?
>
>
> Regards
> IKS
> ICQ: 67420570
>

Hi!

Thank you for your bug report.

This patch fixes it:


===== sql/sql_parse.cc 1.274 vs edited =====
*** /tmp/sql_parse.cc-1.274-27176 Mon Nov 11 15:57:33 2002
--- edited/sql/sql_parse.cc Tue Nov 12 16:57:47 2002
***************
*** 1629,1635 ****
#else
{
ulong priv=0;
! if (lex->name && strlen(lex->name) > NAME_LEN)
{
net_printf(&thd->net,ER_WRONG_TABLE_NAME,lex->name);
res=0;
--- 1629,1635 ----
#else
{
ulong priv=0;
! if (lex->name && (!lex->name[0] || strlen(lex->name) > NAME_LEN))
{
net_printf(&thd->net,ER_WRONG_TABLE_NAME,lex->name);
res=0;

--
Regards,
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Mr. Sinisa Milivojevic
/ /|_/ / // /\ \/ /_/ / /__ MySQL AB, Fulltime Developer
/_/ /_/\_, /___/\___\_\___/ Larnaca, Cyprus
<___/ www.mysql.com


------------------------------------------------------------ ---------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)

To request this thread, e-mail bugs-thread12969@lists.mysql.com
To unsubscribe, e-mail