summaryrefslogtreecommitdiff
path: root/sql/handler.h
diff options
context:
space:
mode:
authorunknown <acurtis@xiphis.org>2006-05-09 13:31:46 -0700
committerunknown <acurtis@xiphis.org>2006-05-09 13:31:46 -0700
commit6116d0176be08f85d7096582c46886b7b53440c1 (patch)
tree1fed1caed61ab2e91c6c91ac94cad060494a7492 /sql/handler.h
parentb5732e7c8cb8d89ca25ed5948f457159a4adc3e0 (diff)
downloadmariadb-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/handler.h')
-rw-r--r--sql/handler.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/sql/handler.h b/sql/handler.h
index e531a3f1077..f6e1dc54b9f 100644
--- a/sql/handler.h
+++ b/sql/handler.h
@@ -408,6 +408,7 @@ struct show_table_alias_st {
#define HTON_ALTER_NOT_SUPPORTED (1 << 1) //Engine does not support alter
#define HTON_CAN_RECREATE (1 << 2) //Delete all is used fro truncate
#define HTON_HIDDEN (1 << 3) //Engine does not appear in lists
+#define HTON_ALTER_CANNOT_CREATE (1 << 4) //Cannot use alter to create
typedef struct st_thd_trans
{