My favorites | Sign in
Project Home Issues Source
New issue   Search
for
  Advanced search   Search tips   Subscriptions
Issue 2867: Query has wrong syntax, generated in Data editor
1 person starred this issue and may be notified of changes. Back to list
Status:  Fixed
Owner:  ----
Closed:  Jun 2012


Sign in to add a comment
 
Reported by vojta.kr...@gmail.com, Jun 12, 2012
when updating cells:
UPDATE `external_address_mapping` SET `datascope`=0 WHERE  `ip_address_type`='Ipv6' AND `ip_address_value`='1:2:3:4' AND `datascope`= LIMIT 1;
/* SQL Error (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 'LIMIT 1' at line 1 */


and same thing with DELETE 
DELETE FROM `external_address_mapping` WHERE  `ip_address_type`='Ipv6' AND `ip_address_value`='1:2:3:4' AND `datascope`= LIMIT 1;



CREATE TABLE `external_address_mapping` (
  `ip_address_type` VARCHAR(255) BINARY NOT NULL,
  `ip_address_value` VARCHAR(255) BINARY NOT NULL,
  `gateway_id` VARCHAR(255) BINARY NOT NULL,
  `access_method` VARCHAR(255) BINARY NULL,
  `priority` DECIMAL(38, 0) NOT NULL,
  `datascope` DECIMAL(38, 0) NOT NULL
  ,PRIMARY KEY `external_address_mapping_pk`(`ip_address_type`, `ip_address_value`, `datascope`)
);

this makes this SW unusable for me.
version 7.0.0.4156
Jun 12, 2012
#1 vojta.kr...@gmail.com
btw datascope in the edited line was empty,  not (NULL)
Jun 12, 2012
Project Member #2 a...@anse.de
That "datascope" column is DECIMAL, and you managed to send an empty value into it, not a "0"? What did you do exactly in that grid cell? I'm not able to reproduce an empty string here.
Status: NeedInfo
Jun 12, 2012
#3 vojta.kr...@gmail.com
it is so easy, that i actually could not find the workaround :]

first 15 sec:
http://screencast-o-matic.com/watch/cl1lIQmGg
Jun 12, 2012
Project Member #4 a...@anse.de
Confirmed. There is even more than one error here - a SELECT fired immediately after the INSERT already fails. I will have to care not to break  issue #2608  again.
Status: Accepted
Jun 12, 2012
Project Member #5 a...@anse.de
This bug is juts showing up when the DECIMAL column
a) is part of the primary key, so it gets into the WHERE clause
b) does not have a default value
c) does not allow NULL
That may explain why I could not reproduce it first, as I had some differently defined DECIMAL column, although you exemplary posted the CREATE code here...
Jun 12, 2012
Project Member #6 a...@anse.de
This issue was closed by revision r4157.
Status: Fixed
Jun 12, 2012
Project Member #7 a...@anse.de
Fix just committed. Hopefully you don't try it out on a table with a UNIQUE key only where the DECIMAL column allows NULL...
Jun 13, 2012
#8 vojta.kr...@gmail.com
Thank you very much.
Sign in to add a comment

Powered by Google Project Hosting