summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorunknown <bar@mysql.com/bar.intranet.mysql.r18.ru>2006-12-08 15:18:03 +0400
committerunknown <bar@mysql.com/bar.intranet.mysql.r18.ru>2006-12-08 15:18:03 +0400
commit6aa09b4c23d22d90107e6a5ae24462c7ab05fde5 (patch)
treed04dd2918a4dbcb24726e33b14405527a4b403c6 /mysql-test
parentb93baf4832951f70231a7d2063cfe4f41c677a8f (diff)
parentfa46c80340e13c76bcab21d2eef9b5dd8f539a7e (diff)
downloadmariadb-git-6aa09b4c23d22d90107e6a5ae24462c7ab05fde5.tar.gz
Merge abarkov@bk-internal.mysql.com:/home/bk/mysql-5.0-rpl
into mysql.com:/usr/home/bar/mysql-5.0.b24158
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/rpl_do_grant.result11
-rw-r--r--mysql-test/t/rpl_do_grant.test16
2 files changed, 27 insertions, 0 deletions
diff --git a/mysql-test/r/rpl_do_grant.result b/mysql-test/r/rpl_do_grant.result
index ff3e059503c..fe6ef3c26bc 100644
--- a/mysql-test/r/rpl_do_grant.result
+++ b/mysql-test/r/rpl_do_grant.result
@@ -20,6 +20,17 @@ set password for rpl_do_grant@localhost=password("does it work?");
select password<>_binary'' from mysql.user where user=_binary'rpl_do_grant';
password<>_binary''
1
+update mysql.user set password='' where user='rpl_do_grant';
+flush privileges;
+select password<>'' from mysql.user where user='rpl_do_grant';
+password<>''
+0
+set sql_mode='ANSI_QUOTES';
+set password for rpl_do_grant@localhost=password('does it work?');
+set sql_mode='';
+select password<>'' from mysql.user where user='rpl_do_grant';
+password<>''
+1
delete from mysql.user where user=_binary'rpl_do_grant';
delete from mysql.db where user=_binary'rpl_do_grant';
flush privileges;
diff --git a/mysql-test/t/rpl_do_grant.test b/mysql-test/t/rpl_do_grant.test
index 54287a67657..4a9c1554630 100644
--- a/mysql-test/t/rpl_do_grant.test
+++ b/mysql-test/t/rpl_do_grant.test
@@ -33,6 +33,22 @@ connection slave;
sync_with_master;
select password<>_binary'' from mysql.user where user=_binary'rpl_do_grant';
+#
+# Bug#24158 SET PASSWORD in binary log fails under ANSI_QUOTES
+#
+connection master;
+update mysql.user set password='' where user='rpl_do_grant';
+flush privileges;
+select password<>'' from mysql.user where user='rpl_do_grant';
+set sql_mode='ANSI_QUOTES';
+set password for rpl_do_grant@localhost=password('does it work?');
+set sql_mode='';
+save_master_pos;
+connection slave;
+sync_with_master;
+select password<>'' from mysql.user where user='rpl_do_grant';
+
+
# clear what we have done, to not influence other tests.
connection master;
delete from mysql.user where user=_binary'rpl_do_grant';