summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2016-04-23 18:49:19 +0200
committerSergei Golubchik <serg@mariadb.org>2016-04-24 18:15:20 +0200
commit7b58fd5ef0c1ecdc7c6d6d3347110620e67313c2 (patch)
treecc7adc5f126e8002efffe8e06741bc6aee55441a
parent0ee919b86e214a79541f1e9a16b63ae8784b4790 (diff)
downloadmariadb-git-7b58fd5ef0c1ecdc7c6d6d3347110620e67313c2.tar.gz
tests -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci
This fixes: MDEV-7693 MariaDB - mysql-test - SUITE:funcs_1 - funcs_1.is_tables_mysql is failing on TABLE_COLLATION /DATABASE_COLLATION MDEV-8487 mysql-test - main.information_schema 'xtradb' fails MDEV-8486 mysql-test - main.bootstrap fails
-rwxr-xr-xmysql-test/mysql-test-run.pl2
-rw-r--r--mysql-test/r/mysqld--help.result2
-rw-r--r--mysql-test/t/bootstrap.test2
-rw-r--r--mysql-test/t/mysqld--help.test1
-rw-r--r--scripts/mysql_system_tables.sql2
-rw-r--r--tests/mysql_client_test.c14
6 files changed, 11 insertions, 12 deletions
diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl
index e90e464d118..81001174172 100755
--- a/mysql-test/mysql-test-run.pl
+++ b/mysql-test/mysql-test-run.pl
@@ -3638,7 +3638,7 @@ sub mysql_install_db {
# Create mtr database
mtr_tofile($bootstrap_sql_file,
- "CREATE DATABASE mtr;\n");
+ "CREATE DATABASE mtr CHARSET=latin1;\n");
# Add help tables and data for warning detection and supression
mtr_tofile($bootstrap_sql_file,
diff --git a/mysql-test/r/mysqld--help.result b/mysql-test/r/mysqld--help.result
index 65045416a5b..e5a5f61cf83 100644
--- a/mysql-test/r/mysqld--help.result
+++ b/mysql-test/r/mysqld--help.result
@@ -1079,10 +1079,8 @@ binlog-stmt-cache-size 32768
bulk-insert-buffer-size 8388608
character-set-client-handshake TRUE
character-set-filesystem binary
-character-set-server latin1
character-sets-dir MYSQL_CHARSETSDIR/
chroot (No default value)
-collation-server latin1_swedish_ci
completion-type NO_CHAIN
concurrent-insert AUTO
console FALSE
diff --git a/mysql-test/t/bootstrap.test b/mysql-test/t/bootstrap.test
index 97376eb7412..e2d21c0d990 100644
--- a/mysql-test/t/bootstrap.test
+++ b/mysql-test/t/bootstrap.test
@@ -79,7 +79,7 @@ EOF
#
--write_file $MYSQLTEST_VARDIR/tmp/bootstrap_plugins.sql
use test;
-create table t1(a int) engine=example;
+create table t1(a int) engine=example charset=latin1;
EOF
--exec $MYSQLD_BOOTSTRAP_CMD --plugin-dir=$PLUGIN_DIR < $MYSQLTEST_VARDIR/tmp/bootstrap_plugins.sql >> $MYSQLTEST_VARDIR/tmp/bootstrap.log 2>&1
--remove_file $MYSQLTEST_VARDIR/tmp/bootstrap_plugins.sql
diff --git a/mysql-test/t/mysqld--help.test b/mysql-test/t/mysqld--help.test
index fabc2e21f18..cee9337ccc3 100644
--- a/mysql-test/t/mysqld--help.test
+++ b/mysql-test/t/mysqld--help.test
@@ -22,6 +22,7 @@ perl;
log-slow-queries pid-file slow-query-log-file log-basename
datadir slave-load-tmpdir tmpdir socket thread-pool-size
large-files-support lower-case-file-system system-time-zone
+ collation-server character-set-server
version.*/;
# Plugins which may or may not be there:
diff --git a/scripts/mysql_system_tables.sql b/scripts/mysql_system_tables.sql
index 14b59bb3411..ab4ea6dfe41 100644
--- a/scripts/mysql_system_tables.sql
+++ b/scripts/mysql_system_tables.sql
@@ -229,7 +229,7 @@ SET @cmd= "CREATE TABLE IF NOT EXISTS gtid_slave_pos (
sub_id BIGINT UNSIGNED NOT NULL,
server_id INT UNSIGNED NOT NULL,
seq_no BIGINT UNSIGNED NOT NULL,
- PRIMARY KEY (domain_id, sub_id))
+ PRIMARY KEY (domain_id, sub_id)) CHARSET=latin1
COMMENT='Replication slave GTID position'";
SET @str=CONCAT(@cmd, ' ENGINE=', @innodb_or_myisam);
PREPARE stmt FROM @str;
diff --git a/tests/mysql_client_test.c b/tests/mysql_client_test.c
index 473084e1b57..fcc89482f4e 100644
--- a/tests/mysql_client_test.c
+++ b/tests/mysql_client_test.c
@@ -2261,7 +2261,7 @@ static void test_ps_query_cache()
return;
}
- rc= mysql_query(mysql, "SET SQL_MODE=''");
+ rc= mysql_set_character_set(mysql, "utf8");
myquery(rc);
/* prepare the table */
@@ -2306,7 +2306,7 @@ static void test_ps_query_cache()
mysql_close(lmysql);
DIE_UNLESS(0);
}
- rc= mysql_query(lmysql, "SET SQL_MODE=''");
+ rc= mysql_set_character_set(lmysql, "utf8");
myquery(rc);
if (!opt_silent)
@@ -16647,7 +16647,7 @@ static void test_bug30472()
/* Switch client character set. */
- DIE_IF(mysql_set_character_set(&con, "utf8"));
+ DIE_IF(mysql_set_character_set(&con, "latin2"));
/* Retrieve character set information. */
@@ -16663,10 +16663,10 @@ static void test_bug30472()
2) new character set is different from the original one.
*/
- DIE_UNLESS(strcmp(character_set_name_2, "utf8") == 0);
- DIE_UNLESS(strcmp(character_set_client_2, "utf8") == 0);
- DIE_UNLESS(strcmp(character_set_results_2, "utf8") == 0);
- DIE_UNLESS(strcmp(collation_connnection_2, "utf8_general_ci") == 0);
+ DIE_UNLESS(strcmp(character_set_name_2, "latin2") == 0);
+ DIE_UNLESS(strcmp(character_set_client_2, "latin2") == 0);
+ DIE_UNLESS(strcmp(character_set_results_2, "latin2") == 0);
+ DIE_UNLESS(strcmp(collation_connnection_2, "latin2_general_ci") == 0);
DIE_UNLESS(strcmp(character_set_name_1, character_set_name_2) != 0);
DIE_UNLESS(strcmp(character_set_client_1, character_set_client_2) != 0);