summaryrefslogtreecommitdiff
path: root/mysql-test/r
diff options
context:
space:
mode:
authorunknown <brian@avenger.(none)>2004-11-11 18:58:57 -0800
committerunknown <brian@avenger.(none)>2004-11-11 18:58:57 -0800
commit4d0e9ad9178b6e4a8b3884cdd305af928328a48a (patch)
tree46fde821aa292e663e9f48d37f44657e025a1271 /mysql-test/r
parent10e868bb5e4e701562774cbfdbdec4ca8486e1c6 (diff)
parent3afd8e79016be289cf14dafa268f08313899182f (diff)
downloadmariadb-git-4d0e9ad9178b6e4a8b3884cdd305af928328a48a.tar.gz
Resolved merge from 4.1 -> 5.0 (mainly Guilhem's work with mysqldump)
BitKeeper/etc/ignore: auto-union configure.in: Auto merged include/my_global.h: Auto merged include/my_sys.h: Auto merged include/mysql.h: Auto merged include/mysqld_error.h: Auto merged mysql-test/mysql-test-run.sh: Auto merged mysql-test/r/alter_table.result: Auto merged mysql-test/r/ndb_autodiscover.result: Auto merged mysql-test/r/null.result: Auto merged mysql-test/r/ps_2myisam.result: Auto merged mysql-test/r/ps_3innodb.result: Auto merged mysql-test/r/ps_4heap.result: Auto merged mysql-test/r/ps_5merge.result: Auto merged mysql-test/r/ps_6bdb.result: Auto merged mysql-test/t/alter_table.test: Auto merged mysql-test/t/null.test: Auto merged ndb/src/mgmsrv/main.cpp: Auto merged sql/field.cc: Auto merged sql/ha_ndbcluster.cc: Auto merged sql/handler.h: Auto merged sql/item.cc: Auto merged sql/item.h: Auto merged sql/item_timefunc.cc: Auto merged sql/mysqld.cc: Auto merged sql/slave.cc: Auto merged sql/slave.h: Auto merged sql/sql_class.h: Auto merged sql/sql_db.cc: Auto merged sql/sql_lex.h: Auto merged sql/share/czech/errmsg.txt: Auto merged sql/share/danish/errmsg.txt: Auto merged sql/share/dutch/errmsg.txt: Auto merged sql/share/english/errmsg.txt: Auto merged sql/share/estonian/errmsg.txt: Auto merged sql/share/french/errmsg.txt: Auto merged sql/share/german/errmsg.txt: Auto merged sql/share/greek/errmsg.txt: Auto merged sql/share/hungarian/errmsg.txt: Auto merged sql/share/italian/errmsg.txt: Auto merged sql/share/japanese/errmsg.txt: Auto merged sql/share/korean/errmsg.txt: Auto merged sql/share/norwegian-ny/errmsg.txt: Auto merged sql/share/norwegian/errmsg.txt: Auto merged sql/share/polish/errmsg.txt: Auto merged sql/share/portuguese/errmsg.txt: Auto merged sql/share/romanian/errmsg.txt: Auto merged sql/share/russian/errmsg.txt: Auto merged sql/share/serbian/errmsg.txt: Auto merged sql/share/slovak/errmsg.txt: Auto merged sql/share/spanish/errmsg.txt: Auto merged sql/share/swedish/errmsg.txt: Auto merged sql/share/ukrainian/errmsg.txt: Auto merged
Diffstat (limited to 'mysql-test/r')
-rw-r--r--mysql-test/r/alter_table.result10
-rw-r--r--mysql-test/r/consistent_snapshot.result15
-rw-r--r--mysql-test/r/ctype_ujis.result40
-rw-r--r--mysql-test/r/metadata.result2
-rw-r--r--mysql-test/r/ndb_autodiscover.result7
-rw-r--r--mysql-test/r/ndb_autodiscover2.result3
-rw-r--r--mysql-test/r/ndb_basic.result7
-rw-r--r--mysql-test/r/ndb_index_ordered.result37
-rw-r--r--mysql-test/r/null.result94
-rw-r--r--mysql-test/r/ps_2myisam.result4
-rw-r--r--mysql-test/r/ps_3innodb.result4
-rw-r--r--mysql-test/r/ps_4heap.result4
-rw-r--r--mysql-test/r/ps_5merge.result8
-rw-r--r--mysql-test/r/ps_6bdb.result4
-rw-r--r--mysql-test/r/ps_7ndb.result4
-rw-r--r--mysql-test/r/rpl_rewrite_db.result22
16 files changed, 248 insertions, 17 deletions
diff --git a/mysql-test/r/alter_table.result b/mysql-test/r/alter_table.result
index f26ca4a5425..e0d484312e7 100644
--- a/mysql-test/r/alter_table.result
+++ b/mysql-test/r/alter_table.result
@@ -483,3 +483,13 @@ ERROR 42000: Incorrect table name 't1\\'
rename table t1 to `t1\\`;
ERROR 42000: Incorrect table name 't1\\'
drop table t1;
+create table t1 (a text) character set koi8r;
+insert into t1 values (_koi8r'ΤΕΣΤ');
+select hex(a) from t1;
+hex(a)
+D4C5D3D4
+alter table t1 convert to character set cp1251;
+select hex(a) from t1;
+hex(a)
+F2E5F1F2
+drop table t1;
diff --git a/mysql-test/r/consistent_snapshot.result b/mysql-test/r/consistent_snapshot.result
new file mode 100644
index 00000000000..90606abbe4e
--- /dev/null
+++ b/mysql-test/r/consistent_snapshot.result
@@ -0,0 +1,15 @@
+drop table if exists t1;
+create table t1 (a int) engine=innodb;
+start transaction with consistent snapshot;
+insert into t1 values(1);
+select * from t1;
+a
+commit;
+delete from t1;
+start transaction;
+insert into t1 values(1);
+select * from t1;
+a
+1
+commit;
+drop table t1;
diff --git a/mysql-test/r/ctype_ujis.result b/mysql-test/r/ctype_ujis.result
index 7c3ae52cbc9..d02ac0062f8 100644
--- a/mysql-test/r/ctype_ujis.result
+++ b/mysql-test/r/ctype_ujis.result
@@ -126,3 +126,43 @@ Field Type Null Key Default Extra
a char(1)
b enum('€’','€€') YES NULL
DROP TABLE t1;
+CREATE TABLE t1
+(
+a INTEGER NOT NULL,
+b VARCHAR(50) NOT NULL DEFAULT '',
+PRIMARY KEY (a),
+KEY b (b(10))
+) TYPE=InnoDB CHARACTER SET 'ujis' COLLATE 'ujis_japanese_ci';
+INSERT INTO t1 (a, b) VALUES (0, 'aaabbbcccddd');
+INSERT INTO t1 (a, b) VALUES (1, 'eeefffggghhh');
+INSERT INTO t1 (a, b) VALUES (2, 'iiijjjkkkl');
+SELECT t1.* FROM t1 WHERE b='aaabbbcccddd' ORDER BY a;
+a b
+0 aaabbbcccddd
+SELECT t1.* FROM t1 WHERE b='eeefffggghhh' ORDER BY a;
+a b
+1 eeefffggghhh
+SELECT t1.* FROM t1 WHERE b='iiijjjkkkl' ORDER BY a;
+a b
+2 iiijjjkkkl
+DROP TABLE t1;
+CREATE TABLE t1
+(
+a INTEGER NOT NULL,
+b VARCHAR(50) NOT NULL DEFAULT '',
+PRIMARY KEY (a),
+KEY b (b(10))
+) TYPE=MyISAM CHARACTER SET 'ujis' COLLATE 'ujis_japanese_ci';
+INSERT INTO t1 (a, b) VALUES (0, 'aaabbbcccddd');
+INSERT INTO t1 (a, b) VALUES (1, 'eeefffggghhh');
+INSERT INTO t1 (a, b) VALUES (2, 'iiijjjkkkl');
+SELECT t1.* FROM t1 WHERE b='aaabbbcccddd' ORDER BY a;
+a b
+0 aaabbbcccddd
+SELECT t1.* FROM t1 WHERE b='eeefffggghhh' ORDER BY a;
+a b
+1 eeefffggghhh
+SELECT t1.* FROM t1 WHERE b='iiijjjkkkl' ORDER BY a;
+a b
+2 iiijjjkkkl
+DROP TABLE t1;
diff --git a/mysql-test/r/metadata.result b/mysql-test/r/metadata.result
index ced3ca61f80..2321a8998ac 100644
--- a/mysql-test/r/metadata.result
+++ b/mysql-test/r/metadata.result
@@ -5,7 +5,7 @@ def 1 8 1 1 N 32769 0 8
def 1.0 5 3 3 N 32769 1 8
def -1 8 1 2 N 32769 0 8
def hello 254 5 5 N 1 31 8
-def NULL 6 0 0 Y 32768 0 8
+def NULL 6 0 0 Y 32896 0 63
1 1.0 -1 hello NULL
1 1.0 -1 hello NULL
create table t1 (a tinyint, b smallint, c mediumint, d int, e bigint, f float(3,2), g double(4,3), h decimal(5,4), i year, j date, k timestamp, l datetime, m enum('a','b'), n set('a','b'), o char(10));
diff --git a/mysql-test/r/ndb_autodiscover.result b/mysql-test/r/ndb_autodiscover.result
index 4925aac8ac1..82ff4072378 100644
--- a/mysql-test/r/ndb_autodiscover.result
+++ b/mysql-test/r/ndb_autodiscover.result
@@ -1,4 +1,4 @@
-drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
+drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9,t10;
flush status;
create table t1(
id int not null primary key,
@@ -363,3 +363,8 @@ a int NOT NULL PRIMARY KEY,
b int
) engine=ndb;
insert t9 values(1, 2), (2,3), (3, 4), (4, 5);
+create table t10 (
+a int not null primary key,
+b blob
+) engine=ndb;
+insert into t10 values (1, 'kalle');
diff --git a/mysql-test/r/ndb_autodiscover2.result b/mysql-test/r/ndb_autodiscover2.result
index 08803d997a5..91f018b5d02 100644
--- a/mysql-test/r/ndb_autodiscover2.result
+++ b/mysql-test/r/ndb_autodiscover2.result
@@ -8,3 +8,6 @@ show status like 'handler_discover%';
Variable_name Value
Handler_discover 1
drop table t9;
+select * from t10;
+ERROR HY000: Got error 4263 'Invalid blob attributes or invalid blob parts table' from ndbcluster
+drop table t10;
diff --git a/mysql-test/r/ndb_basic.result b/mysql-test/r/ndb_basic.result
index ba8ee820ad9..6ec5338acbe 100644
--- a/mysql-test/r/ndb_basic.result
+++ b/mysql-test/r/ndb_basic.result
@@ -400,6 +400,13 @@ b attr1
9413 9412
drop table test.t1, t2;
drop database mysqltest;
+drop database if exists ndbtest1;
+create database ndbtest1;
+use ndbtest1;
+create table t1(id int) engine=ndbcluster;
+drop database ndbtest1;
+drop database ndbtest1;
+ERROR HY000: Can't drop database 'ndbtest1'; database doesn't exist
use test;
create table t1 (a int primary key, b char(0));
insert into t1 values (1,"");
diff --git a/mysql-test/r/ndb_index_ordered.result b/mysql-test/r/ndb_index_ordered.result
index 2dc260ec43d..50f904af750 100644
--- a/mysql-test/r/ndb_index_ordered.result
+++ b/mysql-test/r/ndb_index_ordered.result
@@ -1,4 +1,4 @@
-drop table if exists t1;
+drop table if exists t1, test1, test2;
CREATE TABLE t1 (
a int unsigned NOT NULL PRIMARY KEY,
b int unsigned not null,
@@ -275,3 +275,38 @@ a b c
1 1 1
4 4 NULL
drop table t1;
+CREATE TABLE test1 (
+SubscrID int(11) NOT NULL auto_increment,
+UsrID int(11) NOT NULL default '0',
+PRIMARY KEY (SubscrID),
+KEY idx_usrid (UsrID)
+) ENGINE=ndbcluster DEFAULT CHARSET=latin1;
+INSERT INTO test1 VALUES (2,224),(3,224),(1,224);
+CREATE TABLE test2 (
+SbclID int(11) NOT NULL auto_increment,
+SbcrID int(11) NOT NULL default '0',
+PRIMARY KEY (SbclID),
+KEY idx_sbcrid (SbcrID)
+) ENGINE=ndbcluster DEFAULT CHARSET=latin1;
+INSERT INTO test2 VALUES (3,2),(1,1),(2,1),(4,2);
+select * from test1 order by 1;
+SubscrID UsrID
+1 224
+2 224
+3 224
+select * from test2 order by 1;
+SbclID SbcrID
+1 1
+2 1
+3 2
+4 2
+SELECT s.SubscrID,l.SbclID FROM test1 s left JOIN test2 l ON
+l.SbcrID=s.SubscrID WHERE s.UsrID=224 order by 1, 2;
+SubscrID SbclID
+1 1
+1 2
+2 3
+2 4
+3 NULL
+drop table test1;
+drop table test2;
diff --git a/mysql-test/r/null.result b/mysql-test/r/null.result
index f39bd0c6f6c..68fb9c3a34b 100644
--- a/mysql-test/r/null.result
+++ b/mysql-test/r/null.result
@@ -184,3 +184,97 @@ select count(*) from t1 where i=2 or i is null;
count(*)
9
drop table t1;
+set names latin2;
+create table t1 select
+null as c00,
+if(1, null, 'string') as c01,
+if(0, null, 'string') as c02,
+ifnull(null, 'string') as c03,
+ifnull('string', null) as c04,
+case when 0 then null else 'string' end as c05,
+case when 1 then null else 'string' end as c06,
+coalesce(null, 'string') as c07,
+coalesce('string', null) as c08,
+least('string',null) as c09,
+least(null, 'string') as c10,
+greatest('string',null) as c11,
+greatest(null, 'string') as c12,
+nullif('string', null) as c13,
+nullif(null, 'string') as c14,
+trim('string' from null) as c15,
+trim(null from 'string') as c16,
+substring_index('string', null, 1) as c17,
+substring_index(null, 'string', 1) as c18,
+elt(1, null, 'string') as c19,
+elt(1, 'string', null) as c20,
+concat('string', null) as c21,
+concat(null, 'string') as c22,
+concat_ws('sep', 'string', null) as c23,
+concat_ws('sep', null, 'string') as c24,
+concat_ws(null, 'string', 'string') as c25,
+make_set(3, 'string', null) as c26,
+make_set(3, null, 'string') as c27,
+export_set(3, null, 'off', 'sep') as c29,
+export_set(3, 'on', null, 'sep') as c30,
+export_set(3, 'on', 'off', null) as c31,
+replace(null, 'from', 'to') as c32,
+replace('str', null, 'to') as c33,
+replace('str', 'from', null) as c34,
+insert('str', 1, 2, null) as c35,
+insert(null, 1, 2, 'str') as c36,
+lpad('str', 10, null) as c37,
+rpad(null, 10, 'str') as c38;
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `c00` binary(0) default NULL,
+ `c01` varchar(6) character set latin2 default NULL,
+ `c02` varchar(6) character set latin2 default NULL,
+ `c03` varchar(6) character set latin2 NOT NULL default '',
+ `c04` varchar(6) character set latin2 default NULL,
+ `c05` varchar(6) character set latin2 default NULL,
+ `c06` varchar(6) character set latin2 default NULL,
+ `c07` varchar(6) character set latin2 default NULL,
+ `c08` varchar(6) character set latin2 default NULL,
+ `c09` varchar(6) character set latin2 NOT NULL default '',
+ `c10` varchar(6) character set latin2 NOT NULL default '',
+ `c11` varchar(6) character set latin2 NOT NULL default '',
+ `c12` varchar(6) character set latin2 NOT NULL default '',
+ `c13` varchar(6) character set latin2 default NULL,
+ `c14` char(0) character set latin2 default NULL,
+ `c15` char(0) character set latin2 default NULL,
+ `c16` varchar(6) character set latin2 default NULL,
+ `c17` varchar(6) character set latin2 default NULL,
+ `c18` char(0) character set latin2 default NULL,
+ `c19` varchar(6) character set latin2 default NULL,
+ `c20` varchar(6) character set latin2 default NULL,
+ `c21` varchar(6) character set latin2 default NULL,
+ `c22` varchar(6) character set latin2 default NULL,
+ `c23` varchar(9) character set latin2 default NULL,
+ `c24` varchar(9) character set latin2 default NULL,
+ `c25` varchar(12) character set latin2 default NULL,
+ `c26` varchar(7) character set latin2 default NULL,
+ `c27` varchar(7) character set latin2 default NULL,
+ `c29` longtext character set latin2,
+ `c30` longtext character set latin2,
+ `c31` varchar(192) character set latin2 default NULL,
+ `c32` char(0) character set latin2 default NULL,
+ `c33` char(3) character set latin2 default NULL,
+ `c34` char(3) character set latin2 default NULL,
+ `c35` char(3) character set latin2 default NULL,
+ `c36` char(3) character set latin2 default NULL,
+ `c37` varchar(10) character set latin2 default NULL,
+ `c38` varchar(10) character set latin2 default NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+drop table t1;
+select
+case 'str' when 'STR' then 'str' when null then 'null' end as c01,
+case 'str' when null then 'null' when 'STR' then 'str' end as c02,
+field(null, 'str1', 'str2') as c03,
+field('str1','STR1', null) as c04,
+field('str1', null, 'STR1') as c05,
+'string' in ('STRING', null) as c08,
+'string' in (null, 'STRING') as c09;
+c01 c02 c03 c04 c05 c08 c09
+str str 0 1 2 1 1
+set names latin1;
diff --git a/mysql-test/r/ps_2myisam.result b/mysql-test/r/ps_2myisam.result
index 6773370fbc5..c64f513f0aa 100644
--- a/mysql-test/r/ps_2myisam.result
+++ b/mysql-test/r/ps_2myisam.result
@@ -1789,7 +1789,7 @@ t5 CREATE TABLE `t5` (
`param10` bigint(20) default NULL,
`const11` int(4) default NULL,
`param11` bigint(20) default NULL,
- `const12` char(0) default NULL,
+ `const12` binary(0) default NULL,
`param12` bigint(20) default NULL,
`param13` double default NULL,
`param14` longtext,
@@ -1819,7 +1819,7 @@ def test t5 t5 const10 const10 3 10 9 N 32769 0 63
def test t5 t5 param10 param10 8 20 9 Y 32768 0 63
def test t5 t5 const11 const11 3 4 4 Y 32768 0 63
def test t5 t5 param11 param11 8 20 4 Y 32768 0 63
-def test t5 t5 const12 const12 254 0 0 Y 0 0 8
+def test t5 t5 const12 const12 254 0 0 Y 128 0 63
def test t5 t5 param12 param12 8 20 0 Y 32768 0 63
def test t5 t5 param13 param13 5 20 0 Y 32768 31 63
def test t5 t5 param14 param14 252 16777215 0 Y 16 0 8
diff --git a/mysql-test/r/ps_3innodb.result b/mysql-test/r/ps_3innodb.result
index 09f19c3763c..adcf6064835 100644
--- a/mysql-test/r/ps_3innodb.result
+++ b/mysql-test/r/ps_3innodb.result
@@ -1772,7 +1772,7 @@ t5 CREATE TABLE `t5` (
`param10` bigint(20) default NULL,
`const11` int(4) default NULL,
`param11` bigint(20) default NULL,
- `const12` char(0) default NULL,
+ `const12` binary(0) default NULL,
`param12` bigint(20) default NULL,
`param13` double default NULL,
`param14` longtext,
@@ -1802,7 +1802,7 @@ def test t5 t5 const10 const10 3 10 9 N 32769 0 63
def test t5 t5 param10 param10 8 20 9 Y 32768 0 63
def test t5 t5 const11 const11 3 4 4 Y 32768 0 63
def test t5 t5 param11 param11 8 20 4 Y 32768 0 63
-def test t5 t5 const12 const12 254 0 0 Y 0 0 8
+def test t5 t5 const12 const12 254 0 0 Y 128 0 63
def test t5 t5 param12 param12 8 20 0 Y 32768 0 63
def test t5 t5 param13 param13 5 20 0 Y 32768 31 63
def test t5 t5 param14 param14 252 16777215 0 Y 16 0 8
diff --git a/mysql-test/r/ps_4heap.result b/mysql-test/r/ps_4heap.result
index 427fee8e757..cd36af07300 100644
--- a/mysql-test/r/ps_4heap.result
+++ b/mysql-test/r/ps_4heap.result
@@ -1773,7 +1773,7 @@ t5 CREATE TABLE `t5` (
`param10` bigint(20) default NULL,
`const11` int(4) default NULL,
`param11` bigint(20) default NULL,
- `const12` char(0) default NULL,
+ `const12` binary(0) default NULL,
`param12` bigint(20) default NULL,
`param13` double default NULL,
`param14` longtext,
@@ -1803,7 +1803,7 @@ def test t5 t5 const10 const10 3 10 9 N 32769 0 63
def test t5 t5 param10 param10 8 20 9 Y 32768 0 63
def test t5 t5 const11 const11 3 4 4 Y 32768 0 63
def test t5 t5 param11 param11 8 20 4 Y 32768 0 63
-def test t5 t5 const12 const12 254 0 0 Y 0 0 8
+def test t5 t5 const12 const12 254 0 0 Y 128 0 63
def test t5 t5 param12 param12 8 20 0 Y 32768 0 63
def test t5 t5 param13 param13 5 20 0 Y 32768 31 63
def test t5 t5 param14 param14 252 16777215 0 Y 16 0 8
diff --git a/mysql-test/r/ps_5merge.result b/mysql-test/r/ps_5merge.result
index 51d842ae000..3af0bfc7884 100644
--- a/mysql-test/r/ps_5merge.result
+++ b/mysql-test/r/ps_5merge.result
@@ -1712,7 +1712,7 @@ t5 CREATE TABLE `t5` (
`param10` bigint(20) default NULL,
`const11` int(4) default NULL,
`param11` bigint(20) default NULL,
- `const12` char(0) default NULL,
+ `const12` binary(0) default NULL,
`param12` bigint(20) default NULL,
`param13` double default NULL,
`param14` longtext,
@@ -1742,7 +1742,7 @@ def test t5 t5 const10 const10 3 10 9 N 32769 0 63
def test t5 t5 param10 param10 8 20 9 Y 32768 0 63
def test t5 t5 const11 const11 3 4 4 Y 32768 0 63
def test t5 t5 param11 param11 8 20 4 Y 32768 0 63
-def test t5 t5 const12 const12 254 0 0 Y 0 0 8
+def test t5 t5 const12 const12 254 0 0 Y 128 0 63
def test t5 t5 param12 param12 8 20 0 Y 32768 0 63
def test t5 t5 param13 param13 5 20 0 Y 32768 31 63
def test t5 t5 param14 param14 252 16777215 0 Y 16 0 8
@@ -4721,7 +4721,7 @@ t5 CREATE TABLE `t5` (
`param10` bigint(20) default NULL,
`const11` int(4) default NULL,
`param11` bigint(20) default NULL,
- `const12` char(0) default NULL,
+ `const12` binary(0) default NULL,
`param12` bigint(20) default NULL,
`param13` double default NULL,
`param14` longtext,
@@ -4751,7 +4751,7 @@ def test t5 t5 const10 const10 3 10 9 N 32769 0 63
def test t5 t5 param10 param10 8 20 9 Y 32768 0 63
def test t5 t5 const11 const11 3 4 4 Y 32768 0 63
def test t5 t5 param11 param11 8 20 4 Y 32768 0 63
-def test t5 t5 const12 const12 254 0 0 Y 0 0 8
+def test t5 t5 const12 const12 254 0 0 Y 128 0 63
def test t5 t5 param12 param12 8 20 0 Y 32768 0 63
def test t5 t5 param13 param13 5 20 0 Y 32768 31 63
def test t5 t5 param14 param14 252 16777215 0 Y 16 0 8
diff --git a/mysql-test/r/ps_6bdb.result b/mysql-test/r/ps_6bdb.result
index 85cb8af652e..93f766c61e0 100644
--- a/mysql-test/r/ps_6bdb.result
+++ b/mysql-test/r/ps_6bdb.result
@@ -1772,7 +1772,7 @@ t5 CREATE TABLE `t5` (
`param10` bigint(20) default NULL,
`const11` int(4) default NULL,
`param11` bigint(20) default NULL,
- `const12` char(0) default NULL,
+ `const12` binary(0) default NULL,
`param12` bigint(20) default NULL,
`param13` double default NULL,
`param14` longtext,
@@ -1802,7 +1802,7 @@ def test t5 t5 const10 const10 3 10 9 N 32769 0 63
def test t5 t5 param10 param10 8 20 9 Y 32768 0 63
def test t5 t5 const11 const11 3 4 4 Y 32768 0 63
def test t5 t5 param11 param11 8 20 4 Y 32768 0 63
-def test t5 t5 const12 const12 254 0 0 Y 0 0 8
+def test t5 t5 const12 const12 254 0 0 Y 128 0 63
def test t5 t5 param12 param12 8 20 0 Y 32768 0 63
def test t5 t5 param13 param13 5 20 0 Y 32768 31 63
def test t5 t5 param14 param14 252 16777215 0 Y 16 0 8
diff --git a/mysql-test/r/ps_7ndb.result b/mysql-test/r/ps_7ndb.result
index e90eff5d1cd..70118509d0b 100644
--- a/mysql-test/r/ps_7ndb.result
+++ b/mysql-test/r/ps_7ndb.result
@@ -1749,7 +1749,7 @@ t5 CREATE TABLE `t5` (
`param10` bigint(20) default NULL,
`const11` int(4) default NULL,
`param11` bigint(20) default NULL,
- `const12` char(0) default NULL,
+ `const12` binary(0) default NULL,
`param12` bigint(20) default NULL,
`param13` double default NULL,
`param14` longtext,
@@ -1779,7 +1779,7 @@ def test t5 t5 const10 const10 3 10 9 N 32769 0 63
def test t5 t5 param10 param10 8 20 9 Y 32768 0 63
def test t5 t5 const11 const11 3 4 4 Y 32768 0 63
def test t5 t5 param11 param11 8 20 4 Y 32768 0 63
-def test t5 t5 const12 const12 254 0 0 Y 0 0 8
+def test t5 t5 const12 const12 254 0 0 Y 128 0 63
def test t5 t5 param12 param12 8 20 0 Y 32768 0 63
def test t5 t5 param13 param13 5 20 0 Y 32768 31 63
def test t5 t5 param14 param14 252 16777215 0 Y 16 0 8
diff --git a/mysql-test/r/rpl_rewrite_db.result b/mysql-test/r/rpl_rewrite_db.result
new file mode 100644
index 00000000000..2804b98dea1
--- /dev/null
+++ b/mysql-test/r/rpl_rewrite_db.result
@@ -0,0 +1,22 @@
+stop slave;
+drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
+reset master;
+reset slave;
+drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
+start slave;
+drop database if exists mysqltest1;
+create database mysqltest1;
+use mysqltest1;
+create table t1 (a int);
+insert into t1 values(9);
+select * from mysqltest1.t1;
+a
+9
+show databases like 'mysqltest1';
+Database (mysqltest1)
+mysqltest1
+select * from test.t1;
+a
+9
+drop table t1;
+drop database mysqltest1;