after merge fix

parent df5fbf5a
......@@ -130,39 +130,38 @@ select * from t1;
a
42
drop table t1;
execute stmt;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`c` char(10) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/tmp/'
drop table t1;
execute stmt;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`c` char(10) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/tmp/'
drop table t1;
deallocate prepare stmt;
CREATE TABLE t1(a INT)
DATA DIRECTORY='TEST_DIR/var/master-data/test';
ERROR HY000: Incorrect arguments to DATA DIRECORY
CREATE TABLE t1(a INT)
DATA DIRECTORY='/home/gluh/MySQL/Merge/4.1-opt/mysql-test/var/master-data/';
DATA DIRECTORY='/home/gluh/MySQL/Merge/5.0-opt/mysql-test/var/master-data/';
ERROR HY000: Incorrect arguments to DATA DIRECORY
CREATE TABLE t1(a INT)
INDEX DIRECTORY='/home/gluh/MySQL/Merge/4.1-opt/mysql-test/var/master-data';
INDEX DIRECTORY='/home/gluh/MySQL/Merge/5.0-opt/mysql-test/var/master-data';
ERROR HY000: Incorrect arguments to INDEX DIRECORY
CREATE TABLE t1(a INT)
INDEX DIRECTORY='/home/gluh/MySQL/Merge/4.1-opt/mysql-test/var/master-data_var';
ERROR HY000: Can't create/write to file '/home/gluh/MySQL/Merge/4.1-opt/mysql-test/var/master-data_var/t1.MYI' (Errcode: 2)
INDEX DIRECTORY='/home/gluh/MySQL/Merge/5.0-opt/mysql-test/var/master-data_var';
ERROR HY000: Can't create/write to file '/home/gluh/MySQL/Merge/5.0-opt/mysql-test/var/master-data_var/t1.MYI' (Errcode: 2)
End of 4.1 tests
CREATE DATABASE db1;
CREATE DATABASE db2;
USE db2;
INSERT INTO db2.t1 VALUES (1);
SELECT * FROM db2.t1;
b
1
RESET QUERY CACHE;
USE db1;
SET SESSION keep_files_on_create = TRUE;
CREATE TABLE t1 (a INT) ENGINE MYISAM;
ERROR HY000: Can't create/write to file './db1/t1.MYD' (Errcode: 17)
CREATE TABLE t3 (a INT) Engine=MyISAM;
INSERT INTO t3 VALUES (1),(2),(3);
TRUNCATE TABLE t3;
SELECT * from t3;
a
SET SESSION keep_files_on_create = DEFAULT;
DROP TABLE db2.t1, db1.t3;
DROP DATABASE db1;
DROP DATABASE db2;
USE test;
ERROR HY000: Can't create/write to file './test/t1.MYD' (Errcode: 17)
SET SESSION keep_files_on_create = FALSE;
CREATE TABLE t1 (a INT) ENGINE MYISAM;
DROP TABLE t1;
End of 5.0 tests
......@@ -222,39 +222,17 @@ INDEX DIRECTORY='$MYSQL_TEST_DIR/var/master-data_var';
#
# Bug #29325: create table overwrites .MYD file of other table (datadir)
#
CREATE DATABASE db1;
CREATE DATABASE db2;
USE db2;
--disable_query_log
eval CREATE TABLE t1 (b INT) ENGINE MYISAM
DATA DIRECTORY = '$MYSQLTEST_VARDIR/master-data/db1/';
--enable_query_log
INSERT INTO db2.t1 VALUES (1);
SELECT * FROM db2.t1;
RESET QUERY CACHE;
USE db1;
#no warning from create table
SET SESSION keep_files_on_create = TRUE;
--write_file $MYSQLTEST_VARDIR/master-data/test/t1.MYD
EOF
--disable_abort_on_error
--error 1
CREATE TABLE t1 (a INT) ENGINE MYISAM;
--error 0,1
--remove_file $MYSQLTEST_VARDIR/master-data/test/t1.MYD;
--enable_abort_on_error
CREATE TABLE t3 (a INT) Engine=MyISAM;
INSERT INTO t3 VALUES (1),(2),(3);
TRUNCATE TABLE t3;
SELECT * from t3;
SET SESSION keep_files_on_create = DEFAULT;
DROP TABLE db2.t1, db1.t3;
DROP DATABASE db1;
DROP DATABASE db2;
USE test;
SET SESSION keep_files_on_create = FALSE;
CREATE TABLE t1 (a INT) ENGINE MYISAM;
DROP TABLE t1;
--echo End of 5.0 tests
......@@ -467,19 +467,13 @@ char log_error_file[FN_REFLEN], glob_hostname[FN_REFLEN];
char mysql_real_data_home[FN_REFLEN],
language[FN_REFLEN], reg_ext[FN_EXTLEN], mysql_charsets_dir[FN_REFLEN],
*opt_init_file, *opt_tc_log_file,
mysql_unpacked_real_data_home[FN_REFLEN],
def_ft_boolean_syntax[sizeof(ft_boolean_syntax)];
char *mysql_data_home= mysql_real_data_home;
const key_map key_map_empty(0);
key_map key_map_full(0); // Will be initialized later
const char *opt_date_time_formats[3];
char compiled_default_collation_name[]= MYSQL_DEFAULT_COLLATION_NAME;
char *language_ptr, *default_collation_name, *default_character_set_name;
char mysql_data_home_buff[2], *mysql_data_home=mysql_real_data_home;
char mysql_unpacked_real_data_home[FN_REFLEN];
struct passwd *user_info;
char server_version[SERVER_VERSION_LENGTH];
char *mysqld_unix_port, *opt_mysql_tmpdir;
const char **errmesg; /* Error messages */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment