Bug #4613 Views: Crash caused by any statement run after Bug#4612

Submitted: 19 Jul 2004 2:25 Modified: 20 Jul 2004 17:52
Reporter: Trudy Pelzer Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server Severity:S2 (Serious)
Version:5.0.1-alpha-debug OS:Linux (SuSE 8.2)
Assigned to: Oleksandr Byelkin CPU Architecture:Any

[19 Jul 2004 2:25] Trudy Pelzer
Description:
Description:
This bug is related to Bug #4612.

If one creates a view (e.g. ab) based on a single underlying table that has a delimited name (e.g. `a``b`), the result of a SELECT from the view is this error:
ERROR 1064 (42000): You have an error in your SQL syntax; ...

Any subsequent statement causes a crash:
Packets out of order (Found: 2, expected 1)
ERROR 2013 (HY000): Lost connection to MySQL server during query

How to repeat:
create table `a``b` (col1 char(2));
create view ab as select * from `a``b`;
select * from ab;
describe ab;
Packets out of order (Found: 2, expected 1)
ERROR 2013 (HY000): Lost connection to MySQL server during query
[19 Jul 2004 19:29] Aleksey Kishkin
mysql> create table `a``b` (col1 char(2));
Query OK, 0 rows affected (0.01 sec)

mysql> create view ab as select * from `a``b`;
Query OK, 0 rows affected (0.00 sec)

mysql> select * from ab;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'col1` from test.a`b' at line 1
mysql> describe ab;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'col1` from test.a`b' at line 1
mysql>
[20 Jul 2004 9:55] Oleksandr Byelkin
even if it do not crash server, it is still bug, because '`' should be doubled in quoted 
names: 
 
/home/bell/mysql/bk/work-5.0/client/.libs/mysqltest: At line 3: query 'select * from ab' 
failed: 1064: You have an error in your SQL syntax; check the manual that corresponds to 
your MySQL server version for the right syntax to use near '.`col1` AS `col1` from 
`test`.`a`b`' at line 1
[20 Jul 2004 17:52] Oleksandr Byelkin
oops I missunderstood meaning of bugreport (I thought about #4612)
[21 Jul 2004 0:38] Trudy Pelzer
This bug can be closed. Your fix for related Bug#4612 has corrected this one also.

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.058 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.