mirror of
				https://github.com/MariaDB/server.git
				synced 2025-10-24 07:13:33 +03:00 
			
		
		
		
	into neptunus.(none):/home/msvensson/mysql/mysqltest_var/my51-mysqltest_var mysql-test/mysql-test-run.sh: Auto merged mysql-test/extra/binlog_tests/blackhole.test: Auto merged mysql-test/extra/binlog_tests/ctype_ucs_binlog.test: Auto merged mysql-test/extra/rpl_tests/rpl_EE_err.test: Auto merged mysql-test/extra/rpl_tests/rpl_log.test: Auto merged mysql-test/extra/rpl_tests/rpl_stm_000001.test: Auto merged mysql-test/extra/rpl_tests/rpl_stm_charset.test: Auto merged mysql-test/r/backup.result: Auto merged mysql-test/r/loaddata.result: Auto merged mysql-test/r/query_cache.result: Auto merged mysql-test/r/rpl_loaddata_s.result: Auto merged mysql-test/r/rpl_replicate_do.result: Auto merged mysql-test/r/rpl_rewrt_db.result: Auto merged mysql-test/r/rpl_stm_000001.result: Auto merged mysql-test/r/trigger.result: Auto merged mysql-test/r/view.result: Auto merged mysql-test/r/warnings.result: Auto merged mysql-test/t/backup.test: Auto merged mysql-test/t/loaddata.test: Auto merged mysql-test/t/mysqldump.test: Auto merged mysql-test/t/ndb_autodiscover.test: Auto merged mysql-test/t/query_cache.test: Auto merged mysql-test/t/rpl_000015-slave.sh: Auto merged mysql-test/t/rpl_flushlog_loop-master.opt: Auto merged mysql-test/t/rpl_flushlog_loop-master.sh: Auto merged mysql-test/t/rpl_flushlog_loop-slave.opt: Auto merged mysql-test/t/rpl_flushlog_loop-slave.sh: Auto merged mysql-test/t/rpl_loaddata_s.test: Auto merged mysql-test/t/rpl_replicate_do.test: Auto merged mysql-test/t/rpl_rewrt_db.test: Auto merged mysql-test/t/rpl_rotate_logs.test: Auto merged mysql-test/t/show_check.test: Auto merged mysql-test/t/sp-destruct.test: Auto merged mysql-test/t/symlink.test: Auto merged mysql-test/t/trigger.test: Auto merged mysql-test/t/user_var-binlog.test: Auto merged mysql-test/t/view.test: Auto merged mysql-test/t/warnings.test: Auto merged mysql-test/mysql-test-run.pl: Merge 5.0 -> 5.1 mysql-test/r/binlog_stm_blackhole.result: Merge 5.0 -> 5.1 mysql-test/r/mysqltest.result: Merge 5.0 -> 5.1 mysql-test/r/rpl_loaddata.result: Merge 5.0 -> 5.1 mysql-test/r/rpl_loaddata_m.result: Merge 5.0 -> 5.1 mysql-test/r/rpl_stm_log.result: Merge 5.0 -> 5.1 mysql-test/r/rpl_timezone.result: Merge 5.0 -> 5.1 mysql-test/t/mysqlbinlog.test: Merge 5.0 -> 5.1 mysql-test/t/mysqlbinlog2.test: Merge 5.0 -> 5.1 mysql-test/t/mysqltest.test: Merge 5.0 -> 5.1 mysql-test/t/rpl_drop_db.test: Merge 5.0 -> 5.1 mysql-test/t/rpl_loaddata.test: Merge 5.0 -> 5.1 mysql-test/t/rpl_loaddata_m.test: Merge 5.0 -> 5.1 mysql-test/t/rpl_timezone.test: Merge 5.0 -> 5.1 mysql-test/t/trigger-compat.test: Merge 5.0 -> 5.1 mysql-test/t/trigger-grant.test: Merge 5.0 -> 5.1
		
			
				
	
	
		
			143 lines
		
	
	
		
			4.3 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			143 lines
		
	
	
		
			4.3 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
| -- require r/have_symlink.require
 | |
| disable_query_log;
 | |
| show variables like "have_symlink";
 | |
| enable_query_log;
 | |
| 
 | |
| --source include/not_windows.inc
 | |
| 
 | |
| --disable_warnings
 | |
| drop table if exists t1,t2,t7,t8,t9;
 | |
| drop database if exists mysqltest;
 | |
| --enable_warnings
 | |
| 
 | |
| #
 | |
| # First create little data to play with
 | |
| #
 | |
| 
 | |
| create table t1 (a int not null auto_increment, b char(16) not null, primary key (a));
 | |
| create table t2 (a int not null auto_increment, b char(16) not null, primary key (a));
 | |
| insert into t1 (b) values ("test"),("test1"),("test2"),("test3");
 | |
| insert into t2 (b) select b from t1;
 | |
| insert into t1 (b) select b from t2;
 | |
| insert into t2 (b) select b from t1;
 | |
| insert into t1 (b) select b from t2;
 | |
| insert into t2 (b) select b from t1;
 | |
| insert into t1 (b) select b from t2;
 | |
| insert into t2 (b) select b from t1;
 | |
| insert into t1 (b) select b from t2;
 | |
| insert into t2 (b) select b from t1;
 | |
| insert into t1 (b) select b from t2;
 | |
| insert into t2 (b) select b from t1;
 | |
| insert into t1 (b) select b from t2;
 | |
| insert into t2 (b) select b from t1;
 | |
| insert into t1 (b) select b from t2;
 | |
| insert into t2 (b) select b from t1;
 | |
| insert into t1 (b) select b from t2;
 | |
| insert into t2 (b) select b from t1;
 | |
| insert into t1 (b) select b from t2;
 | |
| drop table t2;
 | |
| 
 | |
| #
 | |
| # Start the test
 | |
| # We use t9 here to not crash with tables generated by the backup test
 | |
| # 
 | |
| 
 | |
| disable_query_log;
 | |
| eval create table t9 (a int not null auto_increment, b char(16) not null, primary key (a)) engine=myisam data directory="$MYSQLTEST_VARDIR/tmp" index directory="$MYSQLTEST_VARDIR/run";
 | |
| enable_query_log;
 | |
| 
 | |
| insert into t9 select * from t1;
 | |
| check table t9;
 | |
| optimize table t9;
 | |
| repair table t9;
 | |
| alter table t9 add column c int not null;
 | |
| 
 | |
| --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
 | |
| show create table t9;
 | |
| 
 | |
| # Test renames
 | |
| alter table t9 rename t8, add column d int not null;
 | |
| alter table t8 rename t7;
 | |
| rename table t7 to t9;
 | |
| # Drop old t1 table, keep t9
 | |
| drop table t1;
 | |
| 
 | |
| #
 | |
| # Test error handling
 | |
| # Note that we are using the above table t9 here!
 | |
| #
 | |
| 
 | |
| --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
 | |
| SHOW CREATE TABLE t9;
 | |
| 
 | |
| disable_query_log;
 | |
| --error 1103,1103
 | |
| create table t1 (a int not null auto_increment, b char(16) not null, primary key (a)) engine=myisam data directory="tmp";
 | |
| 
 | |
| # Check that we cannot link over a table from another database.
 | |
| 
 | |
| create database mysqltest;
 | |
| 
 | |
| --error 1,1
 | |
| create table mysqltest.t9 (a int not null auto_increment, b char(16) not null, primary key (a)) engine=myisam index directory="/this-dir-does-not-exist";
 | |
| 
 | |
| --error 1103,1103
 | |
| create table mysqltest.t9 (a int not null auto_increment, b char(16) not null, primary key (a)) engine=myisam index directory="not-hard-path";
 | |
| 
 | |
| # Should fail becasue the file t9.MYI already exist in 'run'
 | |
| --error 1,1,1105
 | |
| eval create table mysqltest.t9 (a int not null auto_increment, b char(16) not null, primary key (a)) engine=myisam index directory="$MYSQLTEST_VARDIR/run";
 | |
| 
 | |
| # Should fail becasue the file t9.MYD already exist in 'tmp'
 | |
| --error 1,1
 | |
| eval create table mysqltest.t9 (a int not null auto_increment, b char(16) not null, primary key (a)) engine=myisam data directory="$MYSQLTEST_VARDIR/tmp";
 | |
| enable_query_log;
 | |
| 
 | |
| # Check moving table t9 from default database to mysqltest;
 | |
| # In this case the symlinks should be removed.
 | |
| 
 | |
| alter table t9 rename mysqltest.t9;
 | |
| select count(*) from mysqltest.t9;
 | |
| --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
 | |
| show create table mysqltest.t9;
 | |
| drop database mysqltest;
 | |
| 
 | |
| #
 | |
| # Test changing data dir (Bug #1662)
 | |
| #
 | |
| 
 | |
| create table t1 (a int not null) engine=myisam;
 | |
| disable_query_log;
 | |
| eval alter table t1 data directory="$MYSQLTEST_VARDIR/tmp";
 | |
| enable_query_log;
 | |
| --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
 | |
| show create table t1;
 | |
| alter table t1 add b int;
 | |
| disable_query_log;
 | |
| eval alter table t1 data directory="$MYSQLTEST_VARDIR/log";
 | |
| enable_query_log;
 | |
| --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
 | |
| show create table t1;
 | |
| disable_query_log;
 | |
| eval alter table t1 index directory="$MYSQLTEST_VARDIR/log";
 | |
| enable_query_log;
 | |
| show create table t1;
 | |
| drop table t1;
 | |
| 
 | |
| #
 | |
| # Test specifying DATA DIRECTORY that is the same as what would normally
 | |
| # have been chosen. (Bug #8707)
 | |
| #
 | |
| disable_query_log;
 | |
| eval create table t1 (i int) data directory = "$MYSQLTEST_VARDIR/master-data/test/";
 | |
| enable_query_log;
 | |
| show create table t1;
 | |
| drop table t1;
 | |
| disable_query_log;
 | |
| eval create table t1 (i int) index directory = "$MYSQLTEST_VARDIR/master-data/test/";
 | |
| enable_query_log;
 | |
| show create table t1;
 | |
| drop table t1;
 | |
| 
 | |
| # End of 4.1 tests
 |