diff options
author | unknown <bar@mysql.com> | 2004-07-08 18:54:07 +0500 |
---|---|---|
committer | unknown <bar@mysql.com> | 2004-07-08 18:54:07 +0500 |
commit | 27dc52fa022ba3d7d9cd87b866d84d9c03940048 (patch) | |
tree | c43bdd35c88c202349d72278d66beb8e80b93041 /mysql-test | |
parent | 80e005737b921624a7cf9d6dbdea6597897341e1 (diff) | |
download | mariadb-git-27dc52fa022ba3d7d9cd87b866d84d9c03940048.tar.gz |
Bug#4338: mysql-test-run fails if compiled with non-latin1 character set
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/r/alter_table.result | 2 | ||||
-rw-r--r-- | mysql-test/r/connect.result | 4 | ||||
-rw-r--r-- | mysql-test/r/grant.result | 1 | ||||
-rw-r--r-- | mysql-test/r/grant2.result | 1 | ||||
-rw-r--r-- | mysql-test/r/grant_cache.result | 1 | ||||
-rw-r--r-- | mysql-test/r/multi_update.result | 2 | ||||
-rw-r--r-- | mysql-test/r/rpl000001.result | 8 | ||||
-rw-r--r-- | mysql-test/r/rpl_do_grant.result | 16 | ||||
-rw-r--r-- | mysql-test/r/rpl_ignore_grant.result | 24 | ||||
-rw-r--r-- | mysql-test/r/show_check.result | 1 | ||||
-rw-r--r-- | mysql-test/t/alter_table.test | 2 | ||||
-rw-r--r-- | mysql-test/t/connect.test | 4 | ||||
-rw-r--r-- | mysql-test/t/grant.test | 2 | ||||
-rw-r--r-- | mysql-test/t/grant2.test | 2 | ||||
-rw-r--r-- | mysql-test/t/grant_cache.test | 9 | ||||
-rw-r--r-- | mysql-test/t/multi_update.test | 2 | ||||
-rw-r--r-- | mysql-test/t/rpl000001.test | 8 | ||||
-rw-r--r-- | mysql-test/t/rpl_do_grant.test | 14 | ||||
-rw-r--r-- | mysql-test/t/rpl_ignore_grant.test | 22 | ||||
-rw-r--r-- | mysql-test/t/show_check.test | 1 |
20 files changed, 72 insertions, 54 deletions
diff --git a/mysql-test/r/alter_table.result b/mysql-test/r/alter_table.result index 1441b3c3600..5d50a3da666 100644 --- a/mysql-test/r/alter_table.result +++ b/mysql-test/r/alter_table.result @@ -123,7 +123,7 @@ grant all on mysqltest.t1 to mysqltest_1@localhost; alter table t1 rename t2; ERROR 42000: insert command denied to user 'mysqltest_1'@'localhost' for table 't2' revoke all privileges on mysqltest.t1 from mysqltest_1@localhost; -delete from mysql.user where user='mysqltest_1'; +delete from mysql.user where user=_binary'mysqltest_1'; drop database mysqltest; create table t1 (n1 int not null, n2 int, n3 int, n4 float, unique(n1), diff --git a/mysql-test/r/connect.result b/mysql-test/r/connect.result index 6ac32232b2b..10c5d6cc0b8 100644 --- a/mysql-test/r/connect.result +++ b/mysql-test/r/connect.result @@ -38,7 +38,7 @@ time_zone_transition_type user show tables; Tables_in_test -update mysql.user set password=old_password("gambling2") where user="test"; +update mysql.user set password=old_password("gambling2") where user=_binary"test"; flush privileges; set password=old_password('gambling3'); show tables; @@ -60,5 +60,5 @@ time_zone_transition_type user show tables; Tables_in_test -delete from mysql.user where user="test"; +delete from mysql.user where user=_binary"test"; flush privileges; diff --git a/mysql-test/r/grant.result b/mysql-test/r/grant.result index 0ae4ec8dee1..aa6c0c3f505 100644 --- a/mysql-test/r/grant.result +++ b/mysql-test/r/grant.result @@ -1,4 +1,5 @@ drop table if exists t1; +SET NAMES binary; delete from mysql.user where user='mysqltest_1'; delete from mysql.db where user='mysqltest_1'; flush privileges; diff --git a/mysql-test/r/grant2.result b/mysql-test/r/grant2.result index 6f341e12344..31e506d2679 100644 --- a/mysql-test/r/grant2.result +++ b/mysql-test/r/grant2.result @@ -1,3 +1,4 @@ +SET NAMES binary; delete from mysql.user where user like 'mysqltest\_%'; delete from mysql.db where user like 'mysqltest\_%'; flush privileges; diff --git a/mysql-test/r/grant_cache.result b/mysql-test/r/grant_cache.result index b890f2e454e..892f1d940a6 100644 --- a/mysql-test/r/grant_cache.result +++ b/mysql-test/r/grant_cache.result @@ -198,6 +198,7 @@ Qcache_hits 8 show status like "Qcache_not_cached"; Variable_name Value Qcache_not_cached 8 +set names binary; delete from mysql.user where user in ("mysqltest_1","mysqltest_2","mysqltest_3"); delete from mysql.db where user in ("mysqltest_1","mysqltest_2","mysqltest_3"); delete from mysql.tables_priv where user in ("mysqltest_1","mysqltest_2","mysqltest_3"); diff --git a/mysql-test/r/multi_update.result b/mysql-test/r/multi_update.result index b4b78dc4b5b..39ec9ff4eb9 100644 --- a/mysql-test/r/multi_update.result +++ b/mysql-test/r/multi_update.result @@ -447,7 +447,7 @@ update t1, t2 set t1.b=1 where t1.a=t2.a; update t1, t2 set t1.b=(select t3.b from t3 where t1.a=t3.a) where t1.a=t2.a; revoke all privileges on mysqltest.t1 from mysqltest_1@localhost; revoke all privileges on mysqltest.* from mysqltest_1@localhost; -delete from mysql.user where user='mysqltest_1'; +delete from mysql.user where user=_binary'mysqltest_1'; drop database mysqltest; create table t1 (a int, primary key (a)); create table t2 (a int, primary key (a)); diff --git a/mysql-test/r/rpl000001.result b/mysql-test/r/rpl000001.result index b60cad18c54..eef986d8f8c 100644 --- a/mysql-test/r/rpl000001.result +++ b/mysql-test/r/rpl000001.result @@ -76,17 +76,17 @@ create table t1 (n int); insert into t1 values(3456); insert into mysql.user (Host, User, Password) VALUES ("10.10.10.%", "blafasel2", password("blafasel2")); -select select_priv,user from mysql.user where user = 'blafasel2'; +select select_priv,user from mysql.user where user = _binary'blafasel2'; select_priv user N blafasel2 -update mysql.user set Select_priv = "Y" where User="blafasel2"; -select select_priv,user from mysql.user where user = 'blafasel2'; +update mysql.user set Select_priv = "Y" where User= _binary"blafasel2"; +select select_priv,user from mysql.user where user = _binary'blafasel2'; select_priv user Y blafasel2 select n from t1; n 3456 -select select_priv,user from mysql.user where user = 'blafasel2'; +select select_priv,user from mysql.user where user = _binary'blafasel2'; select_priv user Y blafasel2 drop table t1; diff --git a/mysql-test/r/rpl_do_grant.result b/mysql-test/r/rpl_do_grant.result index 983cdf46620..ff3e059503c 100644 --- a/mysql-test/r/rpl_do_grant.result +++ b/mysql-test/r/rpl_do_grant.result @@ -4,11 +4,11 @@ reset master; reset slave; drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; start slave; -delete from mysql.user where user='rpl_do_grant'; -delete from mysql.db where user='rpl_do_grant'; +delete from mysql.user where user=_binary'rpl_do_grant'; +delete from mysql.db where user=_binary'rpl_do_grant'; flush privileges; -delete from mysql.user where user='rpl_ignore_grant'; -delete from mysql.db where user='rpl_ignore_grant'; +delete from mysql.user where user=_binary'rpl_ignore_grant'; +delete from mysql.db where user=_binary'rpl_ignore_grant'; flush privileges; grant select on *.* to rpl_do_grant@localhost; grant drop on test.* to rpl_do_grant@localhost; @@ -17,10 +17,10 @@ Grants for rpl_do_grant@localhost GRANT SELECT ON *.* TO 'rpl_do_grant'@'localhost' GRANT DROP ON `test`.* TO 'rpl_do_grant'@'localhost' set password for rpl_do_grant@localhost=password("does it work?"); -select password<>'' from mysql.user where user='rpl_do_grant'; -password<>'' +select password<>_binary'' from mysql.user where user=_binary'rpl_do_grant'; +password<>_binary'' 1 -delete from mysql.user where user='rpl_do_grant'; -delete from mysql.db where user='rpl_do_grant'; +delete from mysql.user where user=_binary'rpl_do_grant'; +delete from mysql.db where user=_binary'rpl_do_grant'; flush privileges; flush privileges; diff --git a/mysql-test/r/rpl_ignore_grant.result b/mysql-test/r/rpl_ignore_grant.result index 5e970e71d0b..5169cc8e888 100644 --- a/mysql-test/r/rpl_ignore_grant.result +++ b/mysql-test/r/rpl_ignore_grant.result @@ -4,11 +4,11 @@ reset master; reset slave; drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; start slave; -delete from mysql.user where user='rpl_ignore_grant'; -delete from mysql.db where user='rpl_ignore_grant'; +delete from mysql.user where user=_binary'rpl_ignore_grant'; +delete from mysql.db where user=_binary'rpl_ignore_grant'; flush privileges; -delete from mysql.user where user='rpl_ignore_grant'; -delete from mysql.db where user='rpl_ignore_grant'; +delete from mysql.user where user=_binary'rpl_ignore_grant'; +delete from mysql.db where user=_binary'rpl_ignore_grant'; flush privileges; grant select on *.* to rpl_ignore_grant@localhost; grant drop on test.* to rpl_ignore_grant@localhost; @@ -18,20 +18,20 @@ GRANT SELECT ON *.* TO 'rpl_ignore_grant'@'localhost' GRANT DROP ON `test`.* TO 'rpl_ignore_grant'@'localhost' show grants for rpl_ignore_grant@localhost; ERROR 42000: There is no such grant defined for user 'rpl_ignore_grant' on host 'localhost' -select count(*) from mysql.user where user='rpl_ignore_grant'; +select count(*) from mysql.user where user=_binary'rpl_ignore_grant'; count(*) 0 -select count(*) from mysql.db where user='rpl_ignore_grant'; +select count(*) from mysql.db where user=_binary'rpl_ignore_grant'; count(*) 0 grant select on *.* to rpl_ignore_grant@localhost; set password for rpl_ignore_grant@localhost=password("does it work?"); -select password<>'' from mysql.user where user='rpl_ignore_grant'; -password<>'' +select password<>_binary'' from mysql.user where user=_binary'rpl_ignore_grant'; +password<>_binary'' 0 -delete from mysql.user where user='rpl_ignore_grant'; -delete from mysql.db where user='rpl_ignore_grant'; +delete from mysql.user where user=_binary'rpl_ignore_grant'; +delete from mysql.db where user=_binary'rpl_ignore_grant'; flush privileges; -delete from mysql.user where user='rpl_ignore_grant'; -delete from mysql.db where user='rpl_ignore_grant'; +delete from mysql.user where user=_binary'rpl_ignore_grant'; +delete from mysql.db where user=_binary'rpl_ignore_grant'; flush privileges; diff --git a/mysql-test/r/show_check.result b/mysql-test/r/show_check.result index 8aa071b3ca1..3bea4c4509d 100644 --- a/mysql-test/r/show_check.result +++ b/mysql-test/r/show_check.result @@ -395,6 +395,7 @@ show create database test_$1; ERROR 42000: Access denied for user 'mysqltest_3'@'localhost' to database 'test_$1' drop table test_$1.t1; drop database test_$1; +set names binary; delete from mysql.user where user='mysqltest_1' || user='mysqltest_2' || user='mysqltest_3'; delete from mysql.db diff --git a/mysql-test/t/alter_table.test b/mysql-test/t/alter_table.test index 122dcaa6c49..5fed85d7f50 100644 --- a/mysql-test/t/alter_table.test +++ b/mysql-test/t/alter_table.test @@ -123,7 +123,7 @@ connection user1; alter table t1 rename t2; connection root; revoke all privileges on mysqltest.t1 from mysqltest_1@localhost; -delete from mysql.user where user='mysqltest_1'; +delete from mysql.user where user=_binary'mysqltest_1'; drop database mysqltest; # diff --git a/mysql-test/t/connect.test b/mysql-test/t/connect.test index 7585ff0f608..32c1479ae04 100644 --- a/mysql-test/t/connect.test +++ b/mysql-test/t/connect.test @@ -42,7 +42,7 @@ show tables; # check if old password version also works -update mysql.user set password=old_password("gambling2") where user="test"; +update mysql.user set password=old_password("gambling2") where user=_binary"test"; flush privileges; #connect (con1,localhost,test,gambling2,""); @@ -68,5 +68,5 @@ show tables; # remove user 'test' so that other tests which may use 'test' # do not depend on this test. -delete from mysql.user where user="test"; +delete from mysql.user where user=_binary"test"; flush privileges; diff --git a/mysql-test/t/grant.test b/mysql-test/t/grant.test index 6bd2fa0c703..c112a0e0c1d 100644 --- a/mysql-test/t/grant.test +++ b/mysql-test/t/grant.test @@ -5,6 +5,8 @@ drop table if exists t1; --enable_warnings +SET NAMES binary; + # # Test that SSL options works properly # diff --git a/mysql-test/t/grant2.test b/mysql-test/t/grant2.test index 1fc1ed78385..3a9afa7453b 100644 --- a/mysql-test/t/grant2.test +++ b/mysql-test/t/grant2.test @@ -1,3 +1,5 @@ +SET NAMES binary; + # # GRANT tests that require several connections # (usually it's GRANT, reconnect as another user, try something) diff --git a/mysql-test/t/grant_cache.test b/mysql-test/t/grant_cache.test index 7806253124e..a82cd732802 100644 --- a/mysql-test/t/grant_cache.test +++ b/mysql-test/t/grant_cache.test @@ -126,6 +126,15 @@ show status like "Qcache_not_cached"; # Cleanup connection root; +# +# A temporary 4.1 workaround to make this test pass if +# mysql was compiled with other than latin1 --with-charset=XXX. +# Without "set names binary" the below queries fail with +# "Illegal mix of collations" error. +# In 5.0 we will change grant tables to use NCHAR(N) instead +# of "CHAR(N) BINARY", and use cast-to-nchar: N'mysqltest_1'. +# +set names binary; delete from mysql.user where user in ("mysqltest_1","mysqltest_2","mysqltest_3"); delete from mysql.db where user in ("mysqltest_1","mysqltest_2","mysqltest_3"); delete from mysql.tables_priv where user in ("mysqltest_1","mysqltest_2","mysqltest_3"); diff --git a/mysql-test/t/multi_update.test b/mysql-test/t/multi_update.test index 492856f9280..c2814606aa2 100644 --- a/mysql-test/t/multi_update.test +++ b/mysql-test/t/multi_update.test @@ -405,7 +405,7 @@ update t1, t2 set t1.b=(select t3.b from t3 where t1.a=t3.a) where t1.a=t2.a; connection root; revoke all privileges on mysqltest.t1 from mysqltest_1@localhost; revoke all privileges on mysqltest.* from mysqltest_1@localhost; -delete from mysql.user where user='mysqltest_1'; +delete from mysql.user where user=_binary'mysqltest_1'; drop database mysqltest; # diff --git a/mysql-test/t/rpl000001.test b/mysql-test/t/rpl000001.test index 445bd579279..2e0ba2fff25 100644 --- a/mysql-test/t/rpl000001.test +++ b/mysql-test/t/rpl000001.test @@ -110,14 +110,14 @@ create table t1 (n int); insert into t1 values(3456); insert into mysql.user (Host, User, Password) VALUES ("10.10.10.%", "blafasel2", password("blafasel2")); -select select_priv,user from mysql.user where user = 'blafasel2'; -update mysql.user set Select_priv = "Y" where User="blafasel2"; -select select_priv,user from mysql.user where user = 'blafasel2'; +select select_priv,user from mysql.user where user = _binary'blafasel2'; +update mysql.user set Select_priv = "Y" where User= _binary"blafasel2"; +select select_priv,user from mysql.user where user = _binary'blafasel2'; save_master_pos; connection slave; sync_with_master; select n from t1; -select select_priv,user from mysql.user where user = 'blafasel2'; +select select_priv,user from mysql.user where user = _binary'blafasel2'; connection master1; drop table t1; save_master_pos; diff --git a/mysql-test/t/rpl_do_grant.test b/mysql-test/t/rpl_do_grant.test index 89ff1afb5c9..27a22874497 100644 --- a/mysql-test/t/rpl_do_grant.test +++ b/mysql-test/t/rpl_do_grant.test @@ -4,16 +4,16 @@ source include/master-slave.inc; # do not be influenced by other tests. connection master; -delete from mysql.user where user='rpl_do_grant'; -delete from mysql.db where user='rpl_do_grant'; +delete from mysql.user where user=_binary'rpl_do_grant'; +delete from mysql.db where user=_binary'rpl_do_grant'; flush privileges; save_master_pos; connection slave; sync_with_master; # if these DELETE did nothing on the master, we need to do them manually on the # slave. -delete from mysql.user where user='rpl_ignore_grant'; -delete from mysql.db where user='rpl_ignore_grant'; +delete from mysql.user where user=_binary'rpl_ignore_grant'; +delete from mysql.db where user=_binary'rpl_ignore_grant'; flush privileges; # test replication of GRANT @@ -31,12 +31,12 @@ set password for rpl_do_grant@localhost=password("does it work?"); save_master_pos; connection slave; sync_with_master; -select password<>'' from mysql.user where user='rpl_do_grant'; +select password<>_binary'' from mysql.user where user=_binary'rpl_do_grant'; # clear what we have done, to not influence other tests. connection master; -delete from mysql.user where user='rpl_do_grant'; -delete from mysql.db where user='rpl_do_grant'; +delete from mysql.user where user=_binary'rpl_do_grant'; +delete from mysql.db where user=_binary'rpl_do_grant'; flush privileges; save_master_pos; connection slave; diff --git a/mysql-test/t/rpl_ignore_grant.test b/mysql-test/t/rpl_ignore_grant.test index 2fd7f186b3e..9b012d08df3 100644 --- a/mysql-test/t/rpl_ignore_grant.test +++ b/mysql-test/t/rpl_ignore_grant.test @@ -6,16 +6,16 @@ source include/master-slave.inc; # do not be influenced by other tests. connection master; -delete from mysql.user where user='rpl_ignore_grant'; -delete from mysql.db where user='rpl_ignore_grant'; +delete from mysql.user where user=_binary'rpl_ignore_grant'; +delete from mysql.db where user=_binary'rpl_ignore_grant'; flush privileges; save_master_pos; connection slave; sync_with_master; # as these DELETE were not replicated, we need to do them manually on the # slave. -delete from mysql.user where user='rpl_ignore_grant'; -delete from mysql.db where user='rpl_ignore_grant'; +delete from mysql.user where user=_binary'rpl_ignore_grant'; +delete from mysql.db where user=_binary'rpl_ignore_grant'; flush privileges; # test non-replication of GRANT @@ -29,8 +29,8 @@ sync_with_master; --error 1141 #("no such grant for user") show grants for rpl_ignore_grant@localhost; # check it another way -select count(*) from mysql.user where user='rpl_ignore_grant'; -select count(*) from mysql.db where user='rpl_ignore_grant'; +select count(*) from mysql.user where user=_binary'rpl_ignore_grant'; +select count(*) from mysql.db where user=_binary'rpl_ignore_grant'; # test non-replication of SET PASSWORD # first force creation of the user on slave (because as the user does not exist @@ -42,16 +42,16 @@ set password for rpl_ignore_grant@localhost=password("does it work?"); save_master_pos; connection slave; sync_with_master; -select password<>'' from mysql.user where user='rpl_ignore_grant'; +select password<>_binary'' from mysql.user where user=_binary'rpl_ignore_grant'; # clear what we have done, to not influence other tests. connection master; -delete from mysql.user where user='rpl_ignore_grant'; -delete from mysql.db where user='rpl_ignore_grant'; +delete from mysql.user where user=_binary'rpl_ignore_grant'; +delete from mysql.db where user=_binary'rpl_ignore_grant'; flush privileges; save_master_pos; connection slave; sync_with_master; -delete from mysql.user where user='rpl_ignore_grant'; -delete from mysql.db where user='rpl_ignore_grant'; +delete from mysql.user where user=_binary'rpl_ignore_grant'; +delete from mysql.db where user=_binary'rpl_ignore_grant'; flush privileges; diff --git a/mysql-test/t/show_check.test b/mysql-test/t/show_check.test index 58694356943..ac0c9a43010 100644 --- a/mysql-test/t/show_check.test +++ b/mysql-test/t/show_check.test @@ -299,6 +299,7 @@ drop table test_$1.t1; drop database test_$1; connection default; +set names binary; delete from mysql.user where user='mysqltest_1' || user='mysqltest_2' || user='mysqltest_3'; delete from mysql.db |