Strange parser bug with MySQL-4.0.4
Strange parser bug with MySQL-4.0.4
am 24.09.2002 14:17:34 von Jocelyn Fournier
Hi,
I tried by mistake to execute a malformed SQL query, and it results in the
following strange result :
How-to-repeat :
CREATE TABLE forum (
no int(11) NOT NULL auto_increment,
exp varchar(50) default NULL,
la_date datetime default NULL,
sujet varchar(250) default NULL,
message text,
ref int(11) NOT NULL default '0',
last_modif datetime default NULL,
admin varchar(10) default NULL,
PRIMARY KEY (no)
) TYPE=MyISAM;
INSERT INTO forum VALUES (41, 'KARINE', '2002-09-23 15:55:22', 'ACOUSTIQUE
avec un C... ds 'je passe tous les jours sur le forum!!! Il faut le faire
vivre!!!!!!! lol\r
\n\r
\nToussssss au concert!!!!!!!!!!!
Ou!!!!\r
\n\r
\nB\'zoussssss a toussssss!!!!', 38, NULL, '');
ERROR 2005: Unknown MySQL Server Host '/>\n\r
Any idea of what happened ?
Regards,
Jocelyn
------------------------------------------------------------ ---------
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-thread12579@lists.mysql.com
To unsubscribe, e-mail
Re: Strange parser bug with MySQL-4.0.4
am 24.09.2002 15:15:05 von Roger Baklund
* Jocelyn Fournier
> I tried by mistake to execute a malformed SQL query, and it results in the
> following strange result :
>
> How-to-repeat :
>
> CREATE TABLE forum (
> no int(11) NOT NULL auto_increment,
> exp varchar(50) default NULL,
> la_date datetime default NULL,
> sujet varchar(250) default NULL,
> message text,
> ref int(11) NOT NULL default '0',
> last_modif datetime default NULL,
> admin varchar(10) default NULL,
> PRIMARY KEY (no)
> ) TYPE=MyISAM;
>
>
> INSERT INTO forum VALUES (41, 'KARINE', '2002-09-23 15:55:22', 'ACOUSTIQUE
> avec un C... ds 'je passe tous les jours sur le forum!!! Il faut le faire
> vivre!!!!!!! lol\r
\n\r
\nToussssss au concert!!!!!!!!!!!
> Ou!!!!\r
\n\r
\nB\'zoussssss a toussssss!!!!', 38, NULL, '');
> ERROR 2005: Unknown MySQL Server Host '/>\n\r
>
> Any idea of what happened ?
The input for the 'sujet' field is terminated by the first occurence of the
apostrophe, after "C... ds '". The next occurence of "\r" is interpreted as
the connect command:
mysql> \?
MySQL commands:
Note that all text commands must be first on line and end with ';'
help (\h) Display this help.
? (\?) Synonym for `help'.
clear (\c) Clear command.
connect (\r) Reconnect to the server. Optional arguments are db and host.
mysql> whatever rubbish \r somedb somehost more rubbish
ERROR 2005: Unknown MySQL Server Host 'somehost' (2)
mysql> whatever rubbish \r test localhost more rubbish
Connection id: 39
Current database: test
--
Roger
------------------------------------------------------------ ---------
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-thread12581@lists.mysql.com
To unsubscribe, e-mail
Strange parser bug with MySQL-4.0.4
am 24.09.2002 20:48:30 von Michael Widenius
Hi!
>>>>> "Jocelyn" == Jocelyn Fournier writes:
Jocelyn> Hi,
Jocelyn> I tried by mistake to execute a malformed SQL query, and it results in the
Jocelyn> following strange result :
Jocelyn> How-to-repeat :
Jocelyn> CREATE TABLE forum (
Jocelyn> no int(11) NOT NULL auto_increment,
Jocelyn> exp varchar(50) default NULL,
Jocelyn> la_date datetime default NULL,
Jocelyn> sujet varchar(250) default NULL,
Jocelyn> message text,
Jocelyn> ref int(11) NOT NULL default '0',
Jocelyn> last_modif datetime default NULL,
Jocelyn> admin varchar(10) default NULL,
Jocelyn> PRIMARY KEY (no)
Jocelyn> ) TYPE=MyISAM;
Jocelyn> INSERT INTO forum VALUES (41, 'KARINE', '2002-09-23 15:55:22', 'ACOUSTIQUE
Jocelyn> avec un C... ds 'je passe tous les jours sur le forum!!! Il faut le faire
Jocelyn> vivre!!!!!!! lol\r
\n\r
\nToussssss au concert!!!!!!!!!!!
Jocelyn> Ou!!!!\r
\n\r
\nB\'zoussssss a toussssss!!!!', 38, NULL, '');
Jocelyn> ERROR 2005: Unknown MySQL Server Host '/>\n\r
Jocelyn> Any idea of what happened ?
Yes; The MySQL client thinks that \r is a command (as it's outside
the quotes) and tries to connect you to a server name following the \r
command.
Regards,
Monty
------------------------------------------------------------ ---------
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-thread12582@lists.mysql.com
To unsubscribe, e-mail