[MDEV-12421] Check constraint with query crashes server and renders DB unusable Created: 2017-03-31 Updated: 2017-04-03 Resolved: 2017-04-02 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Parser |
| Affects Version/s: | 10.2.4 |
| Fix Version/s: | 10.2.5 |
| Type: | Bug | Priority: | Major |
| Reporter: | Jessie Potts | Assignee: | Sergei Golubchik |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | 10.2-rc, check_constraints, create_table, innodb | ||
| Environment: |
Windows 10 64bit |
||
| Attachments: |
|
| Description |
|
I'm evaluating the possibility of migrating and existing SQL Anywhere database to MariaDB. While trying to port the existing tables, I've come across a scenario which crashes the mysqld server and renders the database useless. I can restart the server but when I attempt to do anything with the database, it crashes again (error log attached). Here is SQL that that will reproduce this problem:
I'm not defending the way this was implemented, but it is what it is. I haven't found any documentation stating this shouldn't work. Please let me know if that's the case. Thanks! |
| Comments |
| Comment by Jessie Potts [ 2017-03-31 ] | |||
|
Here's the results of --print-defaults, as recommend by the bug reporting guidelines.
| |||
| Comment by Sergei Golubchik [ 2017-04-02 ] | |||
|
It shouldn't work. There was a test in the code to disallow user variables and subqueries in CHECK, but it was misplaced. I fixed that. | |||
| Comment by Jessie Potts [ 2017-04-03 ] | |||
|
Thanks Sergei! I'd prefer being able to do this but having the engine tell me I can't is much better than letting me do it and then crashing. |