[MCOL-679] Crash on prepared statement when no parameters bound Created: 2017-04-24 Updated: 2017-05-04 Resolved: 2017-05-04 |
|
| Status: | Closed |
| Project: | MariaDB ColumnStore |
| Component/s: | None |
| Affects Version/s: | 1.0.8, 1.1.0 |
| Fix Version/s: | 1.0.9, 1.1.0 |
| Type: | Bug | Priority: | Major |
| Reporter: | Andrew Hutchings (Inactive) | Assignee: | Daniel Lee (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||||||||||
| Sprint: | 2017-9 | ||||||||||||||||
| Description |
|
Found from logs in When executing a prepared statement that contains question marks but no params we crash in sql_parse.cc:9825:
Because "begin" is NULL. Example query:
|
| Comments |
| Comment by rambo [ 2017-04-24 ] | |||||||||||||||||||||||||||
|
This is a batch insert like this: INSERT INTO vstats_country (did,country,req | |||||||||||||||||||||||||||
| Comment by Andrew Hutchings (Inactive) [ 2017-04-24 ] | |||||||||||||||||||||||||||
|
This is to do with the crashes in your mysqld logs which are insert batches using prepared statements with two question marks (??) in the country field in quote marks. This is valid syntax and unfortunately causes the MariaDB server modifications for ColumnStore to crash. For the example I've used a single insert for simplification because it can be triggered with this. | |||||||||||||||||||||||||||
| Comment by Andrew Hutchings (Inactive) [ 2017-04-24 ] | |||||||||||||||||||||||||||
|
sorry, I meant double question marks in quotes which is valid. But still causes the same problem. Updated ticket accordingly | |||||||||||||||||||||||||||
| Comment by rambo [ 2017-04-24 ] | |||||||||||||||||||||||||||
|
Get it. | |||||||||||||||||||||||||||
| Comment by Andrew Hutchings (Inactive) [ 2017-05-04 ] | |||||||||||||||||||||||||||
|
Branches for develop and develop-1.0 for review Test case:
PHP code:
Before the patch mysqld would crash executing this. | |||||||||||||||||||||||||||
| Comment by Daniel Lee (Inactive) [ 2017-05-04 ] | |||||||||||||||||||||||||||
|
Build tested: 1.0.9-1 and 1.1.0-1 GitHub source Reproduced the crash in 1.0.8-1 and verified the fix in 1.0.9-1 and 1.1.0-1 using the included php script. |