DatabaseExplorer - SQL Parsing Issues
Posted: Thu Jun 15, 2017 12:16 am
I've been working with MySQL and SQLite (on Linux) via the SqlCommandPanel and have found a number of SQL parsing errors. I've also got fixes for some of the following bugs.
What is the preferred process to handle this? Should I open Issues on GitHub and then make pull requests against those?
I've outlined my findings below.
1) History is not updated correctly in SQLCommandPanel if ; appears in a search string and comments are not always removed.
2) Unicode in SQL statements is not handled correctly in MysqlDatabaseLayer
3) A Comment at the end of a SQL statement is not filtered out correctly by SQLCommandPanel::ExecuteSQL() and is not filtered out by DatabaseQueryParser.cpp (maybe could be fixed by using the new, fixed output of ParseSql() from the solution to 1)
Also, is parsed incorrectly in DatabaseQueryParser.cpp
What is the preferred process to handle this? Should I open Issues on GitHub and then make pull requests against those?
I've outlined my findings below.
1) History is not updated correctly in SQLCommandPanel if ; appears in a search string and comments are not always removed.
Code: Select all
select * from People where LName not like '%a%'; -- test comment
select * from People where LName not like '%;%';
Code: Select all
select * from People where LName not like '%☺%';
3) A Comment at the end of a SQL statement is not filtered out correctly by SQLCommandPanel::ExecuteSQL() and is not filtered out by DatabaseQueryParser.cpp (maybe could be fixed by using the new, fixed output of ParseSql() from the solution to 1)
Also,
Code: Select all
"%;%"
Code: Select all
select * from People; -- TEST
select * from People where LName not like "%;%";