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.
This commit is contained in:
parent
bb2b859225
commit
55298d1b3e
@ -2234,7 +2234,7 @@ Table Create Table
|
|||||||
t1 CREATE TABLE `t1` (
|
t1 CREATE TABLE `t1` (
|
||||||
`n` int(11) NOT NULL,
|
`n` int(11) NOT NULL,
|
||||||
`c` char(1) DEFAULT NULL
|
`c` char(1) DEFAULT NULL
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1 TRANSACTIONAL=1
|
||||||
drop table t1;
|
drop table t1;
|
||||||
CREATE TABLE t1 (line LINESTRING NOT NULL) engine=myisam;
|
CREATE TABLE t1 (line LINESTRING NOT NULL) engine=myisam;
|
||||||
INSERT INTO t1 VALUES (GeomFromText("POINT(0 0)"));
|
INSERT INTO t1 VALUES (GeomFromText("POINT(0 0)"));
|
||||||
|
@ -518,7 +518,7 @@ Table Create Table
|
|||||||
t1 CREATE TABLE `t1` (
|
t1 CREATE TABLE `t1` (
|
||||||
`n` int(11) NOT NULL,
|
`n` int(11) NOT NULL,
|
||||||
`c` char(1) DEFAULT 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;
|
drop table t1;
|
||||||
create table t1 (n int not null, c char(1)) engine=myisam transactional=1;
|
create table t1 (n int not null, c char(1)) engine=myisam transactional=1;
|
||||||
Warnings:
|
Warnings:
|
||||||
@ -529,7 +529,7 @@ Table Create Table
|
|||||||
t1 CREATE TABLE `t1` (
|
t1 CREATE TABLE `t1` (
|
||||||
`n` int(11) NOT NULL,
|
`n` int(11) NOT NULL,
|
||||||
`c` char(1) DEFAULT 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;
|
drop table t1;
|
||||||
create table t1 (a int, key(a)) transactional=0;
|
create table t1 (a int, key(a)) transactional=0;
|
||||||
insert into t1 values (0),(1),(2),(3),(4);
|
insert into t1 values (0),(1),(2),(3),(4);
|
||||||
|
@ -1478,7 +1478,10 @@ let $MYSQLD_DATADIR= `select @@datadir`;
|
|||||||
--exec $MYISAMCHK -d $MYSQLD_DATADIR/test/t1
|
--exec $MYISAMCHK -d $MYSQLD_DATADIR/test/t1
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
|
|
||||||
|
#
|
||||||
# Test warnings with transactional=1 with MyISAM
|
# 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;
|
create table t1 (n int not null, c char(1)) transactional=1;
|
||||||
show create table t1;
|
show create table t1;
|
||||||
|
@ -3747,19 +3747,11 @@ bool mysql_create_table_no_lock(THD *thd,
|
|||||||
|
|
||||||
/* Give warnings for not supported table options */
|
/* Give warnings for not supported table options */
|
||||||
if (create_info->transactional && !file->ht->commit)
|
if (create_info->transactional && !file->ht->commit)
|
||||||
{
|
|
||||||
push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_ERROR,
|
push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_ERROR,
|
||||||
ER_ILLEGAL_HA_CREATE_OPTION,
|
ER_ILLEGAL_HA_CREATE_OPTION,
|
||||||
ER(ER_ILLEGAL_HA_CREATE_OPTION),
|
ER(ER_ILLEGAL_HA_CREATE_OPTION),
|
||||||
file->engine_name()->str,
|
file->engine_name()->str,
|
||||||
"TRANSACTIONAL=1");
|
"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));
|
VOID(pthread_mutex_lock(&LOCK_open));
|
||||||
if (!internal_tmp_table && !(create_info->options & HA_LEX_CREATE_TMP_TABLE))
|
if (!internal_tmp_table && !(create_info->options & HA_LEX_CREATE_TMP_TABLE))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user