summaryrefslogtreecommitdiff
path: root/mysql-test/t
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/t')
-rw-r--r--mysql-test/t/error_simulation-master.opt1
-rw-r--r--mysql-test/t/error_simulation.test36
-rw-r--r--mysql-test/t/file_contents.test4
-rw-r--r--mysql-test/t/information_schema.test17
-rw-r--r--mysql-test/t/openssl_1.test4
5 files changed, 58 insertions, 4 deletions
diff --git a/mysql-test/t/error_simulation-master.opt b/mysql-test/t/error_simulation-master.opt
new file mode 100644
index 00000000000..c9f8d7bd0c0
--- /dev/null
+++ b/mysql-test/t/error_simulation-master.opt
@@ -0,0 +1 @@
+--tmpdir=$MYSQLTEST_VARDIR/tmp
diff --git a/mysql-test/t/error_simulation.test b/mysql-test/t/error_simulation.test
index 58ead1e3ced..7c343ed6566 100644
--- a/mysql-test/t/error_simulation.test
+++ b/mysql-test/t/error_simulation.test
@@ -1,4 +1,5 @@
-- source include/have_debug.inc
+--source include/not_embedded.inc
#
# Bug #28499: crash for grouping query when tmp_table_size is too small
@@ -112,3 +113,38 @@ DROP TABLE t1,t2;
--echo #
--echo # End of 5.1 tests
--echo #
+
+
+--echo #
+--echo # BUG#11747548:DETECT ORPHAN TEMP-POOL FILES, AND HANDLE GRACEFULLY.
+--echo #
+
+--echo #Set up.
+CREATE TABLE pid_table(pid_no INT);
+CREATE TABLE t1 (a BLOB);
+INSERT INTO t1 VALUES (1), (2);
+
+--echo #Create MYD and MYI files for intrinsic temp table.
+--let $pid_file=`SELECT @@pid_file`
+--replace_result $pid_file pid_file
+--eval LOAD DATA LOCAL INFILE '$pid_file' INTO TABLE pid_table
+--let $temp_file= `SELECT CONCAT('#sql_', LCASE(HEX(pid_no)), '_0') FROM pid_table`
+--write_file $MYSQLTEST_VARDIR/tmp/$temp_file.MYD
+EOF
+--write_file $MYSQLTEST_VARDIR/tmp/$temp_file.MYI
+EOF
+--write_file $MYSQLTEST_VARDIR/tmp/$temp_file.MAD
+EOF
+--write_file $MYSQLTEST_VARDIR/tmp/$temp_file.MAI
+EOF
+
+--echo #Reports an error since the temp file already exists.
+--replace_regex /.*Can't create\/write *.*/Can't create or write to file/
+#--error 1
+SELECT a FROM t1 ORDER BY rand(1);
+
+--echo #With patch, the query executes successfully.
+SELECT a FROM t1 ORDER BY rand(1);
+
+--echo #cleanup
+DROP TABLE t1, pid_table;
diff --git a/mysql-test/t/file_contents.test b/mysql-test/t/file_contents.test
index 48189aa33a3..c8fdc0251e4 100644
--- a/mysql-test/t/file_contents.test
+++ b/mysql-test/t/file_contents.test
@@ -36,7 +36,7 @@ if ($dir_bin eq '/usr/') {
# Slackware
$dir_docs = glob "$dir_bin/doc/mariadb-[0-9]*" unless -d $dir_docs;
} else {
- # tar.gz package, Windows, or developer work (in BZR)
+ # tar.gz package, Windows, or developer work (in git)
$dir_docs = $dir_bin;
if(-d "$dir_docs/docs") {
$dir_docs = "$dir_docs/docs"; # package
@@ -49,7 +49,7 @@ $found_revision = "No line 'revision-id: .....'";
open(I_SRC,"<","$dir_docs/INFO_SRC") or print "Cannot open 'INFO_SRC' in '$dir_docs' (starting from bindir '$dir_bin')\n";
while(defined ($line = <I_SRC>)) {
if ($line =~ m|^MySQL source \d\.\d\.\d+|) {$found_version = "Found MySQL version number";}
- if ($line =~ m|^revision-id: .*@.*-2\d{13}-\w+$|) {$found_revision = "Found BZR revision id";}
+ if ($line =~ m|^commit: \w{40}$|) {$found_revision = "Found GIT revision id";}
}
close I_SRC;
print "INFO_SRC: $found_version / $found_revision\n";
diff --git a/mysql-test/t/information_schema.test b/mysql-test/t/information_schema.test
index 80ba4a91542..fb39f2e5d58 100644
--- a/mysql-test/t/information_schema.test
+++ b/mysql-test/t/information_schema.test
@@ -1819,6 +1819,23 @@ drop view v1;
--echo # Clean-up.
drop database mysqltest;
+--echo #
+--echo # Test for bug #16869534 - "QUERYING SUBSET OF COLUMNS DOESN'T USE TABLE
+--echo # CACHE; OPENED_TABLES INCREASES"
+--echo #
+--disable_result_log
+SELECT * FROM INFORMATION_SCHEMA.TABLES;
+--enable_result_log
+SELECT VARIABLE_VALUE INTO @val1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE
+ VARIABLE_NAME LIKE 'Opened_tables';
+--disable_result_log
+SELECT ENGINE FROM INFORMATION_SCHEMA.TABLES;
+--enable_result_log
+--echo # The below SELECT query should give same output as above SELECT query.
+SELECT VARIABLE_VALUE INTO @val2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE
+ VARIABLE_NAME LIKE 'Opened_tables';
+--echo # The below select should return '1'
+SELECT @val1 = @val2;
--echo #
--echo # End of 5.5 tests
diff --git a/mysql-test/t/openssl_1.test b/mysql-test/t/openssl_1.test
index bee0e2cc720..3594b8c86eb 100644
--- a/mysql-test/t/openssl_1.test
+++ b/mysql-test/t/openssl_1.test
@@ -15,8 +15,8 @@ insert into t1 values (5);
grant select on test.* to ssl_user1@localhost require SSL;
grant select on test.* to ssl_user2@localhost require cipher "DHE-RSA-AES256-SHA";
-grant select on test.* to ssl_user3@localhost require cipher "DHE-RSA-AES256-SHA" AND SUBJECT "/C=SE/ST=Uppsala/O=MySQL AB";
-grant select on test.* to ssl_user4@localhost require cipher "DHE-RSA-AES256-SHA" AND SUBJECT "/C=SE/ST=Uppsala/O=MySQL AB" ISSUER "/C=SE/ST=Uppsala/L=Uppsala/O=MySQL AB";
+grant select on test.* to ssl_user3@localhost require cipher "DHE-RSA-AES256-SHA" AND SUBJECT "/C=SE/ST=Stockholm/L=Stockholm/O=Oracle/OU=MySQL/CN=Client";
+grant select on test.* to ssl_user4@localhost require cipher "DHE-RSA-AES256-SHA" AND SUBJECT "/C=SE/ST=Stockholm/L=Stockholm/O=Oracle/OU=MySQL/CN=Client" ISSUER "/C=SE/ST=Stockholm/L=Stockholm/O=Oracle/OU=MySQL/CN=CA";
grant select on test.* to ssl_user5@localhost require cipher "DHE-RSA-AES256-SHA" AND SUBJECT "xxx";
flush privileges;