Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
10.0.17
Description
For instance:
create table t1 (a char(16)) engine=myisam;
|
insert into t1 values('Hello World!');
|
create table t2 engine=connect file_name='e:/truc/foo.txt' as select * from t1;
|
freezes the server (DEBUG version) with:
Open(a+b) error 2 on e:/truc/foo.txt: No such file or directory
|
Assertion failed: 0, file .\protocol.cc, line 522
|
 |
This application has requested the Runtime to terminate it in an unusual way.
|
However, doing:
create table t2 (a char(16)) engine=connect file_name='e:/truc/foo.txt';
|
insert into t2 select * from t1;
|
Just issue the expected message "Open error on e:/truc/foo.txt..."
Indeed the directory 'truc' does not exist on the disk E.
This may not be specific to the CONNECT engine. It seems that when the storage engine function write_row returns in error with rc= HA_ERR_INTERNAL_ERROR, the error return is handled correctly by MariaDB but in and only in the case of "CREATE TABLE ... AS SELECT ..." at the very end of the process, when the function Protocol::end_statement is called, the thd->get_stmt_da()->status() call returns an invalid value.
Things are almost worst when using a RELEASE server because the DBUG_ASSERT not being executed, no error message is displayed but the table is silently not created.
Attachments
Issue Links
- includes
-
MDEV-12382 Query crashes CREATE TABLE XX AS SELECT * FROM YY
- Closed