diff options
Diffstat (limited to 'mysql-test/include')
-rw-r--r-- | mysql-test/include/default_my.cnf | 25 | ||||
-rw-r--r-- | mysql-test/include/default_mysqld.cnf | 18 | ||||
-rw-r--r-- | mysql-test/include/default_ndbd.cnf | 27 | ||||
-rw-r--r-- | mysql-test/include/federated.inc | 28 | ||||
-rw-r--r-- | mysql-test/include/federated_cleanup.inc | 9 | ||||
-rw-r--r-- | mysql-test/include/have_blackhole.inc | 7 | ||||
-rw-r--r-- | mysql-test/include/have_bug25714.inc | 7 | ||||
-rw-r--r-- | mysql-test/include/have_federated_db.inc | 4 | ||||
-rw-r--r-- | mysql-test/include/have_ndbapi_examples.inc | 2 | ||||
-rw-r--r-- | mysql-test/include/loaddata_autocom.inc | 8 | ||||
-rw-r--r-- | mysql-test/include/mix1.inc | 3 | ||||
-rw-r--r-- | mysql-test/include/ndb_backup.inc | 22 | ||||
-rw-r--r-- | mysql-test/include/ndb_restore_master.inc | 4 | ||||
-rw-r--r-- | mysql-test/include/ndb_restore_slave_eoption.inc | 4 | ||||
-rw-r--r-- | mysql-test/include/testdb_only.inc | 12 |
15 files changed, 99 insertions, 81 deletions
diff --git a/mysql-test/include/default_my.cnf b/mysql-test/include/default_my.cnf new file mode 100644 index 00000000000..d77fee0e200 --- /dev/null +++ b/mysql-test/include/default_my.cnf @@ -0,0 +1,25 @@ +# Use default setting for mysqld processes +!include default_mysqld.cnf + +[mysqld.1] + +# Run the master.sh script before starting this process +#!run-master-sh + +log-bin= master-bin + + +[mysqlbinlog] +disable-force-if-open + +# mysql_fix_privilege_tables.sh does not read from [client] so it +# need its own section +[mysql_fix_privilege_tables] +socket= @client.socket +port= @client.port +user= @client.user +password= @client.password + +[ENV] +MASTER_MYPORT= @mysqld.1.port +MASTER_MYSOCK= @mysqld.1.socket diff --git a/mysql-test/include/default_mysqld.cnf b/mysql-test/include/default_mysqld.cnf new file mode 100644 index 00000000000..60d12ebe1a6 --- /dev/null +++ b/mysql-test/include/default_mysqld.cnf @@ -0,0 +1,18 @@ +# Default values that applies to all MySQL Servers +[mysqld] +open-files-limit= 1024 +local-infile +default-character-set= latin1 + +# Increase default connect_timeout to avoid intermittent +# disconnects when test servers are put under load see BUG#28359 +connect-timeout= 60 + +log-bin-trust-function-creators=1 +key_buffer_size= 1M +sort_buffer= 256K +max_heap_table_size= 1M + +loose-innodb_data_file_path= ibdata1:10M:autoextend + +set-variable= slave_net_timeout=120 diff --git a/mysql-test/include/default_ndbd.cnf b/mysql-test/include/default_ndbd.cnf new file mode 100644 index 00000000000..784d81beabc --- /dev/null +++ b/mysql-test/include/default_ndbd.cnf @@ -0,0 +1,27 @@ + +[cluster_config] +MaxNoOfSavedMessages= 1000 +MaxNoOfConcurrentTransactions= 64 +MaxNoOfConcurrentOperations= 10000 +DataMemory= 20M +IndexMemory= 1M +Diskless= 0 +TimeBetweenWatchDogCheck= 30000 +MaxNoOfOrderedIndexes= 32 +MaxNoOfAttributes= 2048 +TimeBetweenGlobalCheckpoints= 500 +NoOfFragmentLogFiles= 4 +FragmentLogFileSize= 12M +DiskPageBufferMemory= 4M + +# O_DIRECT has issues on 2.4 whach have not been handled, Bug #29612 +#ODirect= 1 +# the following parametes just function as a small regression +# test that the parameter exists +InitialNoOfOpenFiles= 27 + +# Increase timeouts for slow test-machines +HeartbeatIntervalDbDb= 30000 +HeartbeatIntervalDbApi= 30000 + +#TransactionDeadlockDetectionTimeout= 7500 diff --git a/mysql-test/include/federated.inc b/mysql-test/include/federated.inc deleted file mode 100644 index 925ecdd9682..00000000000 --- a/mysql-test/include/federated.inc +++ /dev/null @@ -1,28 +0,0 @@ ---source include/have_log_bin.inc ---source include/not_embedded.inc ---source ./include/have_federated_db.inc - -source ./include/master-slave.inc; - -# remote table creation - -# We have to sync with master, to ensure slave had time to start properly -# before we stop it. If not, we get errors about UNIX_TIMESTAMP() in the log. -connection master; -sync_slave_with_master; - -connection slave; -#--replicate-ignore-db=federated -stop slave; - ---disable_warnings -# at this point, we are connected to master -DROP DATABASE IF EXISTS federated; ---enable_warnings -CREATE DATABASE federated; - -connection master; ---disable_warnings -DROP DATABASE IF EXISTS federated; ---enable_warnings -CREATE DATABASE federated; diff --git a/mysql-test/include/federated_cleanup.inc b/mysql-test/include/federated_cleanup.inc deleted file mode 100644 index 06fd7f6737a..00000000000 --- a/mysql-test/include/federated_cleanup.inc +++ /dev/null @@ -1,9 +0,0 @@ -connection master; ---disable_warnings -DROP TABLE IF EXISTS federated.t1; -DROP DATABASE IF EXISTS federated; - -connection slave; -DROP TABLE IF EXISTS federated.t1; -DROP DATABASE IF EXISTS federated; ---enable_warnings diff --git a/mysql-test/include/have_blackhole.inc b/mysql-test/include/have_blackhole.inc index 6c4da01d61d..2ddb0df4eae 100644 --- a/mysql-test/include/have_blackhole.inc +++ b/mysql-test/include/have_blackhole.inc @@ -1,4 +1,3 @@ -disable_query_log; ---require r/true.require -select (support = 'YES' or support = 'DEFAULT') as `TRUE` from information_schema.engines where engine = 'blackhole'; -enable_query_log; +if (`select (support = 'YES' or support = 'DEFAULT')=0 from information_schema.engines where engine = 'blackhole'`){ + skip Need blackhole engine; +} diff --git a/mysql-test/include/have_bug25714.inc b/mysql-test/include/have_bug25714.inc deleted file mode 100644 index 0c09ae1a035..00000000000 --- a/mysql-test/include/have_bug25714.inc +++ /dev/null @@ -1,7 +0,0 @@ -# -# Check if the variable MYSQL_BUG25714 is set -# ---require r/have_bug25714.require -disable_query_log; -eval select LENGTH("$MYSQL_BUG25714") > 0 as "have_bug25714_exe"; -enable_query_log; diff --git a/mysql-test/include/have_federated_db.inc b/mysql-test/include/have_federated_db.inc deleted file mode 100644 index 041a29f460b..00000000000 --- a/mysql-test/include/have_federated_db.inc +++ /dev/null @@ -1,4 +0,0 @@ -disable_query_log; ---require r/true.require -select (support = 'YES' or support = 'DEFAULT') as `TRUE` from information_schema.engines where engine = 'federated'; -enable_query_log; diff --git a/mysql-test/include/have_ndbapi_examples.inc b/mysql-test/include/have_ndbapi_examples.inc index 3ab1f063b61..9ce5dadd510 100644 --- a/mysql-test/include/have_ndbapi_examples.inc +++ b/mysql-test/include/have_ndbapi_examples.inc @@ -1,4 +1,4 @@ --require r/have_ndbapi_examples.require disable_query_log; -eval select LENGTH("$MY_NDB_EXAMPLES_BINARY") > 0 as "have_ndb_example"; +eval select LENGTH("$NDB_EXAMPLES_BINARY") > 0 as "have_ndb_example"; enable_query_log; diff --git a/mysql-test/include/loaddata_autocom.inc b/mysql-test/include/loaddata_autocom.inc index cca56709331..bb286fb4169 100644 --- a/mysql-test/include/loaddata_autocom.inc +++ b/mysql-test/include/loaddata_autocom.inc @@ -7,16 +7,20 @@ eval SET SESSION STORAGE_ENGINE = $engine_type; drop table if exists t1; --enable_warnings +let $load_file= $MYSQLTEST_VARDIR/std_data/loaddata2.dat; + # NDB does not support the create option 'Binlog of table with BLOB attribute and no PK' # So use a dummy PK here. create table t1 (id int unsigned not null auto_increment primary key, a text, b text); start transaction; -load data infile '../std_data_ln/loaddata2.dat' into table t1 fields terminated by ',' enclosed by '''' (a, b); +--replace_result $load_file LOAD_FILE +eval load data infile '$load_file' into table t1 fields terminated by ',' enclosed by '''' (a, b); commit; select count(*) from t1; truncate table t1; start transaction; -load data infile '../std_data_ln/loaddata2.dat' into table t1 fields terminated by ',' enclosed by '''' (a, b); +--replace_result $load_file LOAD_FILE +eval load data infile '$load_file' into table t1 fields terminated by ',' enclosed by '''' (a, b); rollback; select count(*) from t1; diff --git a/mysql-test/include/mix1.inc b/mysql-test/include/mix1.inc index 7998baa6ccf..799f9dc996d 100644 --- a/mysql-test/include/mix1.inc +++ b/mysql-test/include/mix1.inc @@ -623,7 +623,8 @@ DROP TABLE t1,t2,t3; # create table t1 (a int) engine=innodb; -copy_file $MYSQLTEST_VARDIR/master-data/test/t1.frm $MYSQLTEST_VARDIR/master-data/test/bug29807.frm; +let $MYSQLD_DATADIR= `select @@datadir`; +copy_file $MYSQLD_DATADIR/test/t1.frm $MYSQLD_DATADIR/test/bug29807.frm; --error 1146 select * from bug29807; drop table t1; diff --git a/mysql-test/include/ndb_backup.inc b/mysql-test/include/ndb_backup.inc index f0a883d4e11..e6780788fe9 100644 --- a/mysql-test/include/ndb_backup.inc +++ b/mysql-test/include/ndb_backup.inc @@ -2,23 +2,21 @@ # By JBM 2006-02-16 So that the code is not repeated # # in test cases and can be reused. # ###################################################### ---exec $NDB_MGM --no-defaults --ndb-connectstring="localhost:$NDBCLUSTER_PORT" -e "start backup" >> $NDB_TOOLS_OUTPUT +--exec $NDB_MGM --no-defaults --ndb-connectstring="$NDB_CONNECTSTRING" -e "start backup" >> $NDB_TOOLS_OUTPUT # there is no neat way to find the backupid, this is a hack to find it... +let $dump_file= $MYSQLTEST_VARDIR/tmp/tmp.dat; +--exec $NDB_TOOLS_DIR/ndb_select_all --ndb-connectstring="$NDB_CONNECTSTRING" -d sys --delimiter=',' SYSTAB_0 | grep 520093696 > $dump_file ---exec $NDB_TOOLS_DIR/ndb_select_all --ndb-connectstring="localhost:$NDBCLUSTER_PORT" -d sys --delimiter=',' SYSTAB_0 | grep 520093696 > $MYSQLTEST_VARDIR/tmp.dat +CREATE TEMPORARY TABLE test.backup_info (id INT, backup_id INT) ENGINE = HEAP; -CREATE TEMPORARY TABLE IF NOT EXISTS test.backup_info (id INT, backup_id INT) ENGINE = HEAP; +--replace_result $dump_file DUMP_FILE +eval LOAD DATA INFILE '$dump_file' INTO TABLE test.backup_info FIELDS TERMINATED BY ','; -DELETE FROM test.backup_info; - -LOAD DATA INFILE '../tmp.dat' INTO TABLE test.backup_info FIELDS TERMINATED BY ','; - ---replace_column 1 <the_backup_id> - -SELECT @the_backup_id:=backup_id FROM test.backup_info; +# Load backup id into environment variable +let the_backup_id=`SELECT backup_id from test.backup_info`; +DROP TABLE test.backup_info; -let the_backup_id=`select @the_backup_id`; +remove_file $dump_file; -DROP TABLE test.backup_info; diff --git a/mysql-test/include/ndb_restore_master.inc b/mysql-test/include/ndb_restore_master.inc index b01a0b58ee9..ae5f055b442 100644 --- a/mysql-test/include/ndb_restore_master.inc +++ b/mysql-test/include/ndb_restore_master.inc @@ -3,6 +3,6 @@ # in test cases and can be reused. # ###################################################### ---exec $NDB_TOOLS_DIR/ndb_restore --no-defaults --ndb-connectstring="localhost:$NDBCLUSTER_PORT" -p 8 -b $the_backup_id -n 1 -m -r --print --print_meta $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT +--exec $NDB_TOOLS_DIR/ndb_restore --no-defaults --ndb-connectstring="$NDB_CONNECTSTRING" -p 8 -b $the_backup_id -n 1 -m -r --print --print_meta $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT ---exec $NDB_TOOLS_DIR/ndb_restore --no-defaults --ndb-connectstring="localhost:$NDBCLUSTER_PORT" -p 8 -b $the_backup_id -n 2 -r --print --print_meta $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT +--exec $NDB_TOOLS_DIR/ndb_restore --no-defaults --ndb-connectstring="$NDB_CONNECTSTRING" -p 8 -b $the_backup_id -n 2 -r --print --print_meta $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT diff --git a/mysql-test/include/ndb_restore_slave_eoption.inc b/mysql-test/include/ndb_restore_slave_eoption.inc index f1f6cf96881..a8657f68c8d 100644 --- a/mysql-test/include/ndb_restore_slave_eoption.inc +++ b/mysql-test/include/ndb_restore_slave_eoption.inc @@ -3,9 +3,9 @@ # in test cases and can be reused. # ###################################################### ---exec $NDB_TOOLS_DIR/ndb_restore --no-defaults --ndb-connectstring="localhost:$NDBCLUSTER_PORT_SLAVE" -p 8 -b $the_backup_id -n 1 -m -r --print --print_meta $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT +--exec $NDB_TOOLS_DIR/ndb_restore --no-defaults --ndb-connectstring="$NDB_CONNECTSTRING_SLAVE" -p 8 -b $the_backup_id -n 1 -m -r --print --print_meta $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT ---exec $NDB_TOOLS_DIR/ndb_restore --no-defaults --ndb-connectstring="localhost:$NDBCLUSTER_PORT_SLAVE" -p 8 -b $the_backup_id -n 2 -r -e --print --print_meta $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT +--exec $NDB_TOOLS_DIR/ndb_restore --no-defaults --ndb-connectstring="$NDB_CONNECTSTRING_SLAVE" -p 8 -b $the_backup_id -n 2 -r -e --print --print_meta $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT diff --git a/mysql-test/include/testdb_only.inc b/mysql-test/include/testdb_only.inc index ddc3f123d45..528e2f3eb9d 100644 --- a/mysql-test/include/testdb_only.inc +++ b/mysql-test/include/testdb_only.inc @@ -19,12 +19,6 @@ # # ################################################################### ---disable_query_log -eval set @USE_RUNNING_SERVER= '$USE_RUNNING_SERVER'; ---require r/testdb_only.require -SELECT 'use extern server' - AS "Variable_name ", - IF(@USE_RUNNING_SERVER= '1','YES', - IF(@USE_RUNNING_SERVER= '0','NO','UNEXPECTED')) - AS "Value" ; ---enable_query_log +if ($USE_RUNNING_SERVER){ + skip Not with extern server; +} |