[MDEV-19653] Add class Sql_cmd_create_table Created: 2019-05-31 Updated: 2020-08-25 Resolved: 2019-07-04 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Parser |
| Fix Version/s: | 10.2.25, 10.1.41, 10.3.16, 10.4.6, 10.5.0 |
| Type: | Task | Priority: | Critical |
| Reporter: | Alexander Barkov | Assignee: | Alexander Barkov |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||
| Description |
|
To fix So we need to pass the storage engine name, scanned in the ENGINE=XXX clause, through LEX. Adding the storage engine name as a member to LEX (directly, or through its parts like HA_CREATE_INFO) is not nice:
The easiest way to solve this would be moving the create table related code to a new class Sql_cmd_create_table, with a member:
and adding the same member to Sql_cmd_alter_table. Proposed changes`mysql_execute_command()` changesThe `case SQLCMD_CREATE_TABLE` part of `mysql_execute_command()` will go to `Sql_cmd_create_table::execute()`. Grammar changes to the `create_table_option` ruleThis code in sql_yacc.yy:
will change to:
Grammar changes to the `storage_engine` ruleThe code in the rule storage_engines: will go to a new method in THD:
so it can be reused by:
This change should fix |
| Comments |
| Comment by Marko Mäkelä [ 2019-06-13 ] |
|
My initial merge of this to 10.3 will cause CREATE SEQUENCE to crash. I asked sanja to take over what I pushed to 10.3-merge. |
| Comment by Alexander Barkov [ 2019-07-04 ] |
|
Hi juan.vera, |
| Comment by Juan [ 2019-07-04 ] |
|
Hi bar - Got it. Thanks! |