Bug #18898 SELECT * problem

Submitted: 7 Apr 2006 20:07 Modified: 8 Apr 2006 1:02
Reporter: Sebastien Caisse Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server Severity:S2 (Serious)
Version:5.0.19 OS:Windows (WindowsXP sp2)
Assigned to: MySQL Verification Team CPU Architecture:Any

[7 Apr 2006 20:07] Sebastien Caisse
Description:
Depending on the query and the syntax (and possibly reserved words) a SELECT * can fail entirely.

Tests in the "how to repeat" were run in WinXP sp2 w/ Query Browser 1.1.20.

Given I send my request through ODBC I have little control over how the final SQL is and sometimes my queries fail because of "missformating" - even in DELETE statements!

Sorry, in a hurry had no time to investigate further.

How to repeat:
Step 1:
CREATE TABLE `events` (
  `Equipment` int(10) NOT NULL default '0',
  `EventType` tinyint(3) unsigned NOT NULL default '0',
  `Change` datetime NOT NULL default '0000-00-00 00:00:00',
  PRIMARY KEY  (`Equipment`,`EventType`,`Change`));

Step 2:
SELECT * FROM `events` e;
(works)

Step 3:
SELECT *
FROM `events` e;
(fails)

Step 4:
SELECT * 
FROM `events` e;
(works: space added after *)

Step 5:
SELECT (* )
FROM `events` e;
(fails)
[8 Apr 2006 1:02] MySQL Verification Team
Thank you for the bug report. 

The SQL syntax error for the Step 3 it is a bug already reported for
Query Browser, not the server. Please test with the mysql.exe
client tool:

Step 3:
SELECT *
FROM `events` e;
(fails)

and

Step 5:
SELECT (* )
FROM `events` e;
(fails)

the server gives you the correct error message:

mysql> SELECT (* )
    -> FROM `events` e;
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 '* ) FROM `events` e' at line 1

So this bug is a duplicate having the category defined for Query Browser
and not a bug for Category Server.

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

Page generated in 0.051 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.