Menu

#345 In-query caueses incorrect query(mysql)

Git
closed-fixed
nobody
5
2014-08-16
2013-10-04
Eric Krona
No

When searching using IN() and specifying 1,2,3 in the search field, the generated query is incorrect.

Steps to reproduce

1. Create a table

CREATE TABLE table3 (
id int NOT NULL AUTO_INCREMENT PRIMARY KEY,
title varchar(20) NOT NULL
) COMMENT=''; -- 0.000 s

1.1 Additional issue is that the length of the varchar is not extracted correctly from the form(see how the form was filled out in screenshot).

2. Insert some data

INSERT INTO table3 (title) VALUES ('test3'); -- 0.003 s
INSERT INTO table3 (title) VALUES ('test2'); -- 0.005 s
INSERT INTO table3 (title) VALUES ('test1'); -- 0.003 s

3. Click select data, search id field with IN and value 1,2

Result is a broken query: "SELECT * FROM table3 WHERE id IN (),2"

See screenshot

1 Attachments

Discussion

  • Jakub Vrána

    Jakub Vrána - 2013-12-20
    • status: open --> closed-fixed
     
  • Jakub Vrána

    Jakub Vrána - 2013-12-20

    This should be already fixed, thanks for the report.

     

Log in to post a comment.