mirror of
				https://github.com/MariaDB/server.git
				synced 2025-10-30 04:26:45 +03:00 
			
		
		
		
	Fixed error number handling bug in mysqltest. Fixed that error number from insert delayed is reported correctly. merged new vio code with old violite code. client/mysqltest.c: Fixed bug that error numbers wasn't tested properly. myisam/mi_check.c: Moved initialization of variables to avoid a bug. myisam/mi_create.c: Fixed bug in symlink handling. myisam/mi_test_all.sh: Fixed script so that it works. myisam/myisamchk.c: Removed --no-symlinks option mysql-test/mysql-test-run.sh: Cleaned up error message mysql-test/t/bdb.test: Fixed wrong error numbers mysql-test/t/err000001.test: Fixed wrong error numbers mysql-test/t/innodb.test: Fixed wrong error numbers mysql-test/t/overflow.test: Fixed wrong error numbers mysql-test/t/status.test: Ensure that we are using myisam tables for the lock test. mysys/my_delete.c: cleanup mysys/my_symlink2.c: Added option to not overwrite files when using symlinks. sql/Makefile.am: Moved vio to avoid link error. sql/ha_myisam.cc: Fixed symlink handling. sql/mysqld.cc: Changed --skip-symlinks to --skip-symlink sql/sql_insert.cc: Fixed that error number from insert delayed is reported correctly sql/sql_parse.cc: Fixed symlink handling. sql/sql_table.cc: Fixed symlink handling. vio/vio.c: cleanup vio/viosocket.c: c
		
			
				
	
	
		
			83 lines
		
	
	
		
			2.9 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			83 lines
		
	
	
		
			2.9 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
| -- require r/have_symlink.require
 | |
| show variables like "have_symlink";
 | |
| 
 | |
| #
 | |
| # First create little data to play with
 | |
| #
 | |
| drop table if exists t1,t2,t7,t8,t9;
 | |
| 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
 | |
| # 
 | |
| 
 | |
| eval create table t9 (a int not null auto_increment, b char(16) not null, primary key (a)) type=myisam data directory="$MYSQL_TEST_DIR/var/tmp" index directory="$MYSQL_TEST_DIR/var/run";
 | |
| insert into t9 select * from t1;
 | |
| check table t9;
 | |
| optimize table t9;
 | |
| repair table t9;
 | |
| alter table t9 add column c int not null;
 | |
| 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!
 | |
| #
 | |
| 
 | |
| --error 1103
 | |
| create table t1 (a int not null auto_increment, b char(16) not null, primary key (a)) type=myisam data directory="tmp";
 | |
| 
 | |
| # Check that we cannot link over a table from another database.
 | |
| 
 | |
| drop database if exists test_mysqltest;
 | |
| create database test_mysqltest;
 | |
| 
 | |
| --error 1
 | |
| create table test_mysqltest.t9 (a int not null auto_increment, b char(16) not null, primary key (a)) type=myisam index directory="/this-dir-does-not-exist";
 | |
| 
 | |
| --error 1103
 | |
| create table test_mysqltest.t9 (a int not null auto_increment, b char(16) not null, primary key (a)) type=myisam index directory="not-hard-path";
 | |
| 
 | |
| --error 1
 | |
| eval create table test_mysqltest.t9 (a int not null auto_increment, b char(16) not null, primary key (a)) type=myisam index directory="$MYSQL_TEST_DIR/var/run";
 | |
| 
 | |
| --error 1
 | |
| eval create table test_mysqltest.t9 (a int not null auto_increment, b char(16) not null, primary key (a)) type=myisam data directory="$MYSQL_TEST_DIR/var/tmp";
 | |
| 
 | |
| # Check moving table t9 from default database to test_mysqltest;
 | |
| # In this case the symlinks should be removed.
 | |
| 
 | |
| alter table t9 rename test_mysqltest.t9;
 | |
| select count(*) from test_mysqltest.t9;
 | |
| show create table test_mysqltest.t9;
 | |
| drop database test_mysqltest;
 |