summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorunknown <serg@serg.mylan>2004-08-24 17:24:23 +0200
committerunknown <serg@serg.mylan>2004-08-24 17:24:23 +0200
commita49c12f5152791042eeecac19db9054ad845e3dd (patch)
tree35c94403332fed86012546db775d8817473f7435 /mysql-test
parent62a63815e119807134de74edb78e478b75a6b874 (diff)
parent9d1a9d72cba1aa828e631f520540411d7508a4e0 (diff)
downloadmariadb-git-a49c12f5152791042eeecac19db9054ad845e3dd.tar.gz
manually merged
BitKeeper/etc/logging_ok: auto-union mysql-test/r/binary.result: Auto merged mysql-test/r/truncate.result: Auto merged mysql-test/t/binary.test: Auto merged mysql-test/t/truncate.test: Auto merged mysys/my_lib.c: Auto merged strings/my_vsnprintf.c: Auto merged support-files/Makefile.am: Auto merged
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/mysql-test-run.sh6
-rw-r--r--mysql-test/r/func_set.result9
-rw-r--r--mysql-test/r/truncate.result21
-rw-r--r--mysql-test/r/variables.result16
-rw-r--r--mysql-test/t/func_set.test12
-rw-r--r--mysql-test/t/truncate.test16
-rw-r--r--mysql-test/t/variables.test11
7 files changed, 86 insertions, 5 deletions
diff --git a/mysql-test/mysql-test-run.sh b/mysql-test/mysql-test-run.sh
index 58d7af75284..454dc7b327b 100644
--- a/mysql-test/mysql-test-run.sh
+++ b/mysql-test/mysql-test-run.sh
@@ -367,10 +367,12 @@ while test $# -gt 0; do
VALGRIND=`which valgrind` # this will print an error if not found
# Give good warning to the user and stop
if [ -z "$VALGRIND" ] ; then
- $ECHO "You need to have the 'valgrind' program in your PATH to run mysql-test-run with option --valgrind. Valgrind's home page is http://developer.kde.org/~sewardj ."
+ $ECHO "You need to have the 'valgrind' program in your PATH to run mysql-test-run with option --valgrind. Valgrind's home page is http://valgrind.kde.org ."
exit 1
fi
- VALGRIND="$VALGRIND --tool=memcheck --alignment=8 --leak-check=yes --num-callers=16"
+ # >=2.1.2 requires the --tool option, some versions write to stdout, some to stderr
+ valgrind --help 2>&1 | grep "\-\-tool" > /dev/null && VALGRIND="$VALGRIND --tool=memcheck"
+ VALGRIND="$VALGRIND --alignment=8 --leak-check=yes --num-callers=16"
EXTRA_MASTER_MYSQLD_OPT="$EXTRA_MASTER_MYSQLD_OPT --skip-safemalloc --skip-bdb"
EXTRA_SLAVE_MYSQLD_OPT="$EXTRA_SLAVE_MYSQLD_OPT --skip-safemalloc --skip-bdb"
SLEEP_TIME_AFTER_RESTART=10
diff --git a/mysql-test/r/func_set.result b/mysql-test/r/func_set.result
index 4918617f85f..9c1cac790ff 100644
--- a/mysql-test/r/func_set.result
+++ b/mysql-test/r/func_set.result
@@ -56,3 +56,12 @@ id elt(two.val,'one','two')
2 one
4 two
drop table t1,t2;
+select find_in_set(binary 'a',binary 'A,B,C');
+find_in_set(binary 'a',binary 'A,B,C')
+0
+select find_in_set('a',binary 'A,B,C');
+find_in_set('a',binary 'A,B,C')
+0
+select find_in_set(binary 'a', 'A,B,C');
+find_in_set(binary 'a', 'A,B,C')
+0
diff --git a/mysql-test/r/truncate.result b/mysql-test/r/truncate.result
index d777bd184b2..74a6cb72cc6 100644
--- a/mysql-test/r/truncate.result
+++ b/mysql-test/r/truncate.result
@@ -31,4 +31,25 @@ SELECT * from t1;
a
1
2
+delete from t1;
+insert into t1 (a) values (NULL),(NULL);
+SELECT * from t1;
+a
+3
+4
+drop table t1;
+create temporary table t1 (a integer auto_increment primary key);
+insert into t1 (a) values (NULL),(NULL);
+truncate table t1;
+insert into t1 (a) values (NULL),(NULL);
+SELECT * from t1;
+a
+1
+2
+delete from t1;
+insert into t1 (a) values (NULL),(NULL);
+SELECT * from t1;
+a
+3
+4
drop table t1;
diff --git a/mysql-test/r/variables.result b/mysql-test/r/variables.result
index 41ea95cf933..5d3f32cdd55 100644
--- a/mysql-test/r/variables.result
+++ b/mysql-test/r/variables.result
@@ -436,3 +436,19 @@ SELECT @@global.session.key_buffer_size;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'key_buffer_size' at line 1
SELECT @@global.local.key_buffer_size;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'key_buffer_size' at line 1
+set @tstlw = @@log_warnings;
+show global variables like 'log_warnings';
+Variable_name Value
+log_warnings 1
+set global log_warnings = 0;
+show global variables like 'log_warnings';
+Variable_name Value
+log_warnings 0
+set global log_warnings = 42;
+show global variables like 'log_warnings';
+Variable_name Value
+log_warnings 42
+set global log_warnings = @tstlw;
+show global variables like 'log_warnings';
+Variable_name Value
+log_warnings 1
diff --git a/mysql-test/t/func_set.test b/mysql-test/t/func_set.test
index 03843fd3da5..d669739bcb4 100644
--- a/mysql-test/t/func_set.test
+++ b/mysql-test/t/func_set.test
@@ -31,11 +31,19 @@ drop table if exists t1,t2;
--enable_warnings
create table t1 (id int(10) not null unique);
-create table t2 (id int(10) not null primary key,
-val int(10) not null);
+create table t2 (id int(10) not null primary key, val int(10) not null);
insert into t1 values (1),(2),(4);
insert into t2 values (1,1),(2,1),(3,1),(4,2);
select one.id, elt(two.val,'one','two') from t1 one, t2 two where two.id=one.id;
select one.id, elt(two.val,'one','two') from t1 one, t2 two where two.id=one.id order by one.id;
drop table t1,t2;
+
+#
+# Bug4340: find_in_set is case insensitive even on binary operators
+#
+
+select find_in_set(binary 'a',binary 'A,B,C');
+select find_in_set('a',binary 'A,B,C');
+select find_in_set(binary 'a', 'A,B,C');
+
diff --git a/mysql-test/t/truncate.test b/mysql-test/t/truncate.test
index 434a1907e42..b7ec506ecf1 100644
--- a/mysql-test/t/truncate.test
+++ b/mysql-test/t/truncate.test
@@ -26,7 +26,7 @@ drop table t1;
truncate non_existing_table;
#
-# test autoincrement with TRUNCATE
+# test autoincrement with TRUNCATE; verifying difference with DELETE
#
create table t1 (a integer auto_increment primary key);
@@ -34,5 +34,19 @@ insert into t1 (a) values (NULL),(NULL);
truncate table t1;
insert into t1 (a) values (NULL),(NULL);
SELECT * from t1;
+delete from t1;
+insert into t1 (a) values (NULL),(NULL);
+SELECT * from t1;
drop table t1;
+# Verifying that temp tables are handled the same way
+
+create temporary table t1 (a integer auto_increment primary key);
+insert into t1 (a) values (NULL),(NULL);
+truncate table t1;
+insert into t1 (a) values (NULL),(NULL);
+SELECT * from t1;
+delete from t1;
+insert into t1 (a) values (NULL),(NULL);
+SELECT * from t1;
+drop table t1;
diff --git a/mysql-test/t/variables.test b/mysql-test/t/variables.test
index 60ebeb045f5..a480ecb570a 100644
--- a/mysql-test/t/variables.test
+++ b/mysql-test/t/variables.test
@@ -324,3 +324,14 @@ SELECT @@global.global.key_buffer_size;
SELECT @@global.session.key_buffer_size;
--error 1064
SELECT @@global.local.key_buffer_size;
+
+# BUG#5135: cannot turn on log_warnings with SET in 4.1 (and 4.0)
+set @tstlw = @@log_warnings;
+show global variables like 'log_warnings';
+set global log_warnings = 0;
+show global variables like 'log_warnings';
+set global log_warnings = 42;
+show global variables like 'log_warnings';
+set global log_warnings = @tstlw;
+show global variables like 'log_warnings';
+