[MDEV-17227] Server crash in TABLE_SHARE::init_from_sql_statement_string upon table discovery with non-existent database Created: 2018-09-18 Updated: 2021-01-12 Resolved: 2021-01-12 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Data Definition - Create Table, Server, Storage Engine - Connect, Storage Engine - Federated |
| Affects Version/s: | 10.3, 10.4 |
| Fix Version/s: | 10.3.28, 10.4.18, 10.5.9 |
| Type: | Bug | Priority: | Major |
| Reporter: | Juan Telleria | Assignee: | Sergei Golubchik |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Windows |
||
| Attachments: |
|
||||||||
| Issue Links: |
|
||||||||
| Description |
|
If you create a ENGINE=Connect Table_Type=ODBC Table, and try to save it to a Non-Existant Database, the Server Crashes. For example, the following query causes the Server to Crash, whenever the Database ("db_name_non_existant") in which the created Connect ODBC Table to be saved does not exists:
The Error Log Backtrace is the following:
|
| Comments |
| Comment by Olivier Bertrand [ 2018-09-18 ] | ||||||||||||||||||||||||
|
Are you sure there are no other errors in your create statement? I tried:
The discovery process was ok for CONNECT (the created table name is not used) but the final call to init_from_sql_statement_string returned HA_ERR_GENERIC and I got the normal error message saying that discovery failed. The Error log.txt file shows that the crash occured in TABLE_SHARE::init_from_sql_statement_string() in table.cc line 2810 but not for me. Which version of MariaDB are you using? Anyhow it seems that the crash is not caused by CONNECT. | ||||||||||||||||||||||||
| Comment by Juan Telleria [ 2018-09-19 ] | ||||||||||||||||||||||||
|
The database is the one that must not exist when creating the CONNECT Table: MariaDB 10.3.9 + RocksDB Engine Configured. I attach my.ini | ||||||||||||||||||||||||
| Comment by Juan Telleria [ 2018-09-19 ] | ||||||||||||||||||||||||
|
@Olivier Bertrand By the way: I created a new Issue MDEV-17240, to propose that, if you consider it appropriate Thank you! | ||||||||||||||||||||||||
| Comment by Elena Stepanova [ 2019-09-19 ] | ||||||||||||||||||||||||
|
Not limited to CONNECT, same happens with FederatedX:
Reproducible on 10.3+, debug-and non-debug alike. 10.2 returns an error instead:
| ||||||||||||||||||||||||
| Comment by Elena Stepanova [ 2020-05-02 ] | ||||||||||||||||||||||||
|
MDEV-22435 was linked to this issue as possibly having the same root cause. |