diff options
author | unknown <acurtis@xiphis.org> | 2006-05-09 13:31:46 -0700 |
---|---|---|
committer | unknown <acurtis@xiphis.org> | 2006-05-09 13:31:46 -0700 |
commit | 6116d0176be08f85d7096582c46886b7b53440c1 (patch) | |
tree | 1fed1caed61ab2e91c6c91ac94cad060494a7492 /sql/ha_blackhole.cc | |
parent | b5732e7c8cb8d89ca25ed5948f457159a4adc3e0 (diff) | |
download | mariadb-git-6116d0176be08f85d7096582c46886b7b53440c1.tar.gz |
bug#10952
"alter table from MyISAM to MERGE lost data without errors and warnings"
Add new handlerton flag which prevent user from altering table storage
engine to storage engines which would lose data. Both 'blackhole' and
'merge' are marked with the new flag.
Tests included.
mysql-test/r/blackhole.result:
test for bug#10952
mysql-test/r/merge.result:
test for bug#10952
mysql-test/t/blackhole.test:
test for bug#10952
mysql-test/t/merge.test:
test for bug#10952
sql/ha_blackhole.cc:
Bug#10952
shouldn't be able to alter a table into a blackhole
sql/ha_myisammrg.cc:
Bug#10952
shouldn't be able to alter a table into a merge
sql/handler.h:
Bug#10952
new handlerton flag
sql/sql_table.cc:
Bug#10952
If alter is changing engine, check if new engine allows creating table
via ALTER statement.
Diffstat (limited to 'sql/ha_blackhole.cc')
-rw-r--r-- | sql/ha_blackhole.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/ha_blackhole.cc b/sql/ha_blackhole.cc index 2505919af39..7632ed59949 100644 --- a/sql/ha_blackhole.cc +++ b/sql/ha_blackhole.cc @@ -47,7 +47,7 @@ handlerton blackhole_hton= { NULL, /* create_cursor_read_view */ NULL, /* set_cursor_read_view */ NULL, /* close_cursor_read_view */ - HTON_CAN_RECREATE + HTON_CAN_RECREATE | HTON_ALTER_CANNOT_CREATE }; /***************************************************************************** |