summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2011-12-12 13:00:33 +0100
committerSergei Golubchik <sergii@pisem.net>2011-12-12 13:00:33 +0100
commit745c53ec06794c4faaf0c9c3f9a1bf4ffc3f0759 (patch)
tree560abf8d5af4977dcacbce07a9502cb84d6bb003 /mysql-test
parent63d32c115dd962b53cf7bcaa340472ee2f44f9e2 (diff)
parent6404504d0c10d58ad5861bdb72edd54508f1364c (diff)
downloadmariadb-git-745c53ec06794c4faaf0c9c3f9a1bf4ffc3f0759.tar.gz
5.2->5.3 merge
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/Makefile.am2
-rwxr-xr-xmysql-test/mysql-test-run.pl2
-rw-r--r--mysql-test/r/group_min_max.result245
-rw-r--r--mysql-test/r/subselect.result2
-rw-r--r--mysql-test/r/subselect_no_mat.result2
-rw-r--r--mysql-test/r/subselect_no_opts.result2
-rw-r--r--mysql-test/r/subselect_no_scache.result2
-rw-r--r--mysql-test/r/subselect_no_semijoin.result2
-rw-r--r--mysql-test/suite/plugins/r/dialog.result26
-rw-r--r--mysql-test/suite/plugins/r/feedback_plugin_install.result (renamed from mysql-test/r/feedback_plugin_install.result)0
-rw-r--r--mysql-test/suite/plugins/r/feedback_plugin_load.result (renamed from mysql-test/r/feedback_plugin_load.result)0
-rw-r--r--mysql-test/suite/plugins/r/feedback_plugin_send.result (renamed from mysql-test/r/feedback_plugin_send.result)0
-rw-r--r--mysql-test/suite/plugins/r/fulltext_plugin.result (renamed from mysql-test/r/fulltext_plugin.result)0
-rw-r--r--mysql-test/suite/plugins/r/pam.result22
-rw-r--r--mysql-test/suite/plugins/suite.pm8
-rw-r--r--mysql-test/suite/plugins/t/dialog.test51
-rw-r--r--mysql-test/suite/plugins/t/feedback_plugin_install.opt (renamed from mysql-test/t/feedback_plugin_install.opt)0
-rw-r--r--mysql-test/suite/plugins/t/feedback_plugin_install.test (renamed from mysql-test/t/feedback_plugin_install.test)0
-rw-r--r--mysql-test/suite/plugins/t/feedback_plugin_load.opt (renamed from mysql-test/t/feedback_plugin_load.opt)0
-rw-r--r--mysql-test/suite/plugins/t/feedback_plugin_load.test (renamed from mysql-test/t/feedback_plugin_load.test)0
-rw-r--r--mysql-test/suite/plugins/t/feedback_plugin_send.test (renamed from mysql-test/t/feedback_plugin_send.test)2
-rw-r--r--mysql-test/suite/plugins/t/fulltext_plugin.test (renamed from mysql-test/t/fulltext_plugin.test)0
-rw-r--r--mysql-test/suite/plugins/t/pam.test46
-rw-r--r--mysql-test/t/group_min_max.test37
24 files changed, 443 insertions, 8 deletions
diff --git a/mysql-test/Makefile.am b/mysql-test/Makefile.am
index 64a5d8155bb..6a1e677fd79 100644
--- a/mysql-test/Makefile.am
+++ b/mysql-test/Makefile.am
@@ -110,7 +110,7 @@ TEST_DIRS = t r include std_data std_data/parts collections \
suite/innodb suite/innodb/t suite/innodb/r suite/innodb/include \
suite/innodb_plugin suite/innodb_plugin/t suite/innodb_plugin/r \
suite/innodb_plugin/include \
- suite/percona suite/handler \
+ suite/percona suite/handler suite/plugins suite/plugins/t suite/plugins/r \
suite/engines suite/engines/funcs suite/engines/iuds suite/engines/rr_trx \
suite/engines/funcs/r suite/engines/funcs/t suite/engines/iuds/r \
suite/engines/iuds/t suite/engines/rr_trx/include suite/engines/rr_trx/r \
diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl
index 8cf7c8b7970..3a2794093df 100755
--- a/mysql-test/mysql-test-run.pl
+++ b/mysql-test/mysql-test-run.pl
@@ -162,7 +162,7 @@ our $opt_vs_config = $ENV{'MTR_VS_CONFIG'};
my $DEFAULT_SUITES="main,binlog,federated,rpl,maria,handler,parts,innodb," .
"innodb_plugin,percona,ndb,vcol,oqgraph,sphinx," .
- "optimizer_unfixed_bugs";
+ "optimizer_unfixed_bugs,plugins";
my $opt_suites;
our $opt_verbose= 0; # Verbose output, enable with --verbose
diff --git a/mysql-test/r/group_min_max.result b/mysql-test/r/group_min_max.result
index a215063d0aa..09e7cf1b5a5 100644
--- a/mysql-test/r/group_min_max.result
+++ b/mysql-test/r/group_min_max.result
@@ -2927,4 +2927,249 @@ ORDER BY min_a;
min_a
NULL
DROP TABLE t1;
+#
+# LP BUG#888456 Wrong result with DISTINCT , ANY , subquery_cache=off , NOT NULL
+#
+CREATE TABLE t1 ( a int NOT NULL) ;
+INSERT INTO t1 VALUES (28),(29),(9);
+CREATE TABLE t2 ( a int, KEY (a)) ;
+INSERT INTO t2 VALUES (1),(1),(1),(4),(4),(5),(5),(8),(8),(9);
+explain select (select t2.a from t2 where t2.a >= t1.a group by t2.a) from t1;
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t1 ALL NULL NULL NULL NULL 3
+2 DEPENDENT SUBQUERY t2 index a a 5 NULL 10 Using where; Using index
+select (select t2.a from t2 where t2.a >= t1.a group by t2.a) from t1;
+(select t2.a from t2 where t2.a >= t1.a group by t2.a)
+NULL
+NULL
+9
+drop table t1, t2;
+#
+# LP BUG#900375 Wrong result with derived_merge=ON, DISTINCT or GROUP BY, EXISTS
+#
+CREATE TABLE t1 ( a INT, b INT, KEY (b) );
+INSERT INTO t1 VALUES
+(100,10),(101,11),(102,12),(103,13),(104,14),
+(105,15),(106,16),(107,17),(108,18),(109,19);
+EXPLAIN
+SELECT alias1.* FROM t1, (SELECT * FROM t1) AS alias1
+WHERE EXISTS ( SELECT DISTINCT b FROM t1 WHERE b <= alias1.a ) ;
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t1 index NULL b 5 NULL 10 Using index
+1 PRIMARY t1 ALL NULL NULL NULL NULL 10 Using where; Using join buffer (flat, BNL join)
+3 DEPENDENT SUBQUERY t1 index b b 5 NULL 10 Using where; Using index; Using temporary
+SELECT alias1.* FROM t1, (SELECT * FROM t1) AS alias1
+WHERE EXISTS ( SELECT DISTINCT b FROM t1 WHERE b <= alias1.a ) ;
+a b
+100 10
+100 10
+100 10
+100 10
+100 10
+100 10
+100 10
+100 10
+100 10
+100 10
+101 11
+101 11
+101 11
+101 11
+101 11
+101 11
+101 11
+101 11
+101 11
+101 11
+102 12
+102 12
+102 12
+102 12
+102 12
+102 12
+102 12
+102 12
+102 12
+102 12
+103 13
+103 13
+103 13
+103 13
+103 13
+103 13
+103 13
+103 13
+103 13
+103 13
+104 14
+104 14
+104 14
+104 14
+104 14
+104 14
+104 14
+104 14
+104 14
+104 14
+105 15
+105 15
+105 15
+105 15
+105 15
+105 15
+105 15
+105 15
+105 15
+105 15
+106 16
+106 16
+106 16
+106 16
+106 16
+106 16
+106 16
+106 16
+106 16
+106 16
+107 17
+107 17
+107 17
+107 17
+107 17
+107 17
+107 17
+107 17
+107 17
+107 17
+108 18
+108 18
+108 18
+108 18
+108 18
+108 18
+108 18
+108 18
+108 18
+108 18
+109 19
+109 19
+109 19
+109 19
+109 19
+109 19
+109 19
+109 19
+109 19
+109 19
+EXPLAIN
+SELECT alias1.* FROM t1, t1 AS alias1
+WHERE EXISTS ( SELECT DISTINCT b FROM t1 WHERE b <= alias1.a ) ;
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t1 index NULL b 5 NULL 10 Using index
+1 PRIMARY alias1 ALL NULL NULL NULL NULL 10 Using where; Using join buffer (flat, BNL join)
+2 DEPENDENT SUBQUERY t1 ALL b NULL NULL NULL 10 Range checked for each record (index map: 0x1); Using temporary
+SELECT alias1.* FROM t1, t1 AS alias1
+WHERE EXISTS ( SELECT DISTINCT b FROM t1 WHERE b <= alias1.a ) ;
+a b
+100 10
+100 10
+100 10
+100 10
+100 10
+100 10
+100 10
+100 10
+100 10
+100 10
+101 11
+101 11
+101 11
+101 11
+101 11
+101 11
+101 11
+101 11
+101 11
+101 11
+102 12
+102 12
+102 12
+102 12
+102 12
+102 12
+102 12
+102 12
+102 12
+102 12
+103 13
+103 13
+103 13
+103 13
+103 13
+103 13
+103 13
+103 13
+103 13
+103 13
+104 14
+104 14
+104 14
+104 14
+104 14
+104 14
+104 14
+104 14
+104 14
+104 14
+105 15
+105 15
+105 15
+105 15
+105 15
+105 15
+105 15
+105 15
+105 15
+105 15
+106 16
+106 16
+106 16
+106 16
+106 16
+106 16
+106 16
+106 16
+106 16
+106 16
+107 17
+107 17
+107 17
+107 17
+107 17
+107 17
+107 17
+107 17
+107 17
+107 17
+108 18
+108 18
+108 18
+108 18
+108 18
+108 18
+108 18
+108 18
+108 18
+108 18
+109 19
+109 19
+109 19
+109 19
+109 19
+109 19
+109 19
+109 19
+109 19
+109 19
+drop table t1;
End of 5.1 tests
diff --git a/mysql-test/r/subselect.result b/mysql-test/r/subselect.result
index 3c12b8a40fa..414e31f238b 100644
--- a/mysql-test/r/subselect.result
+++ b/mysql-test/r/subselect.result
@@ -5649,7 +5649,7 @@ WHERE f1_key != table2.f1_key AND f1_key >= table1.f1 );
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY table1 ALL NULL NULL NULL NULL 2
1 PRIMARY table2 index NULL f1_key 4 NULL 10 Using where; Using index; Using join buffer (flat, BNL join)
-2 DEPENDENT SUBQUERY t2 range f1_key f1_key 4 NULL 6 Range checked for each record (index map: 0x1); Using temporary
+2 DEPENDENT SUBQUERY t2 ALL f1_key NULL NULL NULL 10 Range checked for each record (index map: 0x1); Using temporary
DROP TABLE t1,t2;
#
# LP bug #826279: assertion failure with GROUP BY a result of subquery
diff --git a/mysql-test/r/subselect_no_mat.result b/mysql-test/r/subselect_no_mat.result
index 48ae9780edc..10b4f5a6af7 100644
--- a/mysql-test/r/subselect_no_mat.result
+++ b/mysql-test/r/subselect_no_mat.result
@@ -5648,7 +5648,7 @@ WHERE f1_key != table2.f1_key AND f1_key >= table1.f1 );
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY table1 ALL NULL NULL NULL NULL 2
1 PRIMARY table2 index NULL f1_key 4 NULL 10 Using where; Using index; Using join buffer (flat, BNL join)
-2 DEPENDENT SUBQUERY t2 range f1_key f1_key 4 NULL 6 Range checked for each record (index map: 0x1); Using temporary
+2 DEPENDENT SUBQUERY t2 ALL f1_key NULL NULL NULL 10 Range checked for each record (index map: 0x1); Using temporary
DROP TABLE t1,t2;
#
# LP bug #826279: assertion failure with GROUP BY a result of subquery
diff --git a/mysql-test/r/subselect_no_opts.result b/mysql-test/r/subselect_no_opts.result
index 26b793d37ab..c809dcdfda8 100644
--- a/mysql-test/r/subselect_no_opts.result
+++ b/mysql-test/r/subselect_no_opts.result
@@ -5644,7 +5644,7 @@ WHERE f1_key != table2.f1_key AND f1_key >= table1.f1 );
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY table1 ALL NULL NULL NULL NULL 2
1 PRIMARY table2 index NULL f1_key 4 NULL 10 Using where; Using index; Using join buffer (flat, BNL join)
-2 DEPENDENT SUBQUERY t2 range f1_key f1_key 4 NULL 6 Range checked for each record (index map: 0x1); Using temporary
+2 DEPENDENT SUBQUERY t2 ALL f1_key NULL NULL NULL 10 Range checked for each record (index map: 0x1); Using temporary
DROP TABLE t1,t2;
#
# LP bug #826279: assertion failure with GROUP BY a result of subquery
diff --git a/mysql-test/r/subselect_no_scache.result b/mysql-test/r/subselect_no_scache.result
index eb57bd2ff5c..6dabc727214 100644
--- a/mysql-test/r/subselect_no_scache.result
+++ b/mysql-test/r/subselect_no_scache.result
@@ -5653,7 +5653,7 @@ WHERE f1_key != table2.f1_key AND f1_key >= table1.f1 );
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY table1 ALL NULL NULL NULL NULL 2
1 PRIMARY table2 index NULL f1_key 4 NULL 10 Using where; Using index; Using join buffer (flat, BNL join)
-2 DEPENDENT SUBQUERY t2 range f1_key f1_key 4 NULL 6 Range checked for each record (index map: 0x1); Using temporary
+2 DEPENDENT SUBQUERY t2 ALL f1_key NULL NULL NULL 10 Range checked for each record (index map: 0x1); Using temporary
DROP TABLE t1,t2;
#
# LP bug #826279: assertion failure with GROUP BY a result of subquery
diff --git a/mysql-test/r/subselect_no_semijoin.result b/mysql-test/r/subselect_no_semijoin.result
index fcdcb90e434..cb2704127c4 100644
--- a/mysql-test/r/subselect_no_semijoin.result
+++ b/mysql-test/r/subselect_no_semijoin.result
@@ -5644,7 +5644,7 @@ WHERE f1_key != table2.f1_key AND f1_key >= table1.f1 );
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY table1 ALL NULL NULL NULL NULL 2
1 PRIMARY table2 index NULL f1_key 4 NULL 10 Using where; Using index; Using join buffer (flat, BNL join)
-2 DEPENDENT SUBQUERY t2 range f1_key f1_key 4 NULL 6 Range checked for each record (index map: 0x1); Using temporary
+2 DEPENDENT SUBQUERY t2 ALL f1_key NULL NULL NULL 10 Range checked for each record (index map: 0x1); Using temporary
DROP TABLE t1,t2;
#
# LP bug #826279: assertion failure with GROUP BY a result of subquery
diff --git a/mysql-test/suite/plugins/r/dialog.result b/mysql-test/suite/plugins/r/dialog.result
new file mode 100644
index 00000000000..da3117fd491
--- /dev/null
+++ b/mysql-test/suite/plugins/r/dialog.result
@@ -0,0 +1,26 @@
+install plugin three_attempts soname 'dialog.so';
+create user test_dialog identified via three_attempts using 'SECRET';
+#
+# -pSECRET is picked up, no questions asked.
+#
+select user(), current_user();
+user() current_user()
+test_dialog@localhost test_dialog@%
+#
+# without -p. up to three questions are asked on the stdin.
+# athentication is successful, the correct pasword is on the third line
+#
+Password, please: ***
+Password, please: ****
+Password, please: ******
+select user(), current_user();
+user() current_user()
+test_dialog@localhost test_dialog@%
+#
+# athentication is unsuccessful, first three lines are all wrong
+#
+Password, please: ***
+Password, please: ****
+Password, please: *****
+drop user test_dialog;
+uninstall plugin three_attempts;
diff --git a/mysql-test/r/feedback_plugin_install.result b/mysql-test/suite/plugins/r/feedback_plugin_install.result
index b1b35072a08..b1b35072a08 100644
--- a/mysql-test/r/feedback_plugin_install.result
+++ b/mysql-test/suite/plugins/r/feedback_plugin_install.result
diff --git a/mysql-test/r/feedback_plugin_load.result b/mysql-test/suite/plugins/r/feedback_plugin_load.result
index d434d1282c5..d434d1282c5 100644
--- a/mysql-test/r/feedback_plugin_load.result
+++ b/mysql-test/suite/plugins/r/feedback_plugin_load.result
diff --git a/mysql-test/r/feedback_plugin_send.result b/mysql-test/suite/plugins/r/feedback_plugin_send.result
index db622cb3f97..db622cb3f97 100644
--- a/mysql-test/r/feedback_plugin_send.result
+++ b/mysql-test/suite/plugins/r/feedback_plugin_send.result
diff --git a/mysql-test/r/fulltext_plugin.result b/mysql-test/suite/plugins/r/fulltext_plugin.result
index 69ebbe07e9e..69ebbe07e9e 100644
--- a/mysql-test/r/fulltext_plugin.result
+++ b/mysql-test/suite/plugins/r/fulltext_plugin.result
diff --git a/mysql-test/suite/plugins/r/pam.result b/mysql-test/suite/plugins/r/pam.result
new file mode 100644
index 00000000000..1c9036c317e
--- /dev/null
+++ b/mysql-test/suite/plugins/r/pam.result
@@ -0,0 +1,22 @@
+install plugin pam soname 'auth_pam.so';
+create user test_pam identified via pam using 'mariadb_mtr';
+#
+# athentication is successful, challenge/pin are ok
+# note that current_user() differts from user()
+#
+Challenge input first.
+Enter: not very secret challenge
+Now, the magic number!
+PIN: ****
+select user(), current_user(), database();
+user() current_user() database()
+test_pam@localhost pam_test@% test
+#
+# athentication is unsuccessful
+#
+Challenge input first.
+Enter: not very secret challenge
+Now, the magic number!
+PIN: ****
+drop user test_pam;
+uninstall plugin pam;
diff --git a/mysql-test/suite/plugins/suite.pm b/mysql-test/suite/plugins/suite.pm
new file mode 100644
index 00000000000..f8f78086c15
--- /dev/null
+++ b/mysql-test/suite/plugins/suite.pm
@@ -0,0 +1,8 @@
+package My::Suite::Plugins;
+
+@ISA = qw(My::Suite);
+
+$ENV{PAM_SETUP_FOR_MTR}=1 if -e '/etc/pam.d/mariadb_mtr';
+
+bless { };
+
diff --git a/mysql-test/suite/plugins/t/dialog.test b/mysql-test/suite/plugins/t/dialog.test
new file mode 100644
index 00000000000..47452643609
--- /dev/null
+++ b/mysql-test/suite/plugins/t/dialog.test
@@ -0,0 +1,51 @@
+#
+# test for the client "dialog" plugin
+#
+
+--source include/not_embedded.inc
+
+if (!$DIALOG_SO) {
+ skip No dialog auth plugin;
+}
+
+--replace_result .dll .so
+eval install plugin three_attempts soname '$DIALOG_SO';
+create user test_dialog identified via three_attempts using 'SECRET';
+
+let $plugindir=`SELECT @@global.plugin_dir`;
+
+--write_file $MYSQLTEST_VARDIR/tmp/dialog_good.txt
+foo
+1234
+SECRET
+select user(), current_user();
+EOF
+
+--write_file $MYSQLTEST_VARDIR/tmp/dialog_bad.txt
+foo
+1234
+wrong
+SECRET
+EOF
+
+--echo #
+--echo # -pSECRET is picked up, no questions asked.
+--echo #
+--exec echo "select user(), current_user();"|$MYSQL_TEST -u test_dialog -pSECRET --plugin-dir=$plugindir
+
+--echo #
+--echo # without -p. up to three questions are asked on the stdin.
+--echo # athentication is successful, the correct pasword is on the third line
+--echo #
+--exec $MYSQL_TEST -u test_dialog --plugin-dir=$plugindir < $MYSQLTEST_VARDIR/tmp/dialog_good.txt
+
+--echo #
+--echo # athentication is unsuccessful, first three lines are all wrong
+--echo #
+--error 1
+--exec $MYSQL_TEST -u test_dialog --plugin-dir=$plugindir < $MYSQLTEST_VARDIR/tmp/dialog_bad.txt
+
+--remove_file $MYSQLTEST_VARDIR/tmp/dialog_good.txt
+--remove_file $MYSQLTEST_VARDIR/tmp/dialog_bad.txt
+drop user test_dialog;
+uninstall plugin three_attempts;
diff --git a/mysql-test/t/feedback_plugin_install.opt b/mysql-test/suite/plugins/t/feedback_plugin_install.opt
index a711ae94e69..a711ae94e69 100644
--- a/mysql-test/t/feedback_plugin_install.opt
+++ b/mysql-test/suite/plugins/t/feedback_plugin_install.opt
diff --git a/mysql-test/t/feedback_plugin_install.test b/mysql-test/suite/plugins/t/feedback_plugin_install.test
index 81343c436c3..81343c436c3 100644
--- a/mysql-test/t/feedback_plugin_install.test
+++ b/mysql-test/suite/plugins/t/feedback_plugin_install.test
diff --git a/mysql-test/t/feedback_plugin_load.opt b/mysql-test/suite/plugins/t/feedback_plugin_load.opt
index 5fbb2f83954..5fbb2f83954 100644
--- a/mysql-test/t/feedback_plugin_load.opt
+++ b/mysql-test/suite/plugins/t/feedback_plugin_load.opt
diff --git a/mysql-test/t/feedback_plugin_load.test b/mysql-test/suite/plugins/t/feedback_plugin_load.test
index 5ad301667b4..5ad301667b4 100644
--- a/mysql-test/t/feedback_plugin_load.test
+++ b/mysql-test/suite/plugins/t/feedback_plugin_load.test
diff --git a/mysql-test/t/feedback_plugin_send.test b/mysql-test/suite/plugins/t/feedback_plugin_send.test
index d882539cfea..3324ef469fe 100644
--- a/mysql-test/t/feedback_plugin_send.test
+++ b/mysql-test/suite/plugins/t/feedback_plugin_send.test
@@ -1,4 +1,4 @@
-source t/feedback_plugin_load.test;
+source feedback_plugin_load.test;
if (!$MTR_FEEDBACK_PLUGIN) {
skip MTR_FEEDBACK_PLUGIN is not set;
diff --git a/mysql-test/t/fulltext_plugin.test b/mysql-test/suite/plugins/t/fulltext_plugin.test
index 0e2f53d5b15..0e2f53d5b15 100644
--- a/mysql-test/t/fulltext_plugin.test
+++ b/mysql-test/suite/plugins/t/fulltext_plugin.test
diff --git a/mysql-test/suite/plugins/t/pam.test b/mysql-test/suite/plugins/t/pam.test
new file mode 100644
index 00000000000..3f4c563d8dc
--- /dev/null
+++ b/mysql-test/suite/plugins/t/pam.test
@@ -0,0 +1,46 @@
+
+--source include/not_embedded.inc
+
+if (!$AUTH_PAM_SO) {
+ skip No pam auth plugin;
+}
+
+if (!$PAM_SETUP_FOR_MTR) {
+ skip No pam setup for mtr;
+}
+
+--replace_result .dll .so
+eval install plugin pam soname '$AUTH_PAM_SO';
+create user test_pam identified via pam using 'mariadb_mtr';
+
+let $plugindir=`SELECT @@global.plugin_dir`;
+
+--write_file $MYSQLTEST_VARDIR/tmp/pam_good.txt
+not very secret challenge
+9225
+select user(), current_user(), database();
+EOF
+
+--write_file $MYSQLTEST_VARDIR/tmp/pam_bad.txt
+not very secret challenge
+9224
+select user(), current_user(), database();
+EOF
+
+--echo #
+--echo # athentication is successful, challenge/pin are ok
+--echo # note that current_user() differts from user()
+--echo #
+--exec $MYSQL_TEST -u test_pam --plugin-dir=$plugindir < $MYSQLTEST_VARDIR/tmp/pam_good.txt
+
+--echo #
+--echo # athentication is unsuccessful
+--echo #
+--error 1
+--exec $MYSQL_TEST -u test_pam --plugin-dir=$plugindir < $MYSQLTEST_VARDIR/tmp/pam_bad.txt
+
+--remove_file $MYSQLTEST_VARDIR/tmp/pam_good.txt
+--remove_file $MYSQLTEST_VARDIR/tmp/pam_bad.txt
+drop user test_pam;
+uninstall plugin pam;
+
diff --git a/mysql-test/t/group_min_max.test b/mysql-test/t/group_min_max.test
index 1ba06bee942..391d997d8b6 100644
--- a/mysql-test/t/group_min_max.test
+++ b/mysql-test/t/group_min_max.test
@@ -1149,5 +1149,42 @@ ORDER BY min_a;
DROP TABLE t1;
+--echo #
+--echo # LP BUG#888456 Wrong result with DISTINCT , ANY , subquery_cache=off , NOT NULL
+--echo #
+
+CREATE TABLE t1 ( a int NOT NULL) ;
+INSERT INTO t1 VALUES (28),(29),(9);
+
+CREATE TABLE t2 ( a int, KEY (a)) ;
+INSERT INTO t2 VALUES (1),(1),(1),(4),(4),(5),(5),(8),(8),(9);
+
+explain select (select t2.a from t2 where t2.a >= t1.a group by t2.a) from t1;
+select (select t2.a from t2 where t2.a >= t1.a group by t2.a) from t1;
+
+drop table t1, t2;
+
+--echo #
+--echo # LP BUG#900375 Wrong result with derived_merge=ON, DISTINCT or GROUP BY, EXISTS
+--echo #
+
+CREATE TABLE t1 ( a INT, b INT, KEY (b) );
+INSERT INTO t1 VALUES
+(100,10),(101,11),(102,12),(103,13),(104,14),
+(105,15),(106,16),(107,17),(108,18),(109,19);
+
+EXPLAIN
+SELECT alias1.* FROM t1, (SELECT * FROM t1) AS alias1
+WHERE EXISTS ( SELECT DISTINCT b FROM t1 WHERE b <= alias1.a ) ;
+SELECT alias1.* FROM t1, (SELECT * FROM t1) AS alias1
+WHERE EXISTS ( SELECT DISTINCT b FROM t1 WHERE b <= alias1.a ) ;
+
+EXPLAIN
+SELECT alias1.* FROM t1, t1 AS alias1
+WHERE EXISTS ( SELECT DISTINCT b FROM t1 WHERE b <= alias1.a ) ;
+SELECT alias1.* FROM t1, t1 AS alias1
+WHERE EXISTS ( SELECT DISTINCT b FROM t1 WHERE b <= alias1.a ) ;
+
+drop table t1;
--echo End of 5.1 tests