mirror of
https://github.com/MariaDB/server.git
synced 2026-05-07 23:54:31 +02:00
Fix for bug#16532 mysql server assert in debug if table definition is removed
Emit an error instead of doing ASSERT mysql-test/r/create_not_windows.result: update result mysql-test/t/create_not_windows.test: Add test case for bug #16532: mysql server assert in debug if table definition is removed sql/sql_table.cc: it could happen that an user deletes the frm file on OS level. In addition if the table was already opened, the file system level check for existance of table.frm will pass but get_cached_table_share() will return non-NULL value. In this case we will emit the standard error that the table exist. The error case is quite obscure but error message is better than a sigabort.
This commit is contained in:
parent
d090462abc
commit
7c9d15af31
3 changed files with 51 additions and 1 deletions
|
|
@ -12,3 +12,20 @@ about:text CREATE TABLE `about:text` (
|
|||
PRIMARY KEY (`_id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
drop table `about:text`;
|
||||
use test;
|
||||
drop table if exists t1;
|
||||
create table t1(a int) engine=myisam;
|
||||
insert into t1 values(1);
|
||||
"We get an error because the table is in the definition cache"
|
||||
create table t1(a int, b int);
|
||||
ERROR 42S01: Table 't1' already exists
|
||||
"Flush the cache and recreate the table anew to be able to drop it"
|
||||
flush tables;
|
||||
show open tables like "t%";
|
||||
Database Table In_use Name_locked
|
||||
create table t1(a int, b int, c int);
|
||||
"Try to select from the table. This should not crash the server"
|
||||
select count(a) from t1;
|
||||
count(a)
|
||||
0
|
||||
drop table t1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue