#At bzr+ssh://bk-internal.mysql.com/bzrroot/server/mysql-maria/
2654 Guilhem Bichot 2008-07-01
Back-port of changes made to 6.0-maria (to remove compiler warnings or fix simple test failures)
in the last days: substitution in tests has to work for absolute datadir (/dev/shm/...);
internal temp tables (like information_schema) can be Maria; Maria may not be compiled in; splitting
too long maria.test in two; mtr --embedded runs in mysql-test not mysql-test/var/master-data
so we need some absolute paths in tests; can't restart mysqld in --embedded; missing DBUG_VOID_RETURN in
mysqltest.c (fix from Serg); is_collation_character_set_applicability.test was too long name
which broke tar's 99-char limit.
added:
mysql-test/r/maria3.result
mysql-test/t/maria3.test
renamed:
mysql-test/suite/funcs_1/r/is_collation_character_set_applicability.result => mysql-test/suite/funcs_1/r/is_collation_charset_applic.result
mysql-test/suite/funcs_1/t/is_collation_character_set_applicability.test => mysql-test/suite/funcs_1/t/is_collation_charset_applic.test
modified:
client/mysqltest.c
mysql-test/mysql-test-run.pl
mysql-test/r/maria-recover.result
mysql-test/r/maria.result
mysql-test/suite/funcs_1/datadict/processlist_priv.inc
mysql-test/suite/funcs_1/datadict/processlist_val.inc
mysql-test/suite/funcs_1/datadict/tables2.inc
mysql-test/suite/funcs_1/r/is_columns.result
mysql-test/suite/funcs_1/r/is_events.result
mysql-test/suite/funcs_1/r/is_routines.result
mysql-test/suite/funcs_1/r/is_tables_is.result
mysql-test/suite/funcs_1/r/is_tables_myisam.result
mysql-test/suite/funcs_1/r/is_tables_mysql.result
mysql-test/suite/funcs_1/r/is_triggers.result
mysql-test/suite/funcs_1/r/is_views.result
mysql-test/suite/funcs_1/r/processlist_priv_no_prot.result
mysql-test/suite/funcs_1/r/processlist_priv_ps.result
mysql-test/suite/funcs_1/r/processlist_val_no_prot.result
mysql-test/suite/funcs_1/r/processlist_val_ps.result
mysql-test/suite/funcs_1/t/is_columns.test
mysql-test/suite/funcs_1/t/is_events.test
mysql-test/suite/funcs_1/t/is_routines.test
mysql-test/suite/funcs_1/t/is_triggers.test
mysql-test/suite/funcs_1/t/is_views.test
mysql-test/t/maria-no-logging.test
mysql-test/t/maria-purge.test
mysql-test/t/maria-recover-master.opt
mysql-test/t/maria-recover.test
mysql-test/t/maria-recovery-big.test
mysql-test/t/maria-recovery-bitmap.test
mysql-test/t/maria-recovery-master.opt
mysql-test/t/maria-recovery-rtree-ft.test
mysql-test/t/maria-recovery.test
mysql-test/t/maria.test
storage/maria/ma_delete.c
=== modified file 'client/mysqltest.c'
--- a/client/mysqltest.c 2008-04-28 16:24:05 +0000
+++ b/client/mysqltest.c 2008-07-01 20:47:09 +0000
@@ -2300,7 +2300,7 @@ void do_source(struct st_command *comman
}
dynstr_free(&ds_filename);
- return;
+ DBUG_VOID_RETURN;
}
=== modified file 'mysql-test/mysql-test-run.pl'
--- a/mysql-test/mysql-test-run.pl 2008-04-28 16:24:05 +0000
+++ b/mysql-test/mysql-test-run.pl 2008-07-01 20:47:09 +0000
@@ -2186,13 +2186,13 @@ sub environment_setup () {
# ----------------------------------------------------
# Setup env so childs can execute maria_pack and maria_chk
# ----------------------------------------------------
- $ENV{'MARIA_CHK'}= mtr_native_path(mtr_exe_exists(
+ $ENV{'MARIA_CHK'}= mtr_native_path(mtr_exe_maybe_exists(
vs_config_dirs('storage/maria', 'maria_chk'),
vs_config_dirs('maria', 'maria_chk'),
"$path_client_bindir/maria_chk",
"$glob_basedir/storage/maria/maria_chk",
"$glob_basedir/maria/maria_chk"));
- $ENV{'MARIA_PACK'}= mtr_native_path(mtr_exe_exists(
+ $ENV{'MARIA_PACK'}= mtr_native_path(mtr_exe_maybe_exists(
vs_config_dirs('storage/maria', 'maria_pack'),
vs_config_dirs('maria', 'maria_pack'),
"$path_client_bindir/maria_pack",
=== modified file 'mysql-test/r/maria-recover.result'
--- a/mysql-test/r/maria-recover.result 2008-06-16 08:57:25 +0000
+++ b/mysql-test/r/maria-recover.result 2008-07-01 20:47:09 +0000
@@ -24,8 +24,8 @@ select * from t_corrupted2;
a
ThursdayMorningsMarket
Warnings:
-Error 145 Table '.t_corrupted2' is marked as crashed and should be repaired
-Error 1194 Table 't_corrupted2' is marked as crashed and should be repaired
+Error 145 t_corrupted2' is marked as crashed and should be repaired
+Error 1194 t_corrupted2' is marked as crashed and should be repaired
Error 1034 1 client is using or hasn't closed the table properly
Error 1034 Wrong base information on indexpage at page: 1
select * from t_corrupted2;
=== modified file 'mysql-test/r/maria.result'
--- a/mysql-test/r/maria.result 2008-06-26 05:18:28 +0000
+++ b/mysql-test/r/maria.result 2008-07-01 20:47:09 +0000
@@ -1865,536 +1865,3 @@ t1 CREATE TABLE `t1` (
KEY `b` (`b`) KEY_BLOCK_SIZE=8192
) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0 KEY_BLOCK_SIZE=16384
drop table t1;
-create table t1 (a int not null, key `a` (a) key_block_size=512);
-show create table t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) NOT NULL,
- KEY `a` (`a`) KEY_BLOCK_SIZE=8192
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
-drop table t1;
-create table t1 (a varchar(2048), key `a` (a) key_block_size=1000000000000000000);
-Warnings:
-Warning 1071 Specified key was too long; max key length is 1112 bytes
-show create table t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` varchar(2048) DEFAULT NULL,
- KEY `a` (`a`(1112)) KEY_BLOCK_SIZE=8192
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
-drop table t1;
-create table t1 (a int not null, key `a` (a) key_block_size=1025);
-show create table t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) NOT NULL,
- KEY `a` (`a`) KEY_BLOCK_SIZE=8192
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
-drop table t1;
-create table t1 (a int not null, key key_block_size=1024 (a));
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '=1024 (a))' at line 1
-create table t1 (a int not null, key `a` key_block_size=1024 (a));
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'key_block_size=1024 (a))' at line 1
-CREATE TABLE t1 (
-c1 INT,
-c2 VARCHAR(300),
-KEY (c1) KEY_BLOCK_SIZE 1024,
-KEY (c2) KEY_BLOCK_SIZE 8192
-);
-INSERT INTO t1 VALUES (10, REPEAT('a', CEIL(RAND(10) * 300))),
-(11, REPEAT('b', CEIL(RAND() * 300))),
-(12, REPEAT('c', CEIL(RAND() * 300))),
-(13, REPEAT('d', CEIL(RAND() * 300))),
-(14, REPEAT('e', CEIL(RAND() * 300))),
-(15, REPEAT('f', CEIL(RAND() * 300))),
-(16, REPEAT('g', CEIL(RAND() * 300))),
-(17, REPEAT('h', CEIL(RAND() * 300))),
-(18, REPEAT('i', CEIL(RAND() * 300))),
-(19, REPEAT('j', CEIL(RAND() * 300))),
-(20, REPEAT('k', CEIL(RAND() * 300))),
-(21, REPEAT('l', CEIL(RAND() * 300))),
-(22, REPEAT('m', CEIL(RAND() * 300))),
-(23, REPEAT('n', CEIL(RAND() * 300))),
-(24, REPEAT('o', CEIL(RAND() * 300))),
-(25, REPEAT('p', CEIL(RAND() * 300))),
-(26, REPEAT('q', CEIL(RAND() * 300))),
-(27, REPEAT('r', CEIL(RAND() * 300))),
-(28, REPEAT('s', CEIL(RAND() * 300))),
-(29, REPEAT('t', CEIL(RAND() * 300))),
-(30, REPEAT('u', CEIL(RAND() * 300))),
-(31, REPEAT('v', CEIL(RAND() * 300))),
-(32, REPEAT('w', CEIL(RAND() * 300))),
-(33, REPEAT('x', CEIL(RAND() * 300))),
-(34, REPEAT('y', CEIL(RAND() * 300))),
-(35, REPEAT('z', CEIL(RAND() * 300)));
-INSERT INTO t1 SELECT * FROM t1;
-INSERT INTO t1 SELECT * FROM t1;
-CHECK TABLE t1;
-Table Op Msg_type Msg_text
-test.t1 check status OK
-REPAIR TABLE t1;
-Table Op Msg_type Msg_text
-test.t1 repair status OK
-DELETE FROM t1 WHERE c1 >= 10;
-CHECK TABLE t1;
-Table Op Msg_type Msg_text
-test.t1 check status OK
-DROP TABLE t1;
-create table t1 (a int) transactional=0;
-show create table t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0 TRANSACTIONAL=0
-drop table t1;
-create table t1 (a int) row_format=dynamic transactional=0;
-show create table t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0 ROW_FORMAT=DYNAMIC TRANSACTIONAL=0
-drop table t1;
-create table t1 (a int) row_format=dynamic transactional=1;
-Warnings:
-Note 1478 Row format set to PAGE because of TRANSACTIONAL=1 option
-show create table t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0 ROW_FORMAT=PAGE TRANSACTIONAL=1
-alter table t1 row_format=PAGE;
-show create table t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0 ROW_FORMAT=PAGE TRANSACTIONAL=1
-alter table t1 row_format=DYNAMIC;
-Warnings:
-Note 1478 Row format set to PAGE because of TRANSACTIONAL=1 option
-show create table t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0 ROW_FORMAT=PAGE TRANSACTIONAL=1
-alter table t1 transactional=0;
-show create table t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0 ROW_FORMAT=PAGE TRANSACTIONAL=0
-alter table t1 row_format=DYNAMIC;
-show create table t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0 ROW_FORMAT=DYNAMIC TRANSACTIONAL=0
-drop table t1;
-create table t1 (a int) row_format=PAGE;
-show create table t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0 ROW_FORMAT=PAGE
-drop table t1;
-create table t1 (a int) row_format=PAGE TRANSACTIONAL=DEFAULT;
-show create table t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0 ROW_FORMAT=PAGE
-alter table t1 row_format=DYNAMIC;
-show create table t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0 ROW_FORMAT=DYNAMIC
-drop table t1;
-create table `t1` (
-t1_name varchar(255) default null,
-t1_id int(10) unsigned not null auto_increment,
-key (t1_name),
-primary key (t1_id)
-) engine=maria auto_increment = 1000 default charset=latin1;
-lock tables t1 write;
-INSERT INTO `t1` VALUES ('bla',1000),('bla',1001),('bla',1002);
-check table t1;
-Table Op Msg_type Msg_text
-test.t1 check status OK
-unlock tables;
-create table t2 like t1;
-insert into t2 select * from t1;
-analyze table t2;
-Table Op Msg_type Msg_text
-test.t2 analyze status Table is already up to date
-delete from t2;
-insert into t2 select * from t1;
-analyze table t2;
-Table Op Msg_type Msg_text
-test.t2 analyze status Table is already up to date
-drop table t1,t2;
-create table t1 (a bigint auto_increment, primary key(a), b char(255), c varchar(20000));
-update t1 set b=repeat('a',100) where a between 1 and 100;
-check table t1;
-Table Op Msg_type Msg_text
-test.t1 check status OK
-update t1 set c=repeat('a',8192*2) where a between 200 and 202;
-check table t1;
-Table Op Msg_type Msg_text
-test.t1 check status OK
-drop table t1;
-CREATE TABLE t1 (a int, b int, v varchar(60000)) checksum=1 engine=maria;
-insert into t1 values (1,1,"aaa"),(1,2,null);
-checksum table t1;
-Table Checksum
-test.t1 1112804611
-lock table t1 write;
-insert into t1 values (1,3,repeat('c',30000)),(4,4,repeat('a',30000));
-update t1 set v="row5" where b=4;
-delete from t1 where b=3;
-select a, b, length(v) from t1;
-a b length(v)
-1 1 3
-1 2 NULL
-4 4 4
-drop table t1;
-CREATE TABLE t1 (
-auto int(5) unsigned NOT NULL auto_increment,
-string char(10) default "hello",
-tiny tinyint(4) DEFAULT '0' NOT NULL ,
-short smallint(6) DEFAULT '1' NOT NULL ,
-medium mediumint(8) DEFAULT '0' NOT NULL,
-long_int int(11) DEFAULT '0' NOT NULL,
-longlong bigint(13) DEFAULT '0' NOT NULL,
-real_float float(13,1) DEFAULT 0.0 NOT NULL,
-real_double double(16,4),
-utiny tinyint(3) unsigned DEFAULT '0' NOT NULL,
-ushort smallint(5) unsigned zerofill DEFAULT '00000' NOT NULL,
-umedium mediumint(8) unsigned DEFAULT '0' NOT NULL,
-ulong int(11) unsigned DEFAULT '0' NOT NULL,
-ulonglong bigint(13) unsigned DEFAULT '0' NOT NULL,
-time_stamp timestamp,
-date_field date,
-time_field time,
-date_time datetime,
-blob_col blob,
-tinyblob_col tinyblob,
-mediumblob_col mediumblob not null default '',
-longblob_col longblob not null default '',
-options enum('one','two','tree') not null ,
-flags set('one','two','tree') not null default '',
-PRIMARY KEY (auto),
-KEY (utiny),
-KEY (tiny),
-KEY (short),
-KEY any_name (medium),
-KEY (longlong),
-KEY (real_float),
-KEY (ushort),
-KEY (umedium),
-KEY (ulong),
-KEY (ulonglong,ulong),
-KEY (options,flags)
-) engine=maria;
-insert into t1 values (10,1,1,1,1,1,1,1,1,1,1,1,1,1,NULL,0,0,0,1,1,1,1,'one','one');
-create table t2 (primary key (auto)) engine=maria row_format=page select auto+1 as auto,1 as t1, 'a' as t2, repeat('a',256) as t3, binary repeat('b',256) as t4, repeat('a',4096) as t5, binary repeat('b',4096) as t6, '' as t7, binary '' as t8 from t1;
-check table t1,t2;
-Table Op Msg_type Msg_text
-test.t1 check status OK
-test.t2 check status OK
-select t1,t2,length(t3),length(t4),length(t5),length(t6),t7,t8 from t2;
-t1 t2 length(t3) length(t4) length(t5) length(t6) t7 t8
-1 a 256 256 4096 4096
-drop table t2;
-create table t2 (primary key (auto)) engine=maria row_format=dynamic select auto+1 as auto,1 as t1, 'a' as t2, repeat('a',256) as t3, binary repeat('b',256) as t4, repeat('a',4096) as t5, binary repeat('b',4096) as t6, '' as t7, binary '' as t8 from t1;
-check table t2;
-Table Op Msg_type Msg_text
-test.t2 check status OK
-drop table t1,t2;
-CREATE TABLE t1 (seq int, s1 int, s2 blob);
-insert into t1 values (1, 1, MD5(1));
-update t1 set s1=2 where seq=1;
-check table t1 extended;
-Table Op Msg_type Msg_text
-test.t1 check status OK
-drop table t1;
-show variables like 'maria%';
-Variable_name Value
-maria_block_size 8192
-maria_checkpoint_interval 30
-maria_force_start_after_recovery_failures 0
-maria_log_file_size 4294959104
-maria_log_purge_type immediate
-maria_max_sort_file_size 9223372036854775807
-maria_page_checksum OFF
-maria_pagecache_age_threshold 300
-maria_pagecache_buffer_size 8388600
-maria_pagecache_division_limit 100
-maria_recover OFF
-maria_repair_threads 1
-maria_sort_buffer_size 8388608
-maria_stats_method nulls_unequal
-maria_sync_log_dir NEWFILE
-show status like 'maria%';
-Variable_name Value
-Maria_pagecache_blocks_not_flushed #
-Maria_pagecache_blocks_unused #
-Maria_pagecache_blocks_used #
-Maria_pagecache_read_requests #
-Maria_pagecache_reads #
-Maria_pagecache_write_requests #
-Maria_pagecache_writes #
-create table t1 (b char(0));
-insert into t1 values(NULL),("");
-select length(b) from t1;
-length(b)
-NULL
-0
-alter table t1 add column c char(0), add key (c);
-insert into t1 values("",""),("",NULL);
-select length(b),length(c) from t1;
-length(b) length(c)
-NULL NULL
-0 NULL
-0 0
-0 NULL
-select length(b),length(c) from t1 where c is null;
-length(b) length(c)
-NULL NULL
-0 NULL
-0 NULL
-select length(b),length(c) from t1 where c is not null;
-length(b) length(c)
-0 0
-select length(b),length(c) from t1 order by c;
-length(b) length(c)
-NULL NULL
-0 NULL
-0 NULL
-0 0
-alter table t1 add column d char(0) not null, add key (d);
-ERROR 42000: The used storage engine can't index column 'd'
-drop table t1;
-CREATE TABLE t1 (a bit(3));
-insert into t1 values (NULL),(0),(1),(2),(3),(4),(5),(6),(7);
-select hex(a) from t1;
-hex(a)
-NULL
-0
-1
-2
-3
-4
-5
-6
-7
-drop table t1;
-create table t1(a bit not null);
-insert into t1 values(0),(1);
-select a+0 from t1;
-a+0
-0
-1
-drop table t1;
-CREATE TABLE t1 (col1 int, s1 char(16) DEFAULT NULL, s2 char(16) DEFAULT NULL, KEY (s1,s2));
-insert into t1 (col1) values(0);
-drop table t1;
-set global maria_page_checksum=1;
-create table t1 (a int);
-show create table t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
-drop table t1;
-set global maria_log_file_size=4294967296;
-Warnings:
-Warning 1292 Truncated incorrect log_file_size value: '4294967296'
-create table t1 (a int not null);
-lock tables t1 write;
-insert into t1 values (1),(2);
-delete from t1;
-unlock tables;
-select * from t1;
-a
-insert into t1 values (1),(2);
-delete from t1;
-select * from t1;
-a
-drop table t1;
-create table t1 (c int);
-insert into t1 values(1),(2);
-create table t2 select * from t1;
-create table t3 select * from t1, t2;
-ERROR 42S21: Duplicate column name 'c'
-create table t3 select t1.c AS c1, t2.c AS c2,1 as "const" from t1, t2;
-drop table t1, t2, t3;
-create table t1 (t datetime) engine=maria;
-insert into t1 values (101),(691231),(700101),(991231),(10000101),(99991231),(101000000),(691231000000),(700101000000),(991231235959),(10000101000000),(99991231235959),(20030100000000),(20030000000000);
-select * from t1;
-t
-2000-01-01 00:00:00
-2069-12-31 00:00:00
-1970-01-01 00:00:00
-1999-12-31 00:00:00
-1000-01-01 00:00:00
-9999-12-31 00:00:00
-2000-01-01 00:00:00
-2069-12-31 00:00:00
-1970-01-01 00:00:00
-1999-12-31 23:59:59
-1000-01-01 00:00:00
-9999-12-31 23:59:59
-2003-01-00 00:00:00
-2003-00-00 00:00:00
-optimize table t1;
-Table Op Msg_type Msg_text
-test.t1 optimize status OK
-check table t1;
-Table Op Msg_type Msg_text
-test.t1 check status OK
-delete from t1 where t > 0;
-optimize table t1;
-Table Op Msg_type Msg_text
-test.t1 optimize status OK
-check table t1;
-Table Op Msg_type Msg_text
-test.t1 check status OK
-drop table t1;
-SET SQL_MODE='NO_AUTO_VALUE_ON_ZERO';
-CREATE TABLE t1 (id int(11) PRIMARY KEY auto_increment,f1 varchar(10) NOT NULL UNIQUE);
-INSERT IGNORE INTO t1 (f1) VALUES ("test1");
-INSERT IGNORE INTO t1 (f1) VALUES ("test1");
-INSERT IGNORE INTO t1 (f1) VALUES ("test2");
-SELECT * FROM t1;
-id f1
-1 test1
-2 test2
-drop table t1;
-SET SQL_MODE = 'TRADITIONAL';
-create table t1 (n int not null primary key auto_increment, c char(1), unique(c));
-insert into t1 values(100, "a");
-insert into t1 values(300, "b");
-insert into t1 values(50, "a");
-ERROR 23000: Duplicate entry 'a' for key 'c'
-insert into t1 values(null, "c");
-select * from t1;
-n c
-100 a
-300 b
-301 c
-update t1 set n=400,c='a' where n=301;
-ERROR 23000: Duplicate entry 'a' for key 'c'
-insert into t1 values(null, "d");
-select * from t1;
-n c
-100 a
-300 b
-301 c
-302 d
-drop table t1;
-create table t1 (n int not null primary key auto_increment, c char(1), unique(c)) transactional=0 row_format=dynamic;
-insert into t1 values(100, "a");
-insert into t1 values(300, "b");
-insert into t1 values(50, "a");
-ERROR 23000: Duplicate entry 'a' for key 'c'
-insert into t1 values(null, "c");
-select * from t1;
-n c
-100 a
-300 b
-301 c
-update t1 set n=400,c='a' where n=301;
-ERROR 23000: Duplicate entry 'a' for key 'c'
-insert into t1 values(null, "d");
-select * from t1;
-n c
-100 a
-300 b
-301 c
-302 d
-drop table t1;
-create table t1 (n int not null, c char(1)) engine=maria;
-alter table t1 engine=myisam;
-alter table t1 engine=maria;
-show create table t1;
-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
-drop table t1;
-create table t1 (n int not null, c char(1)) engine=maria transactional=1;
-alter table t1 engine=myisam;
-Warnings:
-Error 1478 Table storage engine 'MyISAM' does not support the create option 'TRANSACTIONAL=1'
-alter table t1 engine=maria;
-show create table t1;
-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 TRANSACTIONAL=1
-drop table t1;
-create table t1 (n int not null, c char(1)) engine=myisam transactional=1;
-Warnings:
-Error 1478 Table storage engine 'MyISAM' does not support the create option 'TRANSACTIONAL=1'
-alter table t1 engine=maria;
-show create table t1;
-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 TRANSACTIONAL=1
-drop table t1;
-create table t1 (a int, key(a)) transactional=0;
-insert into t1 values (0),(1),(2),(3),(4);
-insert into t1 select NULL from t1;
-check table t1;
-Table Op Msg_type Msg_text
-test.t1 check status OK
-drop table t1;
-create temporary table t1 (a int, key(a)) transactional=1;
-create temporary table t2 (a int, key(a)) transactional=1;
-insert into t1 values (0),(1),(2),(3),(4);
-insert into t2 select * from t1;
-insert into t1 select NULL from t2;
-select count(*) from t1;
-count(*)
-10
-select count(*) from t1 where a >= 4;
-count(*)
-1
-drop table t1;
-create table t1 (i int auto_increment not null primary key) transactional=0;
-check table t1 extended;
-Table Op Msg_type Msg_text
-test.t1 check status OK
-delete from t1 where i = 10;
-check table t1 extended;
-Table Op Msg_type Msg_text
-test.t1 check status OK
-drop table t1;
-create table t1 (i int auto_increment not null primary key);
-check table t1 extended;
-Table Op Msg_type Msg_text
-test.t1 check status OK
-delete from t1 where i = 10;
-check table t1 extended;
-Table Op Msg_type Msg_text
-test.t1 check status OK
-drop table t1;
-CREATE TABLE t1(a VARCHAR(20), FULLTEXT(a)) transactional=0;
-INSERT INTO t1 VALUES('Offside'),('City Of God');
-SELECT a FROM t1 WHERE MATCH a AGAINST ('+city of*' IN BOOLEAN MODE);
-a
-City Of God
-SELECT a FROM t1 WHERE MATCH a AGAINST ('+city (of)*' IN BOOLEAN MODE);
-a
-City Of God
-DROP TABLE t1;
-create table t1(a int) engine=maria transactional=1;
-select CREATE_OPTIONS from information_schema.TABLES where
-TABLE_SCHEMA='test' and TABLE_NAME='t1';
-CREATE_OPTIONS
-transactional=1
-drop table t1;
=== added file 'mysql-test/r/maria3.result'
--- a/mysql-test/r/maria3.result 1970-01-01 00:00:00 +0000
+++ b/mysql-test/r/maria3.result 2008-07-01 20:47:09 +0000
@@ -0,0 +1,542 @@
+select * from INFORMATION_SCHEMA.ENGINES where ENGINE="MARIA";
+ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
+MARIA YES Crash-safe tables with MyISAM heritage YES NO NO
+set global storage_engine=maria;
+set session storage_engine=maria;
+set global maria_page_checksum=0;
+set global maria_log_file_size=4294967295;
+drop table if exists t1,t2;
+SET SQL_WARNINGS=1;
+create table t1 (a int not null, key `a` (a) key_block_size=512);
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) NOT NULL,
+ KEY `a` (`a`) KEY_BLOCK_SIZE=8192
+) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
+drop table t1;
+create table t1 (a varchar(2048), key `a` (a) key_block_size=1000000000000000000);
+Warnings:
+Warning 1071 Specified key was too long; max key length is 1112 bytes
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(2048) DEFAULT NULL,
+ KEY `a` (`a`(1112)) KEY_BLOCK_SIZE=8192
+) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
+drop table t1;
+create table t1 (a int not null, key `a` (a) key_block_size=1025);
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) NOT NULL,
+ KEY `a` (`a`) KEY_BLOCK_SIZE=8192
+) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
+drop table t1;
+create table t1 (a int not null, key key_block_size=1024 (a));
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '=1024 (a))' at line 1
+create table t1 (a int not null, key `a` key_block_size=1024 (a));
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'key_block_size=1024 (a))' at line 1
+CREATE TABLE t1 (
+c1 INT,
+c2 VARCHAR(300),
+KEY (c1) KEY_BLOCK_SIZE 1024,
+KEY (c2) KEY_BLOCK_SIZE 8192
+);
+INSERT INTO t1 VALUES (10, REPEAT('a', CEIL(RAND(10) * 300))),
+(11, REPEAT('b', CEIL(RAND() * 300))),
+(12, REPEAT('c', CEIL(RAND() * 300))),
+(13, REPEAT('d', CEIL(RAND() * 300))),
+(14, REPEAT('e', CEIL(RAND() * 300))),
+(15, REPEAT('f', CEIL(RAND() * 300))),
+(16, REPEAT('g', CEIL(RAND() * 300))),
+(17, REPEAT('h', CEIL(RAND() * 300))),
+(18, REPEAT('i', CEIL(RAND() * 300))),
+(19, REPEAT('j', CEIL(RAND() * 300))),
+(20, REPEAT('k', CEIL(RAND() * 300))),
+(21, REPEAT('l', CEIL(RAND() * 300))),
+(22, REPEAT('m', CEIL(RAND() * 300))),
+(23, REPEAT('n', CEIL(RAND() * 300))),
+(24, REPEAT('o', CEIL(RAND() * 300))),
+(25, REPEAT('p', CEIL(RAND() * 300))),
+(26, REPEAT('q', CEIL(RAND() * 300))),
+(27, REPEAT('r', CEIL(RAND() * 300))),
+(28, REPEAT('s', CEIL(RAND() * 300))),
+(29, REPEAT('t', CEIL(RAND() * 300))),
+(30, REPEAT('u', CEIL(RAND() * 300))),
+(31, REPEAT('v', CEIL(RAND() * 300))),
+(32, REPEAT('w', CEIL(RAND() * 300))),
+(33, REPEAT('x', CEIL(RAND() * 300))),
+(34, REPEAT('y', CEIL(RAND() * 300))),
+(35, REPEAT('z', CEIL(RAND() * 300)));
+INSERT INTO t1 SELECT * FROM t1;
+INSERT INTO t1 SELECT * FROM t1;
+CHECK TABLE t1;
+Table Op Msg_type Msg_text
+test.t1 check status OK
+REPAIR TABLE t1;
+Table Op Msg_type Msg_text
+test.t1 repair status OK
+DELETE FROM t1 WHERE c1 >= 10;
+CHECK TABLE t1;
+Table Op Msg_type Msg_text
+test.t1 check status OK
+DROP TABLE t1;
+create table t1 (a int) transactional=0;
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL
+) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0 TRANSACTIONAL=0
+drop table t1;
+create table t1 (a int) row_format=dynamic transactional=0;
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL
+) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0 ROW_FORMAT=DYNAMIC TRANSACTIONAL=0
+drop table t1;
+create table t1 (a int) row_format=dynamic transactional=1;
+Warnings:
+Note 1478 Row format set to PAGE because of TRANSACTIONAL=1 option
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL
+) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0 ROW_FORMAT=PAGE TRANSACTIONAL=1
+alter table t1 row_format=PAGE;
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL
+) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0 ROW_FORMAT=PAGE TRANSACTIONAL=1
+alter table t1 row_format=DYNAMIC;
+Warnings:
+Note 1478 Row format set to PAGE because of TRANSACTIONAL=1 option
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL
+) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0 ROW_FORMAT=PAGE TRANSACTIONAL=1
+alter table t1 transactional=0;
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL
+) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0 ROW_FORMAT=PAGE TRANSACTIONAL=0
+alter table t1 row_format=DYNAMIC;
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL
+) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0 ROW_FORMAT=DYNAMIC TRANSACTIONAL=0
+drop table t1;
+create table t1 (a int) row_format=PAGE;
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL
+) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0 ROW_FORMAT=PAGE
+drop table t1;
+create table t1 (a int) row_format=PAGE TRANSACTIONAL=DEFAULT;
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL
+) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0 ROW_FORMAT=PAGE
+alter table t1 row_format=DYNAMIC;
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL
+) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0 ROW_FORMAT=DYNAMIC
+drop table t1;
+create table `t1` (
+t1_name varchar(255) default null,
+t1_id int(10) unsigned not null auto_increment,
+key (t1_name),
+primary key (t1_id)
+) engine=maria auto_increment = 1000 default charset=latin1;
+lock tables t1 write;
+INSERT INTO `t1` VALUES ('bla',1000),('bla',1001),('bla',1002);
+check table t1;
+Table Op Msg_type Msg_text
+test.t1 check status OK
+unlock tables;
+create table t2 like t1;
+insert into t2 select * from t1;
+analyze table t2;
+Table Op Msg_type Msg_text
+test.t2 analyze status Table is already up to date
+delete from t2;
+insert into t2 select * from t1;
+analyze table t2;
+Table Op Msg_type Msg_text
+test.t2 analyze status Table is already up to date
+drop table t1,t2;
+create table t1 (a bigint auto_increment, primary key(a), b char(255), c varchar(20000));
+update t1 set b=repeat('a',100) where a between 1 and 100;
+check table t1;
+Table Op Msg_type Msg_text
+test.t1 check status OK
+update t1 set c=repeat('a',8192*2) where a between 200 and 202;
+check table t1;
+Table Op Msg_type Msg_text
+test.t1 check status OK
+drop table t1;
+CREATE TABLE t1 (a int, b int, v varchar(60000)) checksum=1 engine=maria;
+insert into t1 values (1,1,"aaa"),(1,2,null);
+checksum table t1;
+Table Checksum
+test.t1 1112804611
+lock table t1 write;
+insert into t1 values (1,3,repeat('c',30000)),(4,4,repeat('a',30000));
+update t1 set v="row5" where b=4;
+delete from t1 where b=3;
+select a, b, length(v) from t1;
+a b length(v)
+1 1 3
+1 2 NULL
+4 4 4
+drop table t1;
+CREATE TABLE t1 (
+auto int(5) unsigned NOT NULL auto_increment,
+string char(10) default "hello",
+tiny tinyint(4) DEFAULT '0' NOT NULL ,
+short smallint(6) DEFAULT '1' NOT NULL ,
+medium mediumint(8) DEFAULT '0' NOT NULL,
+long_int int(11) DEFAULT '0' NOT NULL,
+longlong bigint(13) DEFAULT '0' NOT NULL,
+real_float float(13,1) DEFAULT 0.0 NOT NULL,
+real_double double(16,4),
+utiny tinyint(3) unsigned DEFAULT '0' NOT NULL,
+ushort smallint(5) unsigned zerofill DEFAULT '00000' NOT NULL,
+umedium mediumint(8) unsigned DEFAULT '0' NOT NULL,
+ulong int(11) unsigned DEFAULT '0' NOT NULL,
+ulonglong bigint(13) unsigned DEFAULT '0' NOT NULL,
+time_stamp timestamp,
+date_field date,
+time_field time,
+date_time datetime,
+blob_col blob,
+tinyblob_col tinyblob,
+mediumblob_col mediumblob not null default '',
+longblob_col longblob not null default '',
+options enum('one','two','tree') not null ,
+flags set('one','two','tree') not null default '',
+PRIMARY KEY (auto),
+KEY (utiny),
+KEY (tiny),
+KEY (short),
+KEY any_name (medium),
+KEY (longlong),
+KEY (real_float),
+KEY (ushort),
+KEY (umedium),
+KEY (ulong),
+KEY (ulonglong,ulong),
+KEY (options,flags)
+) engine=maria;
+insert into t1 values (10,1,1,1,1,1,1,1,1,1,1,1,1,1,NULL,0,0,0,1,1,1,1,'one','one');
+create table t2 (primary key (auto)) engine=maria row_format=page select auto+1 as auto,1 as t1, 'a' as t2, repeat('a',256) as t3, binary repeat('b',256) as t4, repeat('a',4096) as t5, binary repeat('b',4096) as t6, '' as t7, binary '' as t8 from t1;
+check table t1,t2;
+Table Op Msg_type Msg_text
+test.t1 check status OK
+test.t2 check status OK
+select t1,t2,length(t3),length(t4),length(t5),length(t6),t7,t8 from t2;
+t1 t2 length(t3) length(t4) length(t5) length(t6) t7 t8
+1 a 256 256 4096 4096
+drop table t2;
+create table t2 (primary key (auto)) engine=maria row_format=dynamic select auto+1 as auto,1 as t1, 'a' as t2, repeat('a',256) as t3, binary repeat('b',256) as t4, repeat('a',4096) as t5, binary repeat('b',4096) as t6, '' as t7, binary '' as t8 from t1;
+check table t2;
+Table Op Msg_type Msg_text
+test.t2 check status OK
+drop table t1,t2;
+CREATE TABLE t1 (seq int, s1 int, s2 blob);
+insert into t1 values (1, 1, MD5(1));
+update t1 set s1=2 where seq=1;
+check table t1 extended;
+Table Op Msg_type Msg_text
+test.t1 check status OK
+drop table t1;
+show variables like 'maria%';
+Variable_name Value
+maria_block_size 8192
+maria_checkpoint_interval 30
+maria_force_start_after_recovery_failures 0
+maria_log_file_size 4294959104
+maria_log_purge_type immediate
+maria_max_sort_file_size 9223372036854775807
+maria_page_checksum OFF
+maria_pagecache_age_threshold 300
+maria_pagecache_buffer_size 8388600
+maria_pagecache_division_limit 100
+maria_recover OFF
+maria_repair_threads 1
+maria_sort_buffer_size 8388608
+maria_stats_method nulls_unequal
+maria_sync_log_dir NEWFILE
+show status like 'maria%';
+Variable_name Value
+Maria_pagecache_blocks_not_flushed #
+Maria_pagecache_blocks_unused #
+Maria_pagecache_blocks_used #
+Maria_pagecache_read_requests #
+Maria_pagecache_reads #
+Maria_pagecache_write_requests #
+Maria_pagecache_writes #
+create table t1 (b char(0));
+insert into t1 values(NULL),("");
+select length(b) from t1;
+length(b)
+NULL
+0
+alter table t1 add column c char(0), add key (c);
+insert into t1 values("",""),("",NULL);
+select length(b),length(c) from t1;
+length(b) length(c)
+NULL NULL
+0 NULL
+0 0
+0 NULL
+select length(b),length(c) from t1 where c is null;
+length(b) length(c)
+NULL NULL
+0 NULL
+0 NULL
+select length(b),length(c) from t1 where c is not null;
+length(b) length(c)
+0 0
+select length(b),length(c) from t1 order by c;
+length(b) length(c)
+NULL NULL
+0 NULL
+0 NULL
+0 0
+alter table t1 add column d char(0) not null, add key (d);
+ERROR 42000: The used storage engine can't index column 'd'
+drop table t1;
+CREATE TABLE t1 (a bit(3));
+insert into t1 values (NULL),(0),(1),(2),(3),(4),(5),(6),(7);
+select hex(a) from t1;
+hex(a)
+NULL
+0
+1
+2
+3
+4
+5
+6
+7
+drop table t1;
+create table t1(a bit not null);
+insert into t1 values(0),(1);
+select a+0 from t1;
+a+0
+0
+1
+drop table t1;
+CREATE TABLE t1 (col1 int, s1 char(16) DEFAULT NULL, s2 char(16) DEFAULT NULL, KEY (s1,s2));
+insert into t1 (col1) values(0);
+drop table t1;
+set global maria_page_checksum=1;
+create table t1 (a int);
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL
+) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
+drop table t1;
+set global maria_log_file_size=4294967296;
+Warnings:
+Warning 1292 Truncated incorrect log_file_size value: '4294967296'
+create table t1 (a int not null);
+lock tables t1 write;
+insert into t1 values (1),(2);
+delete from t1;
+unlock tables;
+select * from t1;
+a
+insert into t1 values (1),(2);
+delete from t1;
+select * from t1;
+a
+drop table t1;
+create table t1 (c int);
+insert into t1 values(1),(2);
+create table t2 select * from t1;
+create table t3 select * from t1, t2;
+ERROR 42S21: Duplicate column name 'c'
+create table t3 select t1.c AS c1, t2.c AS c2,1 as "const" from t1, t2;
+drop table t1, t2, t3;
+create table t1 (t datetime) engine=maria;
+insert into t1 values (101),(691231),(700101),(991231),(10000101),(99991231),(101000000),(691231000000),(700101000000),(991231235959),(10000101000000),(99991231235959),(20030100000000),(20030000000000);
+select * from t1;
+t
+2000-01-01 00:00:00
+2069-12-31 00:00:00
+1970-01-01 00:00:00
+1999-12-31 00:00:00
+1000-01-01 00:00:00
+9999-12-31 00:00:00
+2000-01-01 00:00:00
+2069-12-31 00:00:00
+1970-01-01 00:00:00
+1999-12-31 23:59:59
+1000-01-01 00:00:00
+9999-12-31 23:59:59
+2003-01-00 00:00:00
+2003-00-00 00:00:00
+optimize table t1;
+Table Op Msg_type Msg_text
+test.t1 optimize status OK
+check table t1;
+Table Op Msg_type Msg_text
+test.t1 check status OK
+delete from t1 where t > 0;
+optimize table t1;
+Table Op Msg_type Msg_text
+test.t1 optimize status OK
+check table t1;
+Table Op Msg_type Msg_text
+test.t1 check status OK
+drop table t1;
+SET SQL_MODE='NO_AUTO_VALUE_ON_ZERO';
+CREATE TABLE t1 (id int(11) PRIMARY KEY auto_increment,f1 varchar(10) NOT NULL UNIQUE);
+INSERT IGNORE INTO t1 (f1) VALUES ("test1");
+INSERT IGNORE INTO t1 (f1) VALUES ("test1");
+INSERT IGNORE INTO t1 (f1) VALUES ("test2");
+SELECT * FROM t1;
+id f1
+1 test1
+2 test2
+drop table t1;
+SET SQL_MODE = 'TRADITIONAL';
+create table t1 (n int not null primary key auto_increment, c char(1), unique(c));
+insert into t1 values(100, "a");
+insert into t1 values(300, "b");
+insert into t1 values(50, "a");
+ERROR 23000: Duplicate entry 'a' for key 'c'
+insert into t1 values(null, "c");
+select * from t1;
+n c
+100 a
+300 b
+301 c
+update t1 set n=400,c='a' where n=301;
+ERROR 23000: Duplicate entry 'a' for key 'c'
+insert into t1 values(null, "d");
+select * from t1;
+n c
+100 a
+300 b
+301 c
+302 d
+drop table t1;
+create table t1 (n int not null primary key auto_increment, c char(1), unique(c)) transactional=0 row_format=dynamic;
+insert into t1 values(100, "a");
+insert into t1 values(300, "b");
+insert into t1 values(50, "a");
+ERROR 23000: Duplicate entry 'a' for key 'c'
+insert into t1 values(null, "c");
+select * from t1;
+n c
+100 a
+300 b
+301 c
+update t1 set n=400,c='a' where n=301;
+ERROR 23000: Duplicate entry 'a' for key 'c'
+insert into t1 values(null, "d");
+select * from t1;
+n c
+100 a
+300 b
+301 c
+302 d
+drop table t1;
+create table t1 (n int not null, c char(1)) engine=maria;
+alter table t1 engine=myisam;
+alter table t1 engine=maria;
+show create table t1;
+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
+drop table t1;
+create table t1 (n int not null, c char(1)) engine=maria transactional=1;
+alter table t1 engine=myisam;
+Warnings:
+Error 1478 Table storage engine 'MyISAM' does not support the create option 'TRANSACTIONAL=1'
+alter table t1 engine=maria;
+show create table t1;
+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 TRANSACTIONAL=1
+drop table t1;
+create table t1 (n int not null, c char(1)) engine=myisam transactional=1;
+Warnings:
+Error 1478 Table storage engine 'MyISAM' does not support the create option 'TRANSACTIONAL=1'
+alter table t1 engine=maria;
+show create table t1;
+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 TRANSACTIONAL=1
+drop table t1;
+create table t1 (a int, key(a)) transactional=0;
+insert into t1 values (0),(1),(2),(3),(4);
+insert into t1 select NULL from t1;
+check table t1;
+Table Op Msg_type Msg_text
+test.t1 check status OK
+drop table t1;
+create temporary table t1 (a int, key(a)) transactional=1;
+create temporary table t2 (a int, key(a)) transactional=1;
+insert into t1 values (0),(1),(2),(3),(4);
+insert into t2 select * from t1;
+insert into t1 select NULL from t2;
+select count(*) from t1;
+count(*)
+10
+select count(*) from t1 where a >= 4;
+count(*)
+1
+drop table t1;
+create table t1 (i int auto_increment not null primary key) transactional=0;
+check table t1 extended;
+Table Op Msg_type Msg_text
+test.t1 check status OK
+delete from t1 where i = 10;
+check table t1 extended;
+Table Op Msg_type Msg_text
+test.t1 check status OK
+drop table t1;
+create table t1 (i int auto_increment not null primary key);
+check table t1 extended;
+Table Op Msg_type Msg_text
+test.t1 check status OK
+delete from t1 where i = 10;
+check table t1 extended;
+Table Op Msg_type Msg_text
+test.t1 check status OK
+drop table t1;
+CREATE TABLE t1(a VARCHAR(20), FULLTEXT(a)) transactional=0;
+INSERT INTO t1 VALUES('Offside'),('City Of God');
+SELECT a FROM t1 WHERE MATCH a AGAINST ('+city of*' IN BOOLEAN MODE);
+a
+City Of God
+SELECT a FROM t1 WHERE MATCH a AGAINST ('+city (of)*' IN BOOLEAN MODE);
+a
+City Of God
+DROP TABLE t1;
+create table t1(a int) engine=maria transactional=1;
+select CREATE_OPTIONS from information_schema.TABLES where
+TABLE_SCHEMA='test' and TABLE_NAME='t1';
+CREATE_OPTIONS
+transactional=1
+drop table t1;
=== modified file 'mysql-test/suite/funcs_1/datadict/processlist_priv.inc'
--- a/mysql-test/suite/funcs_1/datadict/processlist_priv.inc 2008-03-07 19:18:14 +0000
+++ b/mysql-test/suite/funcs_1/datadict/processlist_priv.inc 2008-07-01 20:47:09 +0000
@@ -111,6 +111,7 @@ connect (con100,localhost,ddicttestuser1
--echo SHOW/SELECT shows all processes/threads.
--echo ####################################################################################
connection default;
+--replace_result ENGINE=MyISAM "" ENGINE=MARIA "" " PAGE_CHECKSUM=1" "" " PAGE_CHECKSUM=0" ""
eval SHOW CREATE TABLE $table;
--replace_column 1 ID 6 TIME
eval SHOW $table;
@@ -127,6 +128,7 @@ eval SELECT $columns FROM $table $select
connection con100;
--echo SHOW/SELECT shows only the processes (1) of the user.
--echo ####################################################################################
+--replace_result ENGINE=MyISAM "" ENGINE=MARIA "" " PAGE_CHECKSUM=1" "" " PAGE_CHECKSUM=0" ""
eval SHOW CREATE TABLE $table;
--replace_column 1 ID 6 TIME
eval SHOW $table;
=== modified file 'mysql-test/suite/funcs_1/datadict/processlist_val.inc'
--- a/mysql-test/suite/funcs_1/datadict/processlist_val.inc 2008-03-07 19:18:14 +0000
+++ b/mysql-test/suite/funcs_1/datadict/processlist_val.inc 2008-07-01 20:47:09 +0000
@@ -53,6 +53,7 @@ CREATE TABLE test.t1 (f1 BIGINT);
# Show the definition of the PROCESSLIST table
#--------------------------------------------------------------------------
+--replace_result ENGINE=MyISAM "" ENGINE=MARIA "" " PAGE_CHECKSUM=1" "" " PAGE_CHECKSUM=0" ""
SHOW CREATE TABLE INFORMATION_SCHEMA.PROCESSLIST;
=== modified file 'mysql-test/suite/funcs_1/datadict/tables2.inc'
--- a/mysql-test/suite/funcs_1/datadict/tables2.inc 2008-03-07 16:33:07 +0000
+++ b/mysql-test/suite/funcs_1/datadict/tables2.inc 2008-07-01 20:47:09 +0000
@@ -29,6 +29,7 @@
let $innodb_pattern = 'InnoDB free';
let $ndb_pattern = 'number_of_replicas';
--vertical_results
+--replace_result Dynamic DYNAMIC_OR_PAGE Page DYNAMIC_OR_PAGE MyISAM MYISAM_OR_MARIA MARIA MYISAM_OR_MARIA
--replace_column 8 "#TBLR#" 9 "#ARL#" 10 "#DL#" 11 "#MDL#" 12 "#IL#" 13 "#DF#" 15 "#CRT#" 16 "#UT#" 17 "#CT#" 20 "#CO#" 21 "#TC#"
eval
SELECT *,
=== renamed file 'mysql-test/suite/funcs_1/r/is_collation_character_set_applicability.result' => 'mysql-test/suite/funcs_1/r/is_collation_charset_applic.result'
=== modified file 'mysql-test/suite/funcs_1/r/is_columns.result'
--- a/mysql-test/suite/funcs_1/r/is_columns.result 2008-03-07 19:18:14 +0000
+++ b/mysql-test/suite/funcs_1/r/is_columns.result 2008-07-01 20:47:09 +0000
@@ -69,7 +69,7 @@ COLUMNS CREATE TEMPORARY TABLE `COLUMNS`
`EXTRA` varchar(27) NOT NULL DEFAULT '',
`PRIVILEGES` varchar(80) NOT NULL DEFAULT '',
`COLUMN_COMMENT` varchar(255) NOT NULL DEFAULT ''
-) ENGINE=MyISAM DEFAULT CHARSET=utf8
+) DEFAULT CHARSET=utf8
SHOW COLUMNS FROM information_schema.COLUMNS;
Field Type Null Key Default Extra
TABLE_CATALOG varchar(512) YES NULL
=== modified file 'mysql-test/suite/funcs_1/r/is_events.result'
--- a/mysql-test/suite/funcs_1/r/is_events.result 2008-03-07 19:18:14 +0000
+++ b/mysql-test/suite/funcs_1/r/is_events.result 2008-07-01 20:47:09 +0000
@@ -79,7 +79,7 @@ EVENTS CREATE TEMPORARY TABLE `EVENTS` (
`CHARACTER_SET_CLIENT` varchar(32) NOT NULL DEFAULT '',
`COLLATION_CONNECTION` varchar(32) NOT NULL DEFAULT '',
`DATABASE_COLLATION` varchar(32) NOT NULL DEFAULT ''
-) ENGINE=MyISAM DEFAULT CHARSET=utf8
+) DEFAULT CHARSET=utf8
SHOW COLUMNS FROM information_schema.EVENTS;
Field Type Null Key Default Extra
EVENT_CATALOG varchar(64) YES NULL
=== modified file 'mysql-test/suite/funcs_1/r/is_routines.result'
--- a/mysql-test/suite/funcs_1/r/is_routines.result 2008-03-07 19:18:14 +0000
+++ b/mysql-test/suite/funcs_1/r/is_routines.result 2008-07-01 20:47:09 +0000
@@ -77,7 +77,7 @@ ROUTINES CREATE TEMPORARY TABLE `ROUTINE
`CHARACTER_SET_CLIENT` varchar(32) NOT NULL DEFAULT '',
`COLLATION_CONNECTION` varchar(32) NOT NULL DEFAULT '',
`DATABASE_COLLATION` varchar(32) NOT NULL DEFAULT ''
-) ENGINE=MyISAM DEFAULT CHARSET=utf8
+) DEFAULT CHARSET=utf8
SHOW COLUMNS FROM information_schema.ROUTINES;
Field Type Null Key Default Extra
SPECIFIC_NAME varchar(64) NO
=== modified file 'mysql-test/suite/funcs_1/r/is_tables_is.result'
--- a/mysql-test/suite/funcs_1/r/is_tables_is.result 2008-03-07 19:18:14 +0000
+++ b/mysql-test/suite/funcs_1/r/is_tables_is.result 2008-07-01 20:47:09 +0000
@@ -86,9 +86,9 @@ TABLE_CATALOG NULL
TABLE_SCHEMA information_schema
TABLE_NAME COLUMNS
TABLE_TYPE SYSTEM VIEW
-ENGINE MyISAM
+ENGINE MYISAM_OR_MARIA
VERSION 10
-ROW_FORMAT Dynamic
+ROW_FORMAT DYNAMIC_OR_PAGE
TABLE_ROWS #TBLR#
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
@@ -155,9 +155,9 @@ TABLE_CATALOG NULL
TABLE_SCHEMA information_schema
TABLE_NAME EVENTS
TABLE_TYPE SYSTEM VIEW
-ENGINE MyISAM
+ENGINE MYISAM_OR_MARIA
VERSION 10
-ROW_FORMAT Dynamic
+ROW_FORMAT DYNAMIC_OR_PAGE
TABLE_ROWS #TBLR#
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
@@ -270,9 +270,9 @@ TABLE_CATALOG NULL
TABLE_SCHEMA information_schema
TABLE_NAME PARTITIONS
TABLE_TYPE SYSTEM VIEW
-ENGINE MyISAM
+ENGINE MYISAM_OR_MARIA
VERSION 10
-ROW_FORMAT Dynamic
+ROW_FORMAT DYNAMIC_OR_PAGE
TABLE_ROWS #TBLR#
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
@@ -293,9 +293,9 @@ TABLE_CATALOG NULL
TABLE_SCHEMA information_schema
TABLE_NAME PLUGINS
TABLE_TYPE SYSTEM VIEW
-ENGINE MyISAM
+ENGINE MYISAM_OR_MARIA
VERSION 10
-ROW_FORMAT Dynamic
+ROW_FORMAT DYNAMIC_OR_PAGE
TABLE_ROWS #TBLR#
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
@@ -316,9 +316,9 @@ TABLE_CATALOG NULL
TABLE_SCHEMA information_schema
TABLE_NAME PROCESSLIST
TABLE_TYPE SYSTEM VIEW
-ENGINE MyISAM
+ENGINE MYISAM_OR_MARIA
VERSION 10
-ROW_FORMAT Dynamic
+ROW_FORMAT DYNAMIC_OR_PAGE
TABLE_ROWS #TBLR#
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
@@ -362,9 +362,9 @@ TABLE_CATALOG NULL
TABLE_SCHEMA information_schema
TABLE_NAME ROUTINES
TABLE_TYPE SYSTEM VIEW
-ENGINE MyISAM
+ENGINE MYISAM_OR_MARIA
VERSION 10
-ROW_FORMAT Dynamic
+ROW_FORMAT DYNAMIC_OR_PAGE
TABLE_ROWS #TBLR#
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
@@ -569,9 +569,9 @@ TABLE_CATALOG NULL
TABLE_SCHEMA information_schema
TABLE_NAME TRIGGERS
TABLE_TYPE SYSTEM VIEW
-ENGINE MyISAM
+ENGINE MYISAM_OR_MARIA
VERSION 10
-ROW_FORMAT Dynamic
+ROW_FORMAT DYNAMIC_OR_PAGE
TABLE_ROWS #TBLR#
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
@@ -615,9 +615,9 @@ TABLE_CATALOG NULL
TABLE_SCHEMA information_schema
TABLE_NAME VIEWS
TABLE_TYPE SYSTEM VIEW
-ENGINE MyISAM
+ENGINE MYISAM_OR_MARIA
VERSION 10
-ROW_FORMAT Dynamic
+ROW_FORMAT DYNAMIC_OR_PAGE
TABLE_ROWS #TBLR#
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
@@ -724,9 +724,9 @@ TABLE_CATALOG NULL
TABLE_SCHEMA information_schema
TABLE_NAME COLUMNS
TABLE_TYPE SYSTEM VIEW
-ENGINE MyISAM
+ENGINE MYISAM_OR_MARIA
VERSION 10
-ROW_FORMAT Dynamic
+ROW_FORMAT DYNAMIC_OR_PAGE
TABLE_ROWS #TBLR#
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
@@ -793,9 +793,9 @@ TABLE_CATALOG NULL
TABLE_SCHEMA information_schema
TABLE_NAME EVENTS
TABLE_TYPE SYSTEM VIEW
-ENGINE MyISAM
+ENGINE MYISAM_OR_MARIA
VERSION 10
-ROW_FORMAT Dynamic
+ROW_FORMAT DYNAMIC_OR_PAGE
TABLE_ROWS #TBLR#
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
@@ -908,9 +908,9 @@ TABLE_CATALOG NULL
TABLE_SCHEMA information_schema
TABLE_NAME PARTITIONS
TABLE_TYPE SYSTEM VIEW
-ENGINE MyISAM
+ENGINE MYISAM_OR_MARIA
VERSION 10
-ROW_FORMAT Dynamic
+ROW_FORMAT DYNAMIC_OR_PAGE
TABLE_ROWS #TBLR#
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
@@ -931,9 +931,9 @@ TABLE_CATALOG NULL
TABLE_SCHEMA information_schema
TABLE_NAME PLUGINS
TABLE_TYPE SYSTEM VIEW
-ENGINE MyISAM
+ENGINE MYISAM_OR_MARIA
VERSION 10
-ROW_FORMAT Dynamic
+ROW_FORMAT DYNAMIC_OR_PAGE
TABLE_ROWS #TBLR#
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
@@ -954,9 +954,9 @@ TABLE_CATALOG NULL
TABLE_SCHEMA information_schema
TABLE_NAME PROCESSLIST
TABLE_TYPE SYSTEM VIEW
-ENGINE MyISAM
+ENGINE MYISAM_OR_MARIA
VERSION 10
-ROW_FORMAT Dynamic
+ROW_FORMAT DYNAMIC_OR_PAGE
TABLE_ROWS #TBLR#
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
@@ -1000,9 +1000,9 @@ TABLE_CATALOG NULL
TABLE_SCHEMA information_schema
TABLE_NAME ROUTINES
TABLE_TYPE SYSTEM VIEW
-ENGINE MyISAM
+ENGINE MYISAM_OR_MARIA
VERSION 10
-ROW_FORMAT Dynamic
+ROW_FORMAT DYNAMIC_OR_PAGE
TABLE_ROWS #TBLR#
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
@@ -1207,9 +1207,9 @@ TABLE_CATALOG NULL
TABLE_SCHEMA information_schema
TABLE_NAME TRIGGERS
TABLE_TYPE SYSTEM VIEW
-ENGINE MyISAM
+ENGINE MYISAM_OR_MARIA
VERSION 10
-ROW_FORMAT Dynamic
+ROW_FORMAT DYNAMIC_OR_PAGE
TABLE_ROWS #TBLR#
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
@@ -1253,9 +1253,9 @@ TABLE_CATALOG NULL
TABLE_SCHEMA information_schema
TABLE_NAME VIEWS
TABLE_TYPE SYSTEM VIEW
-ENGINE MyISAM
+ENGINE MYISAM_OR_MARIA
VERSION 10
-ROW_FORMAT Dynamic
+ROW_FORMAT DYNAMIC_OR_PAGE
TABLE_ROWS #TBLR#
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
=== modified file 'mysql-test/suite/funcs_1/r/is_tables_myisam.result'
--- a/mysql-test/suite/funcs_1/r/is_tables_myisam.result 2008-03-11 18:54:35 +0000
+++ b/mysql-test/suite/funcs_1/r/is_tables_myisam.result 2008-07-01 20:47:09 +0000
@@ -415,7 +415,7 @@ TABLE_CATALOG NULL
TABLE_SCHEMA test
TABLE_NAME t1
TABLE_TYPE BASE TABLE
-ENGINE MyISAM
+ENGINE MYISAM_OR_MARIA
VERSION 10
ROW_FORMAT Fixed
TABLE_ROWS #TBLR#
@@ -438,7 +438,7 @@ TABLE_CATALOG NULL
TABLE_SCHEMA test
TABLE_NAME t10
TABLE_TYPE BASE TABLE
-ENGINE MyISAM
+ENGINE MYISAM_OR_MARIA
VERSION 10
ROW_FORMAT Fixed
TABLE_ROWS #TBLR#
@@ -461,7 +461,7 @@ TABLE_CATALOG NULL
TABLE_SCHEMA test
TABLE_NAME t11
TABLE_TYPE BASE TABLE
-ENGINE MyISAM
+ENGINE MYISAM_OR_MARIA
VERSION 10
ROW_FORMAT Fixed
TABLE_ROWS #TBLR#
@@ -484,7 +484,7 @@ TABLE_CATALOG NULL
TABLE_SCHEMA test
TABLE_NAME t2
TABLE_TYPE BASE TABLE
-ENGINE MyISAM
+ENGINE MYISAM_OR_MARIA
VERSION 10
ROW_FORMAT Fixed
TABLE_ROWS #TBLR#
@@ -507,7 +507,7 @@ TABLE_CATALOG NULL
TABLE_SCHEMA test
TABLE_NAME t3
TABLE_TYPE BASE TABLE
-ENGINE MyISAM
+ENGINE MYISAM_OR_MARIA
VERSION 10
ROW_FORMAT Fixed
TABLE_ROWS #TBLR#
@@ -530,7 +530,7 @@ TABLE_CATALOG NULL
TABLE_SCHEMA test
TABLE_NAME t4
TABLE_TYPE BASE TABLE
-ENGINE MyISAM
+ENGINE MYISAM_OR_MARIA
VERSION 10
ROW_FORMAT Fixed
TABLE_ROWS #TBLR#
@@ -553,7 +553,7 @@ TABLE_CATALOG NULL
TABLE_SCHEMA test
TABLE_NAME t7
TABLE_TYPE BASE TABLE
-ENGINE MyISAM
+ENGINE MYISAM_OR_MARIA
VERSION 10
ROW_FORMAT Fixed
TABLE_ROWS #TBLR#
@@ -576,7 +576,7 @@ TABLE_CATALOG NULL
TABLE_SCHEMA test
TABLE_NAME t8
TABLE_TYPE BASE TABLE
-ENGINE MyISAM
+ENGINE MYISAM_OR_MARIA
VERSION 10
ROW_FORMAT Fixed
TABLE_ROWS #TBLR#
@@ -599,7 +599,7 @@ TABLE_CATALOG NULL
TABLE_SCHEMA test
TABLE_NAME t9
TABLE_TYPE BASE TABLE
-ENGINE MyISAM
+ENGINE MYISAM_OR_MARIA
VERSION 10
ROW_FORMAT Fixed
TABLE_ROWS #TBLR#
@@ -622,9 +622,9 @@ TABLE_CATALOG NULL
TABLE_SCHEMA test
TABLE_NAME tb1
TABLE_TYPE BASE TABLE
-ENGINE MyISAM
+ENGINE MYISAM_OR_MARIA
VERSION 10
-ROW_FORMAT Dynamic
+ROW_FORMAT DYNAMIC_OR_PAGE
TABLE_ROWS #TBLR#
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
@@ -645,9 +645,9 @@ TABLE_CATALOG NULL
TABLE_SCHEMA test
TABLE_NAME tb2
TABLE_TYPE BASE TABLE
-ENGINE MyISAM
+ENGINE MYISAM_OR_MARIA
VERSION 10
-ROW_FORMAT Dynamic
+ROW_FORMAT DYNAMIC_OR_PAGE
TABLE_ROWS #TBLR#
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
@@ -668,9 +668,9 @@ TABLE_CATALOG NULL
TABLE_SCHEMA test
TABLE_NAME tb3
TABLE_TYPE BASE TABLE
-ENGINE MyISAM
+ENGINE MYISAM_OR_MARIA
VERSION 10
-ROW_FORMAT Dynamic
+ROW_FORMAT DYNAMIC_OR_PAGE
TABLE_ROWS #TBLR#
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
@@ -691,9 +691,9 @@ TABLE_CATALOG NULL
TABLE_SCHEMA test
TABLE_NAME tb4
TABLE_TYPE BASE TABLE
-ENGINE MyISAM
+ENGINE MYISAM_OR_MARIA
VERSION 10
-ROW_FORMAT Dynamic
+ROW_FORMAT DYNAMIC_OR_PAGE
TABLE_ROWS #TBLR#
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
@@ -714,9 +714,9 @@ TABLE_CATALOG NULL
TABLE_SCHEMA test1
TABLE_NAME tb2
TABLE_TYPE BASE TABLE
-ENGINE MyISAM
+ENGINE MYISAM_OR_MARIA
VERSION 10
-ROW_FORMAT Dynamic
+ROW_FORMAT DYNAMIC_OR_PAGE
TABLE_ROWS #TBLR#
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
@@ -737,7 +737,7 @@ TABLE_CATALOG NULL
TABLE_SCHEMA test4
TABLE_NAME t6
TABLE_TYPE BASE TABLE
-ENGINE MyISAM
+ENGINE MYISAM_OR_MARIA
VERSION 10
ROW_FORMAT Fixed
TABLE_ROWS #TBLR#
@@ -776,7 +776,7 @@ TABLE_CATALOG NULL
TABLE_SCHEMA test
TABLE_NAME t1
TABLE_TYPE BASE TABLE
-ENGINE MyISAM
+ENGINE MYISAM_OR_MARIA
VERSION 10
ROW_FORMAT Fixed
TABLE_ROWS #TBLR#
@@ -799,7 +799,7 @@ TABLE_CATALOG NULL
TABLE_SCHEMA test
TABLE_NAME t10
TABLE_TYPE BASE TABLE
-ENGINE MyISAM
+ENGINE MYISAM_OR_MARIA
VERSION 10
ROW_FORMAT Fixed
TABLE_ROWS #TBLR#
@@ -822,7 +822,7 @@ TABLE_CATALOG NULL
TABLE_SCHEMA test
TABLE_NAME t11
TABLE_TYPE BASE TABLE
-ENGINE MyISAM
+ENGINE MYISAM_OR_MARIA
VERSION 10
ROW_FORMAT Fixed
TABLE_ROWS #TBLR#
@@ -845,7 +845,7 @@ TABLE_CATALOG NULL
TABLE_SCHEMA test
TABLE_NAME t2
TABLE_TYPE BASE TABLE
-ENGINE MyISAM
+ENGINE MYISAM_OR_MARIA
VERSION 10
ROW_FORMAT Fixed
TABLE_ROWS #TBLR#
@@ -868,7 +868,7 @@ TABLE_CATALOG NULL
TABLE_SCHEMA test
TABLE_NAME t3
TABLE_TYPE BASE TABLE
-ENGINE MyISAM
+ENGINE MYISAM_OR_MARIA
VERSION 10
ROW_FORMAT Fixed
TABLE_ROWS #TBLR#
@@ -891,7 +891,7 @@ TABLE_CATALOG NULL
TABLE_SCHEMA test
TABLE_NAME t4
TABLE_TYPE BASE TABLE
-ENGINE MyISAM
+ENGINE MYISAM_OR_MARIA
VERSION 10
ROW_FORMAT Fixed
TABLE_ROWS #TBLR#
@@ -914,7 +914,7 @@ TABLE_CATALOG NULL
TABLE_SCHEMA test
TABLE_NAME t7
TABLE_TYPE BASE TABLE
-ENGINE MyISAM
+ENGINE MYISAM_OR_MARIA
VERSION 10
ROW_FORMAT Fixed
TABLE_ROWS #TBLR#
@@ -937,7 +937,7 @@ TABLE_CATALOG NULL
TABLE_SCHEMA test
TABLE_NAME t8
TABLE_TYPE BASE TABLE
-ENGINE MyISAM
+ENGINE MYISAM_OR_MARIA
VERSION 10
ROW_FORMAT Fixed
TABLE_ROWS #TBLR#
@@ -960,7 +960,7 @@ TABLE_CATALOG NULL
TABLE_SCHEMA test
TABLE_NAME t9
TABLE_TYPE BASE TABLE
-ENGINE MyISAM
+ENGINE MYISAM_OR_MARIA
VERSION 10
ROW_FORMAT Fixed
TABLE_ROWS #TBLR#
@@ -983,9 +983,9 @@ TABLE_CATALOG NULL
TABLE_SCHEMA test
TABLE_NAME tb1
TABLE_TYPE BASE TABLE
-ENGINE MyISAM
+ENGINE MYISAM_OR_MARIA
VERSION 10
-ROW_FORMAT Dynamic
+ROW_FORMAT DYNAMIC_OR_PAGE
TABLE_ROWS #TBLR#
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
@@ -1006,9 +1006,9 @@ TABLE_CATALOG NULL
TABLE_SCHEMA test
TABLE_NAME tb2
TABLE_TYPE BASE TABLE
-ENGINE MyISAM
+ENGINE MYISAM_OR_MARIA
VERSION 10
-ROW_FORMAT Dynamic
+ROW_FORMAT DYNAMIC_OR_PAGE
TABLE_ROWS #TBLR#
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
@@ -1029,9 +1029,9 @@ TABLE_CATALOG NULL
TABLE_SCHEMA test
TABLE_NAME tb3
TABLE_TYPE BASE TABLE
-ENGINE MyISAM
+ENGINE MYISAM_OR_MARIA
VERSION 10
-ROW_FORMAT Dynamic
+ROW_FORMAT DYNAMIC_OR_PAGE
TABLE_ROWS #TBLR#
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
@@ -1052,9 +1052,9 @@ TABLE_CATALOG NULL
TABLE_SCHEMA test
TABLE_NAME tb4
TABLE_TYPE BASE TABLE
-ENGINE MyISAM
+ENGINE MYISAM_OR_MARIA
VERSION 10
-ROW_FORMAT Dynamic
+ROW_FORMAT DYNAMIC_OR_PAGE
TABLE_ROWS #TBLR#
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
=== modified file 'mysql-test/suite/funcs_1/r/is_tables_mysql.result'
--- a/mysql-test/suite/funcs_1/r/is_tables_mysql.result 2008-03-07 19:18:14 +0000
+++ b/mysql-test/suite/funcs_1/r/is_tables_mysql.result 2008-07-01 20:47:09 +0000
@@ -16,7 +16,7 @@ TABLE_CATALOG NULL
TABLE_SCHEMA mysql
TABLE_NAME columns_priv
TABLE_TYPE BASE TABLE
-ENGINE MyISAM
+ENGINE MYISAM_OR_MARIA
VERSION 10
ROW_FORMAT Fixed
TABLE_ROWS #TBLR#
@@ -39,7 +39,7 @@ TABLE_CATALOG NULL
TABLE_SCHEMA mysql
TABLE_NAME db
TABLE_TYPE BASE TABLE
-ENGINE MyISAM
+ENGINE MYISAM_OR_MARIA
VERSION 10
ROW_FORMAT Fixed
TABLE_ROWS #TBLR#
@@ -62,9 +62,9 @@ TABLE_CATALOG NULL
TABLE_SCHEMA mysql
TABLE_NAME event
TABLE_TYPE BASE TABLE
-ENGINE MyISAM
+ENGINE MYISAM_OR_MARIA
VERSION 10
-ROW_FORMAT Dynamic
+ROW_FORMAT DYNAMIC_OR_PAGE
TABLE_ROWS #TBLR#
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
@@ -85,7 +85,7 @@ TABLE_CATALOG NULL
TABLE_SCHEMA mysql
TABLE_NAME func
TABLE_TYPE BASE TABLE
-ENGINE MyISAM
+ENGINE MYISAM_OR_MARIA
VERSION 10
ROW_FORMAT Fixed
TABLE_ROWS #TBLR#
@@ -110,7 +110,7 @@ TABLE_NAME general_log
TABLE_TYPE BASE TABLE
ENGINE CSV
VERSION 10
-ROW_FORMAT Dynamic
+ROW_FORMAT DYNAMIC_OR_PAGE
TABLE_ROWS #TBLR#
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
@@ -131,7 +131,7 @@ TABLE_CATALOG NULL
TABLE_SCHEMA mysql
TABLE_NAME help_category
TABLE_TYPE BASE TABLE
-ENGINE MyISAM
+ENGINE MYISAM_OR_MARIA
VERSION 10
ROW_FORMAT Fixed
TABLE_ROWS #TBLR#
@@ -154,7 +154,7 @@ TABLE_CATALOG NULL
TABLE_SCHEMA mysql
TABLE_NAME help_keyword
TABLE_TYPE BASE TABLE
-ENGINE MyISAM
+ENGINE MYISAM_OR_MARIA
VERSION 10
ROW_FORMAT Fixed
TABLE_ROWS #TBLR#
@@ -177,7 +177,7 @@ TABLE_CATALOG NULL
TABLE_SCHEMA mysql
TABLE_NAME help_relation
TABLE_TYPE BASE TABLE
-ENGINE MyISAM
+ENGINE MYISAM_OR_MARIA
VERSION 10
ROW_FORMAT Fixed
TABLE_ROWS #TBLR#
@@ -200,9 +200,9 @@ TABLE_CATALOG NULL
TABLE_SCHEMA mysql
TABLE_NAME help_topic
TABLE_TYPE BASE TABLE
-ENGINE MyISAM
+ENGINE MYISAM_OR_MARIA
VERSION 10
-ROW_FORMAT Dynamic
+ROW_FORMAT DYNAMIC_OR_PAGE
TABLE_ROWS #TBLR#
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
@@ -223,7 +223,7 @@ TABLE_CATALOG NULL
TABLE_SCHEMA mysql
TABLE_NAME host
TABLE_TYPE BASE TABLE
-ENGINE MyISAM
+ENGINE MYISAM_OR_MARIA
VERSION 10
ROW_FORMAT Fixed
TABLE_ROWS #TBLR#
@@ -246,9 +246,9 @@ TABLE_CATALOG NULL
TABLE_SCHEMA mysql
TABLE_NAME ndb_binlog_index
TABLE_TYPE BASE TABLE
-ENGINE MyISAM
+ENGINE MYISAM_OR_MARIA
VERSION 10
-ROW_FORMAT Dynamic
+ROW_FORMAT DYNAMIC_OR_PAGE
TABLE_ROWS #TBLR#
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
@@ -269,7 +269,7 @@ TABLE_CATALOG NULL
TABLE_SCHEMA mysql
TABLE_NAME plugin
TABLE_TYPE BASE TABLE
-ENGINE MyISAM
+ENGINE MYISAM_OR_MARIA
VERSION 10
ROW_FORMAT Fixed
TABLE_ROWS #TBLR#
@@ -292,9 +292,9 @@ TABLE_CATALOG NULL
TABLE_SCHEMA mysql
TABLE_NAME proc
TABLE_TYPE BASE TABLE
-ENGINE MyISAM
+ENGINE MYISAM_OR_MARIA
VERSION 10
-ROW_FORMAT Dynamic
+ROW_FORMAT DYNAMIC_OR_PAGE
TABLE_ROWS #TBLR#
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
@@ -315,7 +315,7 @@ TABLE_CATALOG NULL
TABLE_SCHEMA mysql
TABLE_NAME procs_priv
TABLE_TYPE BASE TABLE
-ENGINE MyISAM
+ENGINE MYISAM_OR_MARIA
VERSION 10
ROW_FORMAT Fixed
TABLE_ROWS #TBLR#
@@ -338,7 +338,7 @@ TABLE_CATALOG NULL
TABLE_SCHEMA mysql
TABLE_NAME servers
TABLE_TYPE BASE TABLE
-ENGINE MyISAM
+ENGINE MYISAM_OR_MARIA
VERSION 10
ROW_FORMAT Fixed
TABLE_ROWS #TBLR#
@@ -363,7 +363,7 @@ TABLE_NAME slow_log
TABLE_TYPE BASE TABLE
ENGINE CSV
VERSION 10
-ROW_FORMAT Dynamic
+ROW_FORMAT DYNAMIC_OR_PAGE
TABLE_ROWS #TBLR#
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
@@ -384,7 +384,7 @@ TABLE_CATALOG NULL
TABLE_SCHEMA mysql
TABLE_NAME tables_priv
TABLE_TYPE BASE TABLE
-ENGINE MyISAM
+ENGINE MYISAM_OR_MARIA
VERSION 10
ROW_FORMAT Fixed
TABLE_ROWS #TBLR#
@@ -407,7 +407,7 @@ TABLE_CATALOG NULL
TABLE_SCHEMA mysql
TABLE_NAME time_zone
TABLE_TYPE BASE TABLE
-ENGINE MyISAM
+ENGINE MYISAM_OR_MARIA
VERSION 10
ROW_FORMAT Fixed
TABLE_ROWS #TBLR#
@@ -430,7 +430,7 @@ TABLE_CATALOG NULL
TABLE_SCHEMA mysql
TABLE_NAME time_zone_leap_second
TABLE_TYPE BASE TABLE
-ENGINE MyISAM
+ENGINE MYISAM_OR_MARIA
VERSION 10
ROW_FORMAT Fixed
TABLE_ROWS #TBLR#
@@ -453,7 +453,7 @@ TABLE_CATALOG NULL
TABLE_SCHEMA mysql
TABLE_NAME time_zone_name
TABLE_TYPE BASE TABLE
-ENGINE MyISAM
+ENGINE MYISAM_OR_MARIA
VERSION 10
ROW_FORMAT Fixed
TABLE_ROWS #TBLR#
@@ -476,7 +476,7 @@ TABLE_CATALOG NULL
TABLE_SCHEMA mysql
TABLE_NAME time_zone_transition
TABLE_TYPE BASE TABLE
-ENGINE MyISAM
+ENGINE MYISAM_OR_MARIA
VERSION 10
ROW_FORMAT Fixed
TABLE_ROWS #TBLR#
@@ -499,7 +499,7 @@ TABLE_CATALOG NULL
TABLE_SCHEMA mysql
TABLE_NAME time_zone_transition_type
TABLE_TYPE BASE TABLE
-ENGINE MyISAM
+ENGINE MYISAM_OR_MARIA
VERSION 10
ROW_FORMAT Fixed
TABLE_ROWS #TBLR#
@@ -522,9 +522,9 @@ TABLE_CATALOG NULL
TABLE_SCHEMA mysql
TABLE_NAME user
TABLE_TYPE BASE TABLE
-ENGINE MyISAM
+ENGINE MYISAM_OR_MARIA
VERSION 10
-ROW_FORMAT Dynamic
+ROW_FORMAT DYNAMIC_OR_PAGE
TABLE_ROWS #TBLR#
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
=== modified file 'mysql-test/suite/funcs_1/r/is_triggers.result'
--- a/mysql-test/suite/funcs_1/r/is_triggers.result 2008-03-07 19:18:14 +0000
+++ b/mysql-test/suite/funcs_1/r/is_triggers.result 2008-07-01 20:47:09 +0000
@@ -75,7 +75,7 @@ TRIGGERS CREATE TEMPORARY TABLE `TRIGGER
`CHARACTER_SET_CLIENT` varchar(32) NOT NULL DEFAULT '',
`COLLATION_CONNECTION` varchar(32) NOT NULL DEFAULT '',
`DATABASE_COLLATION` varchar(32) NOT NULL DEFAULT ''
-) ENGINE=MyISAM DEFAULT CHARSET=utf8
+) DEFAULT CHARSET=utf8
SHOW COLUMNS FROM information_schema.TRIGGERS;
Field Type Null Key Default Extra
TRIGGER_CATALOG varchar(512) YES NULL
=== modified file 'mysql-test/suite/funcs_1/r/is_views.result'
--- a/mysql-test/suite/funcs_1/r/is_views.result 2008-03-07 19:18:14 +0000
+++ b/mysql-test/suite/funcs_1/r/is_views.result 2008-07-01 20:47:09 +0000
@@ -51,7 +51,7 @@ VIEWS CREATE TEMPORARY TABLE `VIEWS` (
`SECURITY_TYPE` varchar(7) NOT NULL DEFAULT '',
`CHARACTER_SET_CLIENT` varchar(32) NOT NULL DEFAULT '',
`COLLATION_CONNECTION` varchar(32) NOT NULL DEFAULT ''
-) ENGINE=MyISAM DEFAULT CHARSET=utf8
+) DEFAULT CHARSET=utf8
SHOW COLUMNS FROM information_schema.VIEWS;
Field Type Null Key Default Extra
TABLE_CATALOG varchar(512) YES NULL
=== modified file 'mysql-test/suite/funcs_1/r/processlist_priv_no_prot.result'
--- a/mysql-test/suite/funcs_1/r/processlist_priv_no_prot.result 2008-03-07 19:18:14 +0000
+++ b/mysql-test/suite/funcs_1/r/processlist_priv_no_prot.result 2008-07-01 20:47:09 +0000
@@ -32,7 +32,7 @@ PROCESSLIST CREATE TEMPORARY TABLE `PROC
`TIME` bigint(7) NOT NULL DEFAULT '0',
`STATE` varchar(64) DEFAULT NULL,
`INFO` longtext
-) ENGINE=MyISAM DEFAULT CHARSET=utf8
+) DEFAULT CHARSET=utf8
SHOW processlist;
Id User Host db Command Time State Info
ID root localhost information_schema Query TIME NULL SHOW processlist
@@ -102,7 +102,7 @@ PROCESSLIST CREATE TEMPORARY TABLE `PROC
`TIME` bigint(7) NOT NULL DEFAULT '0',
`STATE` varchar(64) DEFAULT NULL,
`INFO` longtext
-) ENGINE=MyISAM DEFAULT CHARSET=utf8
+) DEFAULT CHARSET=utf8
SHOW processlist;
Id User Host db Command Time State Info
ID ddicttestuser1 localhost information_schema Query TIME NULL SHOW processlist
=== modified file 'mysql-test/suite/funcs_1/r/processlist_priv_ps.result'
--- a/mysql-test/suite/funcs_1/r/processlist_priv_ps.result 2008-03-07 19:18:14 +0000
+++ b/mysql-test/suite/funcs_1/r/processlist_priv_ps.result 2008-07-01 20:47:09 +0000
@@ -32,7 +32,7 @@ PROCESSLIST CREATE TEMPORARY TABLE `PROC
`TIME` bigint(7) NOT NULL DEFAULT '0',
`STATE` varchar(64) DEFAULT NULL,
`INFO` longtext
-) ENGINE=MyISAM DEFAULT CHARSET=utf8
+) DEFAULT CHARSET=utf8
SHOW processlist;
Id User Host db Command Time State Info
ID root localhost information_schema Query TIME NULL SHOW processlist
@@ -102,7 +102,7 @@ PROCESSLIST CREATE TEMPORARY TABLE `PROC
`TIME` bigint(7) NOT NULL DEFAULT '0',
`STATE` varchar(64) DEFAULT NULL,
`INFO` longtext
-) ENGINE=MyISAM DEFAULT CHARSET=utf8
+) DEFAULT CHARSET=utf8
SHOW processlist;
Id User Host db Command Time State Info
ID ddicttestuser1 localhost information_schema Query TIME NULL SHOW processlist
=== modified file 'mysql-test/suite/funcs_1/r/processlist_val_no_prot.result'
--- a/mysql-test/suite/funcs_1/r/processlist_val_no_prot.result 2008-03-07 19:18:14 +0000
+++ b/mysql-test/suite/funcs_1/r/processlist_val_no_prot.result 2008-07-01 20:47:09 +0000
@@ -17,7 +17,7 @@ PROCESSLIST CREATE TEMPORARY TABLE `PROC
`TIME` bigint(7) NOT NULL DEFAULT '0',
`STATE` varchar(64) DEFAULT NULL,
`INFO` longtext
-) ENGINE=MyISAM DEFAULT CHARSET=utf8
+) DEFAULT CHARSET=utf8
SELECT COUNT(*) FROM INFORMATION_SCHEMA.PROCESSLIST;
COUNT(*)
1
=== modified file 'mysql-test/suite/funcs_1/r/processlist_val_ps.result'
--- a/mysql-test/suite/funcs_1/r/processlist_val_ps.result 2008-03-07 19:18:14 +0000
+++ b/mysql-test/suite/funcs_1/r/processlist_val_ps.result 2008-07-01 20:47:09 +0000
@@ -17,7 +17,7 @@ PROCESSLIST CREATE TEMPORARY TABLE `PROC
`TIME` bigint(7) NOT NULL DEFAULT '0',
`STATE` varchar(64) DEFAULT NULL,
`INFO` longtext
-) ENGINE=MyISAM DEFAULT CHARSET=utf8
+) DEFAULT CHARSET=utf8
SELECT COUNT(*) FROM INFORMATION_SCHEMA.PROCESSLIST;
COUNT(*)
1
=== renamed file 'mysql-test/suite/funcs_1/t/is_collation_character_set_applicability.test' => 'mysql-test/suite/funcs_1/t/is_collation_charset_applic.test'
=== modified file 'mysql-test/suite/funcs_1/t/is_columns.test'
--- a/mysql-test/suite/funcs_1/t/is_columns.test 2008-03-07 16:33:07 +0000
+++ b/mysql-test/suite/funcs_1/t/is_columns.test 2008-07-01 20:47:09 +0000
@@ -76,6 +76,7 @@ eval SHOW TABLES FROM information_schema
--source suite/funcs_1/datadict/datadict_bug_12777.inc
eval DESCRIBE information_schema.$is_table;
--source suite/funcs_1/datadict/datadict_bug_12777.inc
+--replace_result ENGINE=MyISAM "" ENGINE=MARIA "" " PAGE_CHECKSUM=1" "" " PAGE_CHECKSUM=0" ""
eval SHOW CREATE TABLE information_schema.$is_table;
--source suite/funcs_1/datadict/datadict_bug_12777.inc
eval SHOW COLUMNS FROM information_schema.$is_table;
=== modified file 'mysql-test/suite/funcs_1/t/is_events.test'
--- a/mysql-test/suite/funcs_1/t/is_events.test 2008-03-07 19:18:14 +0000
+++ b/mysql-test/suite/funcs_1/t/is_events.test 2008-07-01 20:47:09 +0000
@@ -86,6 +86,7 @@ eval SHOW TABLES FROM information_schema
# is associated.
#
eval DESCRIBE information_schema.$is_table;
+--replace_result ENGINE=MyISAM "" ENGINE=MARIA "" " PAGE_CHECKSUM=1" "" " PAGE_CHECKSUM=0" ""
eval SHOW CREATE TABLE information_schema.$is_table;
eval SHOW COLUMNS FROM information_schema.$is_table;
=== modified file 'mysql-test/suite/funcs_1/t/is_routines.test'
--- a/mysql-test/suite/funcs_1/t/is_routines.test 2008-03-07 19:18:14 +0000
+++ b/mysql-test/suite/funcs_1/t/is_routines.test 2008-07-01 20:47:09 +0000
@@ -74,6 +74,7 @@ eval SHOW TABLES FROM information_schema
--source suite/funcs_1/datadict/datadict_bug_12777.inc
eval DESCRIBE information_schema.$is_table;
--source suite/funcs_1/datadict/datadict_bug_12777.inc
+--replace_result ENGINE=MyISAM "" ENGINE=MARIA "" " PAGE_CHECKSUM=1" "" " PAGE_CHECKSUM=0" ""
eval SHOW CREATE TABLE information_schema.$is_table;
--source suite/funcs_1/datadict/datadict_bug_12777.inc
eval SHOW COLUMNS FROM information_schema.$is_table;
=== modified file 'mysql-test/suite/funcs_1/t/is_triggers.test'
--- a/mysql-test/suite/funcs_1/t/is_triggers.test 2008-03-07 19:18:14 +0000
+++ b/mysql-test/suite/funcs_1/t/is_triggers.test 2008-07-01 20:47:09 +0000
@@ -69,6 +69,7 @@ eval SHOW TABLES FROM information_schema
--source suite/funcs_1/datadict/datadict_bug_12777.inc
eval DESCRIBE information_schema.$is_table;
--source suite/funcs_1/datadict/datadict_bug_12777.inc
+--replace_result ENGINE=MyISAM "" ENGINE=MARIA "" " PAGE_CHECKSUM=1" "" " PAGE_CHECKSUM=0" ""
eval SHOW CREATE TABLE information_schema.$is_table;
--source suite/funcs_1/datadict/datadict_bug_12777.inc
eval SHOW COLUMNS FROM information_schema.$is_table;
=== modified file 'mysql-test/suite/funcs_1/t/is_views.test'
--- a/mysql-test/suite/funcs_1/t/is_views.test 2008-03-07 19:18:14 +0000
+++ b/mysql-test/suite/funcs_1/t/is_views.test 2008-07-01 20:47:09 +0000
@@ -59,6 +59,7 @@ eval SHOW TABLES FROM information_schema
--source suite/funcs_1/datadict/datadict_bug_12777.inc
eval DESCRIBE information_schema.$is_table;
--source suite/funcs_1/datadict/datadict_bug_12777.inc
+--replace_result ENGINE=MyISAM "" ENGINE=MARIA "" " PAGE_CHECKSUM=1" "" " PAGE_CHECKSUM=0" ""
eval SHOW CREATE TABLE information_schema.$is_table;
--source suite/funcs_1/datadict/datadict_bug_12777.inc
eval SHOW COLUMNS FROM information_schema.$is_table;
=== modified file 'mysql-test/t/maria-no-logging.test'
--- a/mysql-test/t/maria-no-logging.test 2008-06-06 13:37:16 +0000
+++ b/mysql-test/t/maria-no-logging.test 2008-07-01 20:47:09 +0000
@@ -1,6 +1,8 @@
# test of cases where we can safely disable logging
--source include/have_maria.inc
+# can't restart server in embedded
+--source include/not_embedded.inc
set global maria_log_file_size=4294967295;
@@ -9,7 +11,7 @@ drop database if exists mysqltest;
--enable_warnings
create database mysqltest;
-connect (admin, 127.0.0.1, root,,mysqltest,,);
+connect (admin, localhost, root,,mysqltest,,);
--enable_reconnect
connection default;
=== modified file 'mysql-test/t/maria-purge.test'
--- a/mysql-test/t/maria-purge.test 2008-06-26 09:32:22 +0000
+++ b/mysql-test/t/maria-purge.test 2008-07-01 20:47:09 +0000
@@ -1,8 +1,9 @@
-- source include/have_maria.inc
-- source include/big_test.inc
+-- source include/not_embedded.inc
# pre-requisites for maria_empty_logs
-connect (admin, 127.0.0.1, root,,test,,);
+connect (admin, localhost, root,,test,,);
#
--enable_reconnect
connection default;
=== modified file 'mysql-test/t/maria-recover-master.opt'
--- a/mysql-test/t/maria-recover-master.opt 2008-06-02 20:53:25 +0000
+++ b/mysql-test/t/maria-recover-master.opt 2008-07-01 20:47:09 +0000
@@ -1 +1 @@
---maria-recover=backup --maria-log-dir-path=../tmp
+--loose-maria-recover=backup --loose-maria-log-dir-path=$MYSQLTEST_VARDIR/tmp
=== modified file 'mysql-test/t/maria-recover.test'
--- a/mysql-test/t/maria-recover.test 2008-06-16 08:57:25 +0000
+++ b/mysql-test/t/maria-recover.test 2008-07-01 20:47:09 +0000
@@ -48,7 +48,7 @@ EOF
# line below will be removed
disable_ps_protocol;
-replace_regex /.mysqltest.t_corrupted2/t_corrupted2/ ;
+replace_regex /Table.*t_corrupted2/t_corrupted2/ ;
select * from t_corrupted2; # should show corruption and repair messages
enable_ps_protocol;
select * from t_corrupted2; # should show just rows
=== modified file 'mysql-test/t/maria-recovery-big.test'
--- a/mysql-test/t/maria-recovery-big.test 2008-06-02 20:53:25 +0000
+++ b/mysql-test/t/maria-recovery-big.test 2008-07-01 20:47:09 +0000
@@ -20,7 +20,7 @@ let $mms_tname=t;
# Include scripts can perform SQL. For it to not influence the main test
# they use a separate connection. This way if they use a DDL it would
# not autocommit in the main test.
-connect (admin, 127.0.0.1, root,,mysqltest,,);
+connect (admin, localhost, root,,mysqltest,,);
--enable_reconnect
connection default;
=== modified file 'mysql-test/t/maria-recovery-bitmap.test'
--- a/mysql-test/t/maria-recovery-bitmap.test 2008-06-02 20:53:25 +0000
+++ b/mysql-test/t/maria-recovery-bitmap.test 2008-07-01 20:47:09 +0000
@@ -16,7 +16,7 @@ let $mms_tname=t;
# Include scripts can perform SQL. For it to not influence the main test
# they use a separate connection. This way if they use a DDL it would
# not autocommit in the main test.
-connect (admin, 127.0.0.1, root,,mysqltest,,);
+connect (admin, localhost, root,,mysqltest,,);
--enable_reconnect
connection default;
=== modified file 'mysql-test/t/maria-recovery-master.opt'
--- a/mysql-test/t/maria-recovery-master.opt 2008-02-06 16:55:04 +0000
+++ b/mysql-test/t/maria-recovery-master.opt 2008-07-01 20:47:09 +0000
@@ -1 +1 @@
---skip-stack-trace --skip-core-file --maria-log-dir-path=../tmp
+--skip-stack-trace --skip-core-file --loose-maria-log-dir-path=$MYSQLTEST_VARDIR/tmp
=== modified file 'mysql-test/t/maria-recovery-rtree-ft.test'
--- a/mysql-test/t/maria-recovery-rtree-ft.test 2008-06-02 20:53:25 +0000
+++ b/mysql-test/t/maria-recovery-rtree-ft.test 2008-07-01 20:47:09 +0000
@@ -19,7 +19,7 @@ let $mms_tname=t;
# Include scripts can perform SQL. For it to not influence the main test
# they use a separate connection. This way if they use a DDL it would
# not autocommit in the main test.
-connect (admin, 127.0.0.1, root,,mysqltest,,);
+connect (admin, localhost, root,,mysqltest,,);
--enable_reconnect
connection default;
=== modified file 'mysql-test/t/maria-recovery.test'
--- a/mysql-test/t/maria-recovery.test 2008-06-30 09:34:58 +0000
+++ b/mysql-test/t/maria-recovery.test 2008-07-01 20:47:09 +0000
@@ -17,7 +17,7 @@ let $mms_tname=t;
# Include scripts can perform SQL. For it to not influence the main test
# they use a separate connection. This way if they use a DDL it would
# not autocommit in the main test.
-connect (admin, 127.0.0.1, root,,mysqltest,,);
+connect (admin, localhost, root,,mysqltest,,);
--enable_reconnect
connection default;
=== modified file 'mysql-test/t/maria.test'
--- a/mysql-test/t/maria.test 2008-06-26 05:18:28 +0000
+++ b/mysql-test/t/maria.test 2008-07-01 20:47:09 +0000
@@ -1148,455 +1148,6 @@ create table t1 (a int not null, b int,
show create table t1;
drop table t1;
-
-# Test limits and errors of key_block_size
-
-create table t1 (a int not null, key `a` (a) key_block_size=512);
-show create table t1;
-drop table t1;
-
-create table t1 (a varchar(2048), key `a` (a) key_block_size=1000000000000000000);
-show create table t1;
-drop table t1;
-
-create table t1 (a int not null, key `a` (a) key_block_size=1025);
-show create table t1;
-drop table t1;
-
---error 1064
-create table t1 (a int not null, key key_block_size=1024 (a));
---error 1064
-create table t1 (a int not null, key `a` key_block_size=1024 (a));
-
-#
-# Test of changing MI_KEY_BLOCK_LENGTH
-#
-
-CREATE TABLE t1 (
- c1 INT,
- c2 VARCHAR(300),
- KEY (c1) KEY_BLOCK_SIZE 1024,
- KEY (c2) KEY_BLOCK_SIZE 8192
- );
-INSERT INTO t1 VALUES (10, REPEAT('a', CEIL(RAND(10) * 300))),
- (11, REPEAT('b', CEIL(RAND() * 300))),
- (12, REPEAT('c', CEIL(RAND() * 300))),
- (13, REPEAT('d', CEIL(RAND() * 300))),
- (14, REPEAT('e', CEIL(RAND() * 300))),
- (15, REPEAT('f', CEIL(RAND() * 300))),
- (16, REPEAT('g', CEIL(RAND() * 300))),
- (17, REPEAT('h', CEIL(RAND() * 300))),
- (18, REPEAT('i', CEIL(RAND() * 300))),
- (19, REPEAT('j', CEIL(RAND() * 300))),
- (20, REPEAT('k', CEIL(RAND() * 300))),
- (21, REPEAT('l', CEIL(RAND() * 300))),
- (22, REPEAT('m', CEIL(RAND() * 300))),
- (23, REPEAT('n', CEIL(RAND() * 300))),
- (24, REPEAT('o', CEIL(RAND() * 300))),
- (25, REPEAT('p', CEIL(RAND() * 300))),
- (26, REPEAT('q', CEIL(RAND() * 300))),
- (27, REPEAT('r', CEIL(RAND() * 300))),
- (28, REPEAT('s', CEIL(RAND() * 300))),
- (29, REPEAT('t', CEIL(RAND() * 300))),
- (30, REPEAT('u', CEIL(RAND() * 300))),
- (31, REPEAT('v', CEIL(RAND() * 300))),
- (32, REPEAT('w', CEIL(RAND() * 300))),
- (33, REPEAT('x', CEIL(RAND() * 300))),
- (34, REPEAT('y', CEIL(RAND() * 300))),
- (35, REPEAT('z', CEIL(RAND() * 300)));
-INSERT INTO t1 SELECT * FROM t1;
-INSERT INTO t1 SELECT * FROM t1;
-CHECK TABLE t1;
-REPAIR TABLE t1;
-DELETE FROM t1 WHERE c1 >= 10;
-CHECK TABLE t1;
-DROP TABLE t1;
-
-#
-# Test that TRANSACTIONAL is preserved
-#
-
-create table t1 (a int) transactional=0;
-show create table t1;
-drop table t1;
-create table t1 (a int) row_format=dynamic transactional=0;
-show create table t1;
-drop table t1;
-create table t1 (a int) row_format=dynamic transactional=1;
-show create table t1;
-alter table t1 row_format=PAGE;
-show create table t1;
-alter table t1 row_format=DYNAMIC;
-show create table t1;
-alter table t1 transactional=0;
-show create table t1;
-alter table t1 row_format=DYNAMIC;
-show create table t1;
-drop table t1;
-create table t1 (a int) row_format=PAGE;
-show create table t1;
-drop table t1;
-create table t1 (a int) row_format=PAGE TRANSACTIONAL=DEFAULT;
-show create table t1;
-alter table t1 row_format=DYNAMIC;
-show create table t1;
-drop table t1;
-
-# CHECK TABLE was reporting
-# "Size of datafile is: 0 Should be: 16384"
-#
-
-create table `t1` (
- t1_name varchar(255) default null,
- t1_id int(10) unsigned not null auto_increment,
- key (t1_name),
- primary key (t1_id)
-) engine=maria auto_increment = 1000 default charset=latin1;
-lock tables t1 write;
-INSERT INTO `t1` VALUES ('bla',1000),('bla',1001),('bla',1002);
-check table t1;
-unlock tables;
-
-#
-# Check that an empty table uses fast recreate of index when we fill it
-# with insert ... select.
-
-create table t2 like t1;
-insert into t2 select * from t1;
-
-# This should say that the table is already up to date
-analyze table t2;
-delete from t2;
-insert into t2 select * from t1;
-analyze table t2;
-
-drop table t1,t2;
-
-#
-# Test when expanding a row so that it doesn't fit into the same page
-#
-
-create table t1 (a bigint auto_increment, primary key(a), b char(255), c varchar(20000));
-
-let $1=1000;
---disable_query_log
---disable_warnings
-while ($1)
-{
- insert into t1 () values();
- dec $1;
-}
---enable_query_log
-update t1 set b=repeat('a',100) where a between 1 and 100;
-check table t1;
-update t1 set c=repeat('a',8192*2) where a between 200 and 202;
-check table t1;
-drop table t1;
-
-#
-# Test where we shrink varchar
-#
-
-CREATE TABLE t1 (a int, b int, v varchar(60000)) checksum=1 engine=maria;
-insert into t1 values (1,1,"aaa"),(1,2,null);
-checksum table t1;
-lock table t1 write;
-insert into t1 values (1,3,repeat('c',30000)),(4,4,repeat('a',30000));
-update t1 set v="row5" where b=4;
-delete from t1 where b=3;
-select a, b, length(v) from t1;
-drop table t1;
-
-#
-# Test tail pages for blobs
-#
-
-CREATE TABLE t1 (
- auto int(5) unsigned NOT NULL auto_increment,
- string char(10) default "hello",
- tiny tinyint(4) DEFAULT '0' NOT NULL ,
- short smallint(6) DEFAULT '1' NOT NULL ,
- medium mediumint(8) DEFAULT '0' NOT NULL,
- long_int int(11) DEFAULT '0' NOT NULL,
- longlong bigint(13) DEFAULT '0' NOT NULL,
- real_float float(13,1) DEFAULT 0.0 NOT NULL,
- real_double double(16,4),
- utiny tinyint(3) unsigned DEFAULT '0' NOT NULL,
- ushort smallint(5) unsigned zerofill DEFAULT '00000' NOT NULL,
- umedium mediumint(8) unsigned DEFAULT '0' NOT NULL,
- ulong int(11) unsigned DEFAULT '0' NOT NULL,
- ulonglong bigint(13) unsigned DEFAULT '0' NOT NULL,
- time_stamp timestamp,
- date_field date,
- time_field time,
- date_time datetime,
- blob_col blob,
- tinyblob_col tinyblob,
- mediumblob_col mediumblob not null default '',
- longblob_col longblob not null default '',
- options enum('one','two','tree') not null ,
- flags set('one','two','tree') not null default '',
- PRIMARY KEY (auto),
- KEY (utiny),
- KEY (tiny),
- KEY (short),
- KEY any_name (medium),
- KEY (longlong),
- KEY (real_float),
- KEY (ushort),
- KEY (umedium),
- KEY (ulong),
- KEY (ulonglong,ulong),
- KEY (options,flags)
-) engine=maria;
-insert into t1 values (10,1,1,1,1,1,1,1,1,1,1,1,1,1,NULL,0,0,0,1,1,1,1,'one','one');
-create table t2 (primary key (auto)) engine=maria row_format=page select auto+1 as auto,1 as t1, 'a' as t2, repeat('a',256) as t3, binary repeat('b',256) as t4, repeat('a',4096) as t5, binary repeat('b',4096) as t6, '' as t7, binary '' as t8 from t1;
-check table t1,t2;
-select t1,t2,length(t3),length(t4),length(t5),length(t6),t7,t8 from t2;
-drop table t2;
-create table t2 (primary key (auto)) engine=maria row_format=dynamic select auto+1 as auto,1 as t1, 'a' as t2, repeat('a',256) as t3, binary repeat('b',256) as t4, repeat('a',4096) as t5, binary repeat('b',4096) as t6, '' as t7, binary '' as t8 from t1;
-check table t2;
-drop table t1,t2;
-
-# Test UPDATE with small BLOB which fits on head page
-
-CREATE TABLE t1 (seq int, s1 int, s2 blob);
-insert into t1 values (1, 1, MD5(1));
-update t1 set s1=2 where seq=1;
-check table t1 extended;
-drop table t1;
-
-# Fix if we are using safemalloc
---replace_result 8388572 8388600
-show variables like 'maria%';
---replace_column 2 #
-show status like 'maria%';
-
-#
-# Test creating table with no field data and index on zero length columns
-#
-
-create table t1 (b char(0));
-insert into t1 values(NULL),("");
-select length(b) from t1;
-alter table t1 add column c char(0), add key (c);
-insert into t1 values("",""),("",NULL);
-select length(b),length(c) from t1;
-select length(b),length(c) from t1 where c is null;
-select length(b),length(c) from t1 where c is not null;
-select length(b),length(c) from t1 order by c;
---error 1167
-alter table t1 add column d char(0) not null, add key (d);
-drop table t1;
-
-CREATE TABLE t1 (a bit(3));
-insert into t1 values (NULL),(0),(1),(2),(3),(4),(5),(6),(7);
-select hex(a) from t1;
-drop table t1;
-create table t1(a bit not null);
-insert into t1 values(0),(1);
-select a+0 from t1;
-drop table t1;
-
-#
-# Test of min_key_length
-#
-
-CREATE TABLE t1 (col1 int, s1 char(16) DEFAULT NULL, s2 char(16) DEFAULT NULL, KEY (s1,s2));
-insert into t1 (col1) values(0);
-drop table t1;
-
-#
-# Show that page_checksum is remembered
-#
-set global maria_page_checksum=1;
-create table t1 (a int);
-show create table t1;
-drop table t1;
-
-#
-# Test warning on log file size truncates
-#
-
---enable_warnings
-set global maria_log_file_size=4294967296;
-
-#
-# Test delete of all rows in autocommit and not autocommit
-#
-
-create table t1 (a int not null);
-lock tables t1 write;
-insert into t1 values (1),(2);
-delete from t1;
-unlock tables;
-select * from t1;
-insert into t1 values (1),(2);
-delete from t1;
-select * from t1;
-drop table t1;
-
-# Test for bug "ha_enable_transaction(on) not called by CREATE TABLE"
-# (originally from type_ranges.test)
-
-create table t1 (c int);
-insert into t1 values(1),(2);
-create table t2 select * from t1;
---error 1060
-create table t3 select * from t1, t2; # Should give an error
-create table t3 select t1.c AS c1, t2.c AS c2,1 as "const" from t1, t2;
-drop table t1, t2, t3;
-
-# Test for bug "maria_repair() (OPTIMIZE) leaves wrong
-# data_file_length" (originally from type_datetime.test)
-
-create table t1 (t datetime) engine=maria;
-insert into t1 values (101),(691231),(700101),(991231),(10000101),(99991231),(101000000),(691231000000),(700101000000),(991231235959),(10000101000000),(99991231235959),(20030100000000),(20030000000000);
-select * from t1;
-optimize table t1;
-check table t1;
-delete from t1 where t > 0;
-optimize table t1;
-check table t1;
-drop table t1;
-
-#
-# Test auto-increment
-#
-
-SET SQL_MODE='NO_AUTO_VALUE_ON_ZERO';
-CREATE TABLE t1 (id int(11) PRIMARY KEY auto_increment,f1 varchar(10) NOT NULL UNIQUE);
-INSERT IGNORE INTO t1 (f1) VALUES ("test1");
-INSERT IGNORE INTO t1 (f1) VALUES ("test1");
-INSERT IGNORE INTO t1 (f1) VALUES ("test2");
-SELECT * FROM t1;
-drop table t1;
-SET SQL_MODE = 'TRADITIONAL';
-
-create table t1 (n int not null primary key auto_increment, c char(1), unique(c));
-insert into t1 values(100, "a");
-insert into t1 values(300, "b");
---error 1062
-insert into t1 values(50, "a");
-insert into t1 values(null, "c");
-select * from t1;
---error 1062
-update t1 set n=400,c='a' where n=301;
-insert into t1 values(null, "d");
-select * from t1;
-drop table t1;
-
-create table t1 (n int not null primary key auto_increment, c char(1), unique(c)) transactional=0 row_format=dynamic;
-insert into t1 values(100, "a");
-insert into t1 values(300, "b");
---error 1062
-insert into t1 values(50, "a");
-insert into t1 values(null, "c");
-select * from t1;
---error 1062
-update t1 set n=400,c='a' where n=301;
-insert into t1 values(null, "d");
-select * from t1;
-drop table t1;
-
-#
-# Test warnings with transactional=1 with MyISAM
-#
-
-create table t1 (n int not null, c char(1)) engine=maria;
-alter table t1 engine=myisam;
-alter table t1 engine=maria;
-show create table t1;
-drop table t1;
-create table t1 (n int not null, c char(1)) engine=maria transactional=1;
-alter table t1 engine=myisam;
-alter table t1 engine=maria;
-show create table t1;
-drop table t1;
-create table t1 (n int not null, c char(1)) engine=myisam transactional=1;
-alter table t1 engine=maria;
-show create table t1;
-drop table t1;
-
-#
-# Some tests that have failed with transactional=0
-#
-
-# Testing buik insert
-create table t1 (a int, key(a)) transactional=0;
-insert into t1 values (0),(1),(2),(3),(4);
-insert into t1 select NULL from t1;
-check table t1;
-drop table t1;
-
-#
-# Some tests with temporary tables
-#
-
-create temporary table t1 (a int, key(a)) transactional=1;
-create temporary table t2 (a int, key(a)) transactional=1;
-insert into t1 values (0),(1),(2),(3),(4);
-insert into t2 select * from t1;
-insert into t1 select NULL from t2;
-select count(*) from t1;
-select count(*) from t1 where a >= 4;
-drop table t1;
-
-#
-# Test problems with small rows and row_type=page
-# Bug 35048 "maria table corruption reported when transactional=0"
-#
-
-create table t1 (i int auto_increment not null primary key) transactional=0;
-
-let $i=510;
---disable_query_log
-while ($i)
-{
- dec $i;
- insert into t1 values (null);
-}
---enable_query_log
-check table t1 extended;
-delete from t1 where i = 10;
-check table t1 extended;
-drop table t1;
-
-create table t1 (i int auto_increment not null primary key);
-
-let $i=510;
---disable_query_log
-while ($i)
-{
- dec $i;
- insert into t1 values (null);
-}
---enable_query_log
-check table t1 extended;
-delete from t1 where i = 10;
-check table t1 extended;
-drop table t1;
-
-#
-# BUG#29445 - match ... against () never returns
-#
-CREATE TABLE t1(a VARCHAR(20), FULLTEXT(a)) transactional=0;
-INSERT INTO t1 VALUES('Offside'),('City Of God');
-SELECT a FROM t1 WHERE MATCH a AGAINST ('+city of*' IN BOOLEAN MODE);
-SELECT a FROM t1 WHERE MATCH a AGAINST ('+city (of)*' IN BOOLEAN MODE);
-DROP TABLE t1;
-
-#
-# BUG#36104 - INFORMATION_SCHEMA.TABLES shows TRANSACTIONAL=1 twice in
-# CREATE_OPTIONS
-#
-create table t1(a int) engine=maria transactional=1;
-select CREATE_OPTIONS from information_schema.TABLES where
-TABLE_SCHEMA='test' and TABLE_NAME='t1';
-drop table t1;
-
-# End of 5.1 tests
-
--disable_result_log
--disable_query_log
eval set global storage_engine=$default_engine, maria_page_checksum=$default_checksum;
=== added file 'mysql-test/t/maria3.test'
--- a/mysql-test/t/maria3.test 1970-01-01 00:00:00 +0000
+++ b/mysql-test/t/maria3.test 2008-07-01 20:47:09 +0000
@@ -0,0 +1,470 @@
+-- source include/have_maria.inc
+
+select * from INFORMATION_SCHEMA.ENGINES where ENGINE="MARIA";
+
+let $default_engine=`select @@global.storage_engine`;
+let $default_checksum=`select @@global.maria_page_checksum`;
+set global storage_engine=maria;
+set session storage_engine=maria;
+set global maria_page_checksum=0;
+set global maria_log_file_size=4294967295;
+
+# Initialise
+--disable_warnings
+drop table if exists t1,t2;
+--enable_warnings
+SET SQL_WARNINGS=1;
+
+# Test limits and errors of key_block_size
+
+create table t1 (a int not null, key `a` (a) key_block_size=512);
+show create table t1;
+drop table t1;
+
+create table t1 (a varchar(2048), key `a` (a) key_block_size=1000000000000000000);
+show create table t1;
+drop table t1;
+
+create table t1 (a int not null, key `a` (a) key_block_size=1025);
+show create table t1;
+drop table t1;
+
+--error 1064
+create table t1 (a int not null, key key_block_size=1024 (a));
+--error 1064
+create table t1 (a int not null, key `a` key_block_size=1024 (a));
+
+#
+# Test of changing MI_KEY_BLOCK_LENGTH
+#
+
+CREATE TABLE t1 (
+ c1 INT,
+ c2 VARCHAR(300),
+ KEY (c1) KEY_BLOCK_SIZE 1024,
+ KEY (c2) KEY_BLOCK_SIZE 8192
+ );
+INSERT INTO t1 VALUES (10, REPEAT('a', CEIL(RAND(10) * 300))),
+ (11, REPEAT('b', CEIL(RAND() * 300))),
+ (12, REPEAT('c', CEIL(RAND() * 300))),
+ (13, REPEAT('d', CEIL(RAND() * 300))),
+ (14, REPEAT('e', CEIL(RAND() * 300))),
+ (15, REPEAT('f', CEIL(RAND() * 300))),
+ (16, REPEAT('g', CEIL(RAND() * 300))),
+ (17, REPEAT('h', CEIL(RAND() * 300))),
+ (18, REPEAT('i', CEIL(RAND() * 300))),
+ (19, REPEAT('j', CEIL(RAND() * 300))),
+ (20, REPEAT('k', CEIL(RAND() * 300))),
+ (21, REPEAT('l', CEIL(RAND() * 300))),
+ (22, REPEAT('m', CEIL(RAND() * 300))),
+ (23, REPEAT('n', CEIL(RAND() * 300))),
+ (24, REPEAT('o', CEIL(RAND() * 300))),
+ (25, REPEAT('p', CEIL(RAND() * 300))),
+ (26, REPEAT('q', CEIL(RAND() * 300))),
+ (27, REPEAT('r', CEIL(RAND() * 300))),
+ (28, REPEAT('s', CEIL(RAND() * 300))),
+ (29, REPEAT('t', CEIL(RAND() * 300))),
+ (30, REPEAT('u', CEIL(RAND() * 300))),
+ (31, REPEAT('v', CEIL(RAND() * 300))),
+ (32, REPEAT('w', CEIL(RAND() * 300))),
+ (33, REPEAT('x', CEIL(RAND() * 300))),
+ (34, REPEAT('y', CEIL(RAND() * 300))),
+ (35, REPEAT('z', CEIL(RAND() * 300)));
+INSERT INTO t1 SELECT * FROM t1;
+INSERT INTO t1 SELECT * FROM t1;
+CHECK TABLE t1;
+REPAIR TABLE t1;
+DELETE FROM t1 WHERE c1 >= 10;
+CHECK TABLE t1;
+DROP TABLE t1;
+
+#
+# Test that TRANSACTIONAL is preserved
+#
+
+create table t1 (a int) transactional=0;
+show create table t1;
+drop table t1;
+create table t1 (a int) row_format=dynamic transactional=0;
+show create table t1;
+drop table t1;
+create table t1 (a int) row_format=dynamic transactional=1;
+show create table t1;
+alter table t1 row_format=PAGE;
+show create table t1;
+alter table t1 row_format=DYNAMIC;
+show create table t1;
+alter table t1 transactional=0;
+show create table t1;
+alter table t1 row_format=DYNAMIC;
+show create table t1;
+drop table t1;
+create table t1 (a int) row_format=PAGE;
+show create table t1;
+drop table t1;
+create table t1 (a int) row_format=PAGE TRANSACTIONAL=DEFAULT;
+show create table t1;
+alter table t1 row_format=DYNAMIC;
+show create table t1;
+drop table t1;
+
+# CHECK TABLE was reporting
+# "Size of datafile is: 0 Should be: 16384"
+#
+
+create table `t1` (
+ t1_name varchar(255) default null,
+ t1_id int(10) unsigned not null auto_increment,
+ key (t1_name),
+ primary key (t1_id)
+) engine=maria auto_increment = 1000 default charset=latin1;
+lock tables t1 write;
+INSERT INTO `t1` VALUES ('bla',1000),('bla',1001),('bla',1002);
+check table t1;
+unlock tables;
+
+#
+# Check that an empty table uses fast recreate of index when we fill it
+# with insert ... select.
+
+create table t2 like t1;
+insert into t2 select * from t1;
+
+# This should say that the table is already up to date
+analyze table t2;
+delete from t2;
+insert into t2 select * from t1;
+analyze table t2;
+
+drop table t1,t2;
+
+#
+# Test when expanding a row so that it doesn't fit into the same page
+#
+
+create table t1 (a bigint auto_increment, primary key(a), b char(255), c varchar(20000));
+
+let $1=1000;
+--disable_query_log
+--disable_warnings
+while ($1)
+{
+ insert into t1 () values();
+ dec $1;
+}
+--enable_query_log
+update t1 set b=repeat('a',100) where a between 1 and 100;
+check table t1;
+update t1 set c=repeat('a',8192*2) where a between 200 and 202;
+check table t1;
+drop table t1;
+
+#
+# Test where we shrink varchar
+#
+
+CREATE TABLE t1 (a int, b int, v varchar(60000)) checksum=1 engine=maria;
+insert into t1 values (1,1,"aaa"),(1,2,null);
+checksum table t1;
+lock table t1 write;
+insert into t1 values (1,3,repeat('c',30000)),(4,4,repeat('a',30000));
+update t1 set v="row5" where b=4;
+delete from t1 where b=3;
+select a, b, length(v) from t1;
+drop table t1;
+
+#
+# Test tail pages for blobs
+#
+
+CREATE TABLE t1 (
+ auto int(5) unsigned NOT NULL auto_increment,
+ string char(10) default "hello",
+ tiny tinyint(4) DEFAULT '0' NOT NULL ,
+ short smallint(6) DEFAULT '1' NOT NULL ,
+ medium mediumint(8) DEFAULT '0' NOT NULL,
+ long_int int(11) DEFAULT '0' NOT NULL,
+ longlong bigint(13) DEFAULT '0' NOT NULL,
+ real_float float(13,1) DEFAULT 0.0 NOT NULL,
+ real_double double(16,4),
+ utiny tinyint(3) unsigned DEFAULT '0' NOT NULL,
+ ushort smallint(5) unsigned zerofill DEFAULT '00000' NOT NULL,
+ umedium mediumint(8) unsigned DEFAULT '0' NOT NULL,
+ ulong int(11) unsigned DEFAULT '0' NOT NULL,
+ ulonglong bigint(13) unsigned DEFAULT '0' NOT NULL,
+ time_stamp timestamp,
+ date_field date,
+ time_field time,
+ date_time datetime,
+ blob_col blob,
+ tinyblob_col tinyblob,
+ mediumblob_col mediumblob not null default '',
+ longblob_col longblob not null default '',
+ options enum('one','two','tree') not null ,
+ flags set('one','two','tree') not null default '',
+ PRIMARY KEY (auto),
+ KEY (utiny),
+ KEY (tiny),
+ KEY (short),
+ KEY any_name (medium),
+ KEY (longlong),
+ KEY (real_float),
+ KEY (ushort),
+ KEY (umedium),
+ KEY (ulong),
+ KEY (ulonglong,ulong),
+ KEY (options,flags)
+) engine=maria;
+insert into t1 values (10,1,1,1,1,1,1,1,1,1,1,1,1,1,NULL,0,0,0,1,1,1,1,'one','one');
+create table t2 (primary key (auto)) engine=maria row_format=page select auto+1 as auto,1 as t1, 'a' as t2, repeat('a',256) as t3, binary repeat('b',256) as t4, repeat('a',4096) as t5, binary repeat('b',4096) as t6, '' as t7, binary '' as t8 from t1;
+check table t1,t2;
+select t1,t2,length(t3),length(t4),length(t5),length(t6),t7,t8 from t2;
+drop table t2;
+create table t2 (primary key (auto)) engine=maria row_format=dynamic select auto+1 as auto,1 as t1, 'a' as t2, repeat('a',256) as t3, binary repeat('b',256) as t4, repeat('a',4096) as t5, binary repeat('b',4096) as t6, '' as t7, binary '' as t8 from t1;
+check table t2;
+drop table t1,t2;
+
+# Test UPDATE with small BLOB which fits on head page
+
+CREATE TABLE t1 (seq int, s1 int, s2 blob);
+insert into t1 values (1, 1, MD5(1));
+update t1 set s1=2 where seq=1;
+check table t1 extended;
+drop table t1;
+
+# Fix if we are using safemalloc
+--replace_result 8388572 8388600
+show variables like 'maria%';
+--replace_column 2 #
+show status like 'maria%';
+
+#
+# Test creating table with no field data and index on zero length columns
+#
+
+create table t1 (b char(0));
+insert into t1 values(NULL),("");
+select length(b) from t1;
+alter table t1 add column c char(0), add key (c);
+insert into t1 values("",""),("",NULL);
+select length(b),length(c) from t1;
+select length(b),length(c) from t1 where c is null;
+select length(b),length(c) from t1 where c is not null;
+select length(b),length(c) from t1 order by c;
+--error 1167
+alter table t1 add column d char(0) not null, add key (d);
+drop table t1;
+
+CREATE TABLE t1 (a bit(3));
+insert into t1 values (NULL),(0),(1),(2),(3),(4),(5),(6),(7);
+select hex(a) from t1;
+drop table t1;
+create table t1(a bit not null);
+insert into t1 values(0),(1);
+select a+0 from t1;
+drop table t1;
+
+#
+# Test of min_key_length
+#
+
+CREATE TABLE t1 (col1 int, s1 char(16) DEFAULT NULL, s2 char(16) DEFAULT NULL, KEY (s1,s2));
+insert into t1 (col1) values(0);
+drop table t1;
+
+#
+# Show that page_checksum is remembered
+#
+set global maria_page_checksum=1;
+create table t1 (a int);
+show create table t1;
+drop table t1;
+
+#
+# Test warning on log file size truncates
+#
+
+--enable_warnings
+set global maria_log_file_size=4294967296;
+
+#
+# Test delete of all rows in autocommit and not autocommit
+#
+
+create table t1 (a int not null);
+lock tables t1 write;
+insert into t1 values (1),(2);
+delete from t1;
+unlock tables;
+select * from t1;
+insert into t1 values (1),(2);
+delete from t1;
+select * from t1;
+drop table t1;
+
+# Test for bug "ha_enable_transaction(on) not called by CREATE TABLE"
+# (originally from type_ranges.test)
+
+create table t1 (c int);
+insert into t1 values(1),(2);
+create table t2 select * from t1;
+--error 1060
+create table t3 select * from t1, t2; # Should give an error
+create table t3 select t1.c AS c1, t2.c AS c2,1 as "const" from t1, t2;
+drop table t1, t2, t3;
+
+# Test for bug "maria_repair() (OPTIMIZE) leaves wrong
+# data_file_length" (originally from type_datetime.test)
+
+create table t1 (t datetime) engine=maria;
+insert into t1 values (101),(691231),(700101),(991231),(10000101),(99991231),(101000000),(691231000000),(700101000000),(991231235959),(10000101000000),(99991231235959),(20030100000000),(20030000000000);
+select * from t1;
+optimize table t1;
+check table t1;
+delete from t1 where t > 0;
+optimize table t1;
+check table t1;
+drop table t1;
+
+#
+# Test auto-increment
+#
+
+SET SQL_MODE='NO_AUTO_VALUE_ON_ZERO';
+CREATE TABLE t1 (id int(11) PRIMARY KEY auto_increment,f1 varchar(10) NOT NULL UNIQUE);
+INSERT IGNORE INTO t1 (f1) VALUES ("test1");
+INSERT IGNORE INTO t1 (f1) VALUES ("test1");
+INSERT IGNORE INTO t1 (f1) VALUES ("test2");
+SELECT * FROM t1;
+drop table t1;
+SET SQL_MODE = 'TRADITIONAL';
+
+create table t1 (n int not null primary key auto_increment, c char(1), unique(c));
+insert into t1 values(100, "a");
+insert into t1 values(300, "b");
+--error 1062
+insert into t1 values(50, "a");
+insert into t1 values(null, "c");
+select * from t1;
+--error 1062
+update t1 set n=400,c='a' where n=301;
+insert into t1 values(null, "d");
+select * from t1;
+drop table t1;
+
+create table t1 (n int not null primary key auto_increment, c char(1), unique(c)) transactional=0 row_format=dynamic;
+insert into t1 values(100, "a");
+insert into t1 values(300, "b");
+--error 1062
+insert into t1 values(50, "a");
+insert into t1 values(null, "c");
+select * from t1;
+--error 1062
+update t1 set n=400,c='a' where n=301;
+insert into t1 values(null, "d");
+select * from t1;
+drop table t1;
+
+#
+# Test warnings with transactional=1 with MyISAM
+#
+
+create table t1 (n int not null, c char(1)) engine=maria;
+alter table t1 engine=myisam;
+alter table t1 engine=maria;
+show create table t1;
+drop table t1;
+create table t1 (n int not null, c char(1)) engine=maria transactional=1;
+alter table t1 engine=myisam;
+alter table t1 engine=maria;
+show create table t1;
+drop table t1;
+create table t1 (n int not null, c char(1)) engine=myisam transactional=1;
+alter table t1 engine=maria;
+show create table t1;
+drop table t1;
+
+#
+# Some tests that have failed with transactional=0
+#
+
+# Testing buik insert
+create table t1 (a int, key(a)) transactional=0;
+insert into t1 values (0),(1),(2),(3),(4);
+insert into t1 select NULL from t1;
+check table t1;
+drop table t1;
+
+#
+# Some tests with temporary tables
+#
+
+create temporary table t1 (a int, key(a)) transactional=1;
+create temporary table t2 (a int, key(a)) transactional=1;
+insert into t1 values (0),(1),(2),(3),(4);
+insert into t2 select * from t1;
+insert into t1 select NULL from t2;
+select count(*) from t1;
+select count(*) from t1 where a >= 4;
+drop table t1;
+
+#
+# Test problems with small rows and row_type=page
+# Bug 35048 "maria table corruption reported when transactional=0"
+#
+
+create table t1 (i int auto_increment not null primary key) transactional=0;
+
+let $i=510;
+--disable_query_log
+while ($i)
+{
+ dec $i;
+ insert into t1 values (null);
+}
+--enable_query_log
+check table t1 extended;
+delete from t1 where i = 10;
+check table t1 extended;
+drop table t1;
+
+create table t1 (i int auto_increment not null primary key);
+
+let $i=510;
+--disable_query_log
+while ($i)
+{
+ dec $i;
+ insert into t1 values (null);
+}
+--enable_query_log
+check table t1 extended;
+delete from t1 where i = 10;
+check table t1 extended;
+drop table t1;
+
+#
+# BUG#29445 - match ... against () never returns
+#
+CREATE TABLE t1(a VARCHAR(20), FULLTEXT(a)) transactional=0;
+INSERT INTO t1 VALUES('Offside'),('City Of God');
+SELECT a FROM t1 WHERE MATCH a AGAINST ('+city of*' IN BOOLEAN MODE);
+SELECT a FROM t1 WHERE MATCH a AGAINST ('+city (of)*' IN BOOLEAN MODE);
+DROP TABLE t1;
+
+#
+# BUG#36104 - INFORMATION_SCHEMA.TABLES shows TRANSACTIONAL=1 twice in
+# CREATE_OPTIONS
+#
+create table t1(a int) engine=maria transactional=1;
+select CREATE_OPTIONS from information_schema.TABLES where
+TABLE_SCHEMA='test' and TABLE_NAME='t1';
+drop table t1;
+
+# End of 5.1 tests
+
+--disable_result_log
+--disable_query_log
+eval set global storage_engine=$default_engine, maria_page_checksum=$default_checksum;
+--enable_result_log
+--enable_query_log
=== modified file 'storage/maria/ma_delete.c'
--- a/storage/maria/ma_delete.c 2008-06-26 05:18:28 +0000
+++ b/storage/maria/ma_delete.c 2008-07-01 20:47:09 +0000
@@ -1523,8 +1523,8 @@ int _ma_write_undo_key_delete(MARIA_HA *
return translog_write_record(res_lsn, log_type,
info->trn, info,
(translog_size_t)
- log_array[TRANSLOG_INTERNAL_PARTS + 0].length +
- log_array[TRANSLOG_INTERNAL_PARTS + 1].length,
+ (log_array[TRANSLOG_INTERNAL_PARTS + 0].length +
+ log_array[TRANSLOG_INTERNAL_PARTS + 1].length),
TRANSLOG_INTERNAL_PARTS + 2, log_array,
log_data + LSN_STORE_SIZE, &msg) ? -1 : 0;
}
| Thread |
|---|
| • bzr commit into MySQL/Maria:mysql-maria branch (guilhem:2654) | Guilhem Bichot | 1 Jul |