mirror of
https://github.com/MariaDB/server.git
synced 2025-01-27 01:04:19 +01:00
32b7e60e42
The default storage engine is changed from MyISAM to InnoDB, in all builds except for the embedded server. In addition, the following system variables are changed: * innodb_file_per_table is enabled * innodb_strict_mode is enabled * innodb_file_format_name_update is changed to 'Barracuda' The test suite is changed so that tests that do not explicitly include the have_innodb.inc are run with --default-storage-engine=MyISAM. This is to ease the transition, so that most regression tests are run with the same engine as before. Some tests are disabled for the embedded server regression test, as the output of certain statements will be different that for the regular server (i.e SELECT @@default_storage_engine). This is to ease transition. mysql-test/mysql-test-run.pl: The regression test suite now adds a --default-storage-engine=MyISAM for all non-innodb tests. This behaviour can be controlled by the default-myisam switch in mysql-test-run mysql-test/t/bootstrap-master.opt: The bootstrap test can only be run without InnoDB as it starts several mysqld instances on the same datadir. This is possible with MyISAM, but not with InnoDB. storage/innobase/CMakeLists.txt: Build InnoDB per default storage/innobase/handler/ha_innodb.cc: Change default values for system variables Enable file_per_table Enable strict_mode Upgrade default file format to Barracuda
148 lines
5.2 KiB
Text
148 lines
5.2 KiB
Text
CREATE TABLE t1 (c1 char(50));
|
||
LOAD DATA INFILE '../../std_data/words.dat' INTO TABLE t1;
|
||
LOAD DATA CONCURRENT INFILE '../../std_data/words.dat' INTO TABLE t1;
|
||
show binlog events from <binlog_start>;
|
||
Log_name Pos Event_type Server_id End_log_pos Info
|
||
master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (c1 char(50))
|
||
master-bin.000001 # Query # # BEGIN
|
||
master-bin.000001 # Table_map # # table_id: # (test.t1)
|
||
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
|
||
master-bin.000001 # Xid # # COMMIT /* XID */
|
||
master-bin.000001 # Query # # BEGIN
|
||
master-bin.000001 # Table_map # # table_id: # (test.t1)
|
||
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
|
||
master-bin.000001 # Xid # # COMMIT /* XID */
|
||
DROP TABLE t1;
|
||
stop slave;
|
||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||
reset master;
|
||
reset slave;
|
||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||
start slave;
|
||
reset master;
|
||
select last_insert_id();
|
||
last_insert_id()
|
||
0
|
||
create table t1(a int not null auto_increment, b int, primary key(a) );
|
||
load data CONCURRENT infile '../../std_data/rpl_loaddata.dat' into table t1;
|
||
select last_insert_id();
|
||
last_insert_id()
|
||
1
|
||
create temporary table t2 (day date,id int(9),category enum('a','b','c'),name varchar(60));
|
||
load data CONCURRENT infile '../../std_data/rpl_loaddata2.dat' into table t2 fields terminated by ',' optionally enclosed by '%' escaped by '@' lines terminated by '\n##\n' starting by '>' ignore 1 lines;
|
||
create table t3 (day date,id int(9),category enum('a','b','c'),name varchar(60));
|
||
insert into t3 select * from t2;
|
||
select * from t1;
|
||
a b
|
||
1 10
|
||
2 15
|
||
select * from t3;
|
||
day id category name
|
||
2003-02-22 2461 b a a a @ % ' " a
|
||
2003-03-22 2161 c asdf
|
||
2003-03-22 2416 a bbbbb
|
||
drop table t1;
|
||
drop table t2;
|
||
drop table t3;
|
||
create table t1(a int, b int, unique(b));
|
||
insert into t1 values(1,10);
|
||
load data CONCURRENT infile '../../std_data/rpl_loaddata.dat' into table t1;
|
||
set global sql_slave_skip_counter=1;
|
||
start slave;
|
||
Last_SQL_Errno=0
|
||
Last_SQL_Error
|
||
|
||
set sql_log_bin=0;
|
||
delete from t1;
|
||
set sql_log_bin=1;
|
||
load data CONCURRENT infile '../../std_data/rpl_loaddata.dat' into table t1;
|
||
stop slave;
|
||
change master to master_user='test';
|
||
change master to master_user='root';
|
||
Last_SQL_Errno=0
|
||
Last_SQL_Error
|
||
|
||
set global sql_slave_skip_counter=1;
|
||
start slave;
|
||
set sql_log_bin=0;
|
||
delete from t1;
|
||
set sql_log_bin=1;
|
||
load data CONCURRENT infile '../../std_data/rpl_loaddata.dat' into table t1;
|
||
stop slave;
|
||
reset slave;
|
||
Last_SQL_Errno=0
|
||
Last_SQL_Error
|
||
|
||
reset master;
|
||
create table t2 (day date,id int(9),category enum('a','b','c'),name varchar(60),
|
||
unique(day)) engine=MyISAM;
|
||
load data CONCURRENT infile '../../std_data/rpl_loaddata2.dat' into table t2 fields
|
||
terminated by ',' optionally enclosed by '%' escaped by '@' lines terminated by
|
||
'\n##\n' starting by '>' ignore 1 lines;
|
||
ERROR 23000: Duplicate entry '2003-03-22' for key 'day'
|
||
select * from t2;
|
||
day id category name
|
||
2003-02-22 2461 b a a a @ % ' " a
|
||
2003-03-22 2161 c asdf
|
||
start slave;
|
||
select * from t2;
|
||
day id category name
|
||
2003-02-22 2461 b a a a @ % ' " a
|
||
2003-03-22 2161 c asdf
|
||
alter table t2 drop key day;
|
||
delete from t2;
|
||
load data CONCURRENT infile '../../std_data/rpl_loaddata2.dat' into table t2 fields
|
||
terminated by ',' optionally enclosed by '%' escaped by '@' lines terminated by
|
||
'\n##\n' starting by '>' ignore 1 lines;
|
||
ERROR 23000: Duplicate entry '2003-03-22' for key 'day'
|
||
drop table t1, t2;
|
||
CREATE TABLE t1 (word CHAR(20) NOT NULL PRIMARY KEY) ENGINE=INNODB;
|
||
LOAD DATA CONCURRENT INFILE "../../std_data/words.dat" INTO TABLE t1;
|
||
ERROR 23000: Duplicate entry 'Aarhus' for key 'PRIMARY'
|
||
DROP TABLE IF EXISTS t1;
|
||
stop slave;
|
||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||
reset master;
|
||
reset slave;
|
||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||
start slave;
|
||
drop database if exists b48297_db1;
|
||
drop database if exists b42897_db2;
|
||
create database b48297_db1;
|
||
create database b42897_db2;
|
||
use b48297_db1;
|
||
CREATE TABLE t1 (c1 VARCHAR(256)) engine=MyISAM;;
|
||
use b42897_db2;
|
||
### assertion: works with cross-referenced database
|
||
LOAD DATA CONCURRENT LOCAL INFILE 'MYSQLTEST_VARDIR/std_data/loaddata5.dat' INTO TABLE b48297_db1.t1;
|
||
use b48297_db1;
|
||
### assertion: works with fully qualified name on current database
|
||
LOAD DATA CONCURRENT LOCAL INFILE 'MYSQLTEST_VARDIR/std_data/loaddata5.dat' INTO TABLE b48297_db1.t1;
|
||
### assertion: works without fully qualified name on current database
|
||
LOAD DATA CONCURRENT LOCAL INFILE 'MYSQLTEST_VARDIR/std_data/loaddata5.dat' INTO TABLE t1;
|
||
### create connection without default database
|
||
### connect (conn2,localhost,root,,*NO-ONE*);
|
||
### assertion: works without stating the default database
|
||
LOAD DATA CONCURRENT LOCAL INFILE 'MYSQLTEST_VARDIR/std_data/loaddata5.dat' INTO TABLE b48297_db1.t1;
|
||
### disconnect and switch back to master connection
|
||
use b48297_db1;
|
||
Comparing tables master:b48297_db1.t1 and slave:b48297_db1.t1
|
||
DROP DATABASE b48297_db1;
|
||
DROP DATABASE b42897_db2;
|
||
stop slave;
|
||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||
reset master;
|
||
reset slave;
|
||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||
start slave;
|
||
use test;
|
||
CREATE TABLE t1 (`key` TEXT, `text` TEXT);
|
||
LOAD DATA INFILE '../../std_data/loaddata2.dat' REPLACE INTO TABLE `t1` FIELDS TERMINATED BY ',';
|
||
SELECT * FROM t1;
|
||
key text
|
||
Field A 'Field B'
|
||
Field 1 'Field 2'
|
||
Field 3 'Field 4'
|
||
'Field 5' 'Field 6'
|
||
Field 6 'Field 7'
|
||
DROP TABLE t1;
|