summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2021-01-09 18:52:33 +0100
committerSergei Golubchik <serg@mariadb.org>2021-01-11 21:54:47 +0100
commit674be2fd8296092f246f2d89bc514f50f65dfa2c (patch)
tree7ec7df9e27ab870ff251304c01263a647026c017
parent22b171d3044675481c03b83888cffa018a502c4e (diff)
downloadmariadb-git-674be2fd8296092f246f2d89bc514f50f65dfa2c.tar.gz
MDEV-18428 Memory: If transactional=0 is specified in CREATE TABLE, it is not possible to ALTER TABLE
fix "engine does not support TRANSACTIONAL=1" error message to match user input
-rw-r--r--mysql-test/r/create.result2
-rw-r--r--sql/sql_table.cc3
2 files changed, 3 insertions, 2 deletions
diff --git a/mysql-test/r/create.result b/mysql-test/r/create.result
index 3e5efbe74dd..2f039826209 100644
--- a/mysql-test/r/create.result
+++ b/mysql-test/r/create.result
@@ -1290,7 +1290,7 @@ drop table if exists t1,t2,t3;
# Fix modified for MariaDB: we support this syntax
create table t1 (a int) transactional=0;
Warnings:
-Warning 1478 Table storage engine 'MyISAM' does not support the create option 'TRANSACTIONAL=1'
+Warning 1478 Table storage engine 'MyISAM' does not support the create option 'TRANSACTIONAL=0'
create table t2 (a int) page_checksum=1;
create table t3 (a int) row_format=page;
drop table t1,t2,t3;
diff --git a/sql/sql_table.cc b/sql/sql_table.cc
index 57284272316..4b62ccb7d7c 100644
--- a/sql/sql_table.cc
+++ b/sql/sql_table.cc
@@ -4254,7 +4254,8 @@ mysql_prepare_create_table(THD *thd, HA_CREATE_INFO *create_info,
ER_ILLEGAL_HA_CREATE_OPTION,
ER_THD(thd, ER_ILLEGAL_HA_CREATE_OPTION),
file->engine_name()->str,
- "TRANSACTIONAL=1");
+ create_info->transactional == HA_CHOICE_YES
+ ? "TRANSACTIONAL=1" : "TRANSACTIONAL=0");
if (parse_option_list(thd, file->partition_ht(), &create_info->option_struct,
&create_info->option_list,