diff options
author | Sergey Petrunya <psergey@askmonty.org> | 2009-09-18 05:04:43 +0400 |
---|---|---|
committer | Sergey Petrunya <psergey@askmonty.org> | 2009-09-18 05:04:43 +0400 |
commit | 55298d1b3e7b85a9840f13ece166ceb8a1cbdf5c (patch) | |
tree | d781215599025fdb5d5058388da357f24bcd58d7 | |
parent | bb2b859225daacbbe4b41b9d5e358ec183c185df (diff) | |
download | mariadb-git-55298d1b3e7b85a9840f13ece166ceb8a1cbdf5c.tar.gz |
A change of direction for fix 10 csets ago:
- When the table is created with an attribute that is not supported by
the storage engine, the attribute ought to be still kept.
-rw-r--r-- | mysql-test/r/myisam.result | 2 | ||||
-rw-r--r-- | mysql-test/suite/maria/r/maria3.result | 4 | ||||
-rw-r--r-- | mysql-test/t/myisam.test | 3 | ||||
-rw-r--r-- | sql/sql_table.cc | 8 |
4 files changed, 6 insertions, 11 deletions
diff --git a/mysql-test/r/myisam.result b/mysql-test/r/myisam.result index 74637f66091..0a02c25c322 100644 --- a/mysql-test/r/myisam.result +++ b/mysql-test/r/myisam.result @@ -2234,7 +2234,7 @@ Table Create Table t1 CREATE TABLE `t1` ( `n` int(11) NOT NULL, `c` char(1) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 +) ENGINE=MyISAM DEFAULT CHARSET=latin1 TRANSACTIONAL=1 drop table t1; CREATE TABLE t1 (line LINESTRING NOT NULL) engine=myisam; INSERT INTO t1 VALUES (GeomFromText("POINT(0 0)")); diff --git a/mysql-test/suite/maria/r/maria3.result b/mysql-test/suite/maria/r/maria3.result index 6519adfe877..a49b25beb33 100644 --- a/mysql-test/suite/maria/r/maria3.result +++ b/mysql-test/suite/maria/r/maria3.result @@ -518,7 +518,7 @@ Table Create Table t1 CREATE TABLE `t1` ( `n` int(11) NOT NULL, `c` char(1) DEFAULT NULL -) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 +) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 TRANSACTIONAL=1 drop table t1; create table t1 (n int not null, c char(1)) engine=myisam transactional=1; Warnings: @@ -529,7 +529,7 @@ Table Create Table t1 CREATE TABLE `t1` ( `n` int(11) NOT NULL, `c` char(1) DEFAULT NULL -) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 +) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 TRANSACTIONAL=1 drop table t1; create table t1 (a int, key(a)) transactional=0; insert into t1 values (0),(1),(2),(3),(4); diff --git a/mysql-test/t/myisam.test b/mysql-test/t/myisam.test index c3e236933c1..3e9bc69f725 100644 --- a/mysql-test/t/myisam.test +++ b/mysql-test/t/myisam.test @@ -1478,7 +1478,10 @@ let $MYSQLD_DATADIR= `select @@datadir`; --exec $MYISAMCHK -d $MYSQLD_DATADIR/test/t1 DROP TABLE t1; +# # Test warnings with transactional=1 with MyISAM +# MariaDB: Note that the table will still have 'TRANSACTIONAL=1' attribute. +# That's the intended behavior atm. # create table t1 (n int not null, c char(1)) transactional=1; show create table t1; diff --git a/sql/sql_table.cc b/sql/sql_table.cc index 79548fe70ea..3aa9722c6ea 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -3747,19 +3747,11 @@ bool mysql_create_table_no_lock(THD *thd, /* Give warnings for not supported table options */ if (create_info->transactional && !file->ht->commit) - { push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_ERROR, ER_ILLEGAL_HA_CREATE_OPTION, ER(ER_ILLEGAL_HA_CREATE_OPTION), file->engine_name()->str, "TRANSACTIONAL=1"); - /* - MariaDB: need to do the same for row_format and page_checksum - options. See MBUG#425916 - */ - create_info->transactional= HA_CHOICE_UNDEF; - create_info->used_fields &= ~HA_CREATE_USED_TRANSACTIONAL; - } VOID(pthread_mutex_lock(&LOCK_open)); if (!internal_tmp_table && !(create_info->options & HA_LEX_CREATE_TMP_TABLE)) |