Commit a214b1b9 authored by tomas@whalegate.ndb.mysql.com's avatar tomas@whalegate.ndb.mysql.com

Merge whalegate.ndb.mysql.com:/home/tomas/cge-5.1

into  whalegate.ndb.mysql.com:/home/tomas/mysql-5.1-new-ndb-merge
parents e3f77622 93c95156
...@@ -38,7 +38,7 @@ show create database mysqltest3; ...@@ -38,7 +38,7 @@ show create database mysqltest3;
connection master; connection master;
use mysqltest2; use mysqltest2;
create table t1 (a int auto_increment primary key, b varchar(100)); --eval create table t1 (a int auto_increment primary key, b varchar(100))engine=$engine_type;
set character_set_client=cp850, collation_connection=latin2_croatian_ci; set character_set_client=cp850, collation_connection=latin2_croatian_ci;
insert into t1 (b) values(@@character_set_server); insert into t1 (b) values(@@character_set_server);
insert into t1 (b) values(@@collation_server); insert into t1 (b) values(@@collation_server);
...@@ -146,13 +146,15 @@ set collation_server=9999998; ...@@ -146,13 +146,15 @@ set collation_server=9999998;
select "--- --3943--" as ""; select "--- --3943--" as "";
use test; use test;
CREATE TABLE t1 (c1 VARBINARY(255), c2 VARBINARY(255)); --eval CREATE TABLE t1 (c1 VARBINARY(255), c2 VARBINARY(255))ENGINE=$engine_type;
SET CHARACTER_SET_CLIENT=koi8r, SET CHARACTER_SET_CLIENT=koi8r,
CHARACTER_SET_CONNECTION=cp1251, CHARACTER_SET_CONNECTION=cp1251,
CHARACTER_SET_RESULTS=koi8r; CHARACTER_SET_RESULTS=koi8r;
INSERT INTO t1 (c1, c2) VALUES (', ',', '); INSERT INTO t1 (c1, c2) VALUES (', ',', ');
SET SQL_BIG_SELECTS=1;
select hex(c1), hex(c2) from t1; select hex(c1), hex(c2) from t1;
sync_slave_with_master; sync_slave_with_master;
SET SQL_BIG_SELECTS=1;
select hex(c1), hex(c2) from t1; select hex(c1), hex(c2) from t1;
connection master; connection master;
......
...@@ -1888,5 +1888,27 @@ set engine_condition_pushdown = 1; ...@@ -1888,5 +1888,27 @@ set engine_condition_pushdown = 1;
SELECT fname, lname FROM t1 WHERE (fname like 'Y%') or (lname like 'F%'); SELECT fname, lname FROM t1 WHERE (fname like 'Y%') or (lname like 'F%');
fname lname fname lname
Young Foo Young Foo
drop table t1;
create table t1 (a int, b int, c int, d int, primary key using hash(a))
engine=ndbcluster;
insert into t1 values (10,1,100,0+0x1111);
insert into t1 values (20,2,200,0+0x2222);
insert into t1 values (30,3,300,0+0x3333);
insert into t1 values (40,4,400,0+0x4444);
insert into t1 values (50,5,500,0+0x5555);
set engine_condition_pushdown = on;
select a,b,d from t1
where b in (0,1,2,5)
order by b;
a b d
10 1 4369
20 2 8738
50 5 21845
a b d
10 1 4369
20 2 8738
50 5 21845
Warnings:
Warning 4294 Scan filter is too large, discarded
set engine_condition_pushdown = @old_ecpd; set engine_condition_pushdown = @old_ecpd;
DROP TABLE t1,t2,t3,t4,t5; DROP TABLE t1,t2,t3,t4,t5;
drop table if exists t1;
create table t1 (a int) engine ndb;
set autocommit=1;
lock table t1 write;
set autocommit=0;
insert into t1 values (0);
rollback;
select * from t1;
a
unlock tables;
drop table t1;
...@@ -121,3 +121,24 @@ show tables; ...@@ -121,3 +121,24 @@ show tables;
Tables_in_db Tables_in_db
t2 t2
drop database db; drop database db;
use test;
create table `test`.`t1$EX`
(server_id int unsigned,
master_server_id int unsigned,
master_epoch bigint unsigned,
count int unsigned,
primary key(server_id, master_server_id,
master_epoch, count))
engine ndb;
show tables like '%$%';
Tables_in_test (%$%)
t1$EX
use test;
show tables like '%$%';
Tables_in_test (%$%)
t1$EX
drop table `test`.`t1$EX`;
show tables like '%$%';
Tables_in_test (%$%)
show tables like '%$%';
Tables_in_test (%$%)
...@@ -41,6 +41,14 @@ pk1 b c ...@@ -41,6 +41,14 @@ pk1 b c
10 0 0 10 0 0
12 2 2 12 2 2
14 1 1 14 1 1
create unique index ib on t1(b);
update t1 set c = 4 where pk1 = 12;
update ignore t1 set b = 55 where pk1 = 14;
select * from t1 order by pk1;
pk1 b c
10 0 0
12 2 4
14 55 1
DROP TABLE IF EXISTS t1; DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (a int, b int, KEY (a, b)) ENGINE=ndbcluster; CREATE TABLE t1 (a int, b int, KEY (a, b)) ENGINE=ndbcluster;
CREATE TABLE t2 (a int, b int, UNIQUE KEY (a, b)) ENGINE=ndbcluster; CREATE TABLE t2 (a int, b int, UNIQUE KEY (a, b)) ENGINE=ndbcluster;
......
DROP TABLE IF EXISTS t1;
create table t1 (a int not null primary key, b int not null, c int,
unique index_b (b) using hash)
engine ndb;
insert into t1 values (1,10,1),(2,9,1),(3,8,1),(4,7,1),(5,6,1),(6,5,2),(7,4,2),(8,3,2),
(9,2,2),(10,1,2);
update t1 set c = 111, b = 20 where a = 1;
select * from t1 where a = 1 order by a;
a b c
1 20 111
delete from t1 where a = 1;
select * from t1 where a = 1 order by a;
a b c
update t1 set c = 12, b = 19 where b = 2;
select * from t1 where b = 2 order by a;
a b c
delete from t1 where b = 19;
select * from t1 where b = 19 order by a;
a b c
update t1 set c = 22 where a = 10 or a >= 10;
select * from t1 order by a;
a b c
2 9 1
3 8 1
4 7 1
5 6 1
6 5 2
7 4 2
8 3 2
10 1 22
update t1 set c = 23 where a in (8,10);
select * from t1 order by a;
a b c
2 9 1
3 8 1
4 7 1
5 6 1
6 5 2
7 4 2
8 3 23
10 1 23
update t1 set c = 23 where a in (7,8) or a >= 10;
select * from t1 order by a;
a b c
2 9 1
3 8 1
4 7 1
5 6 1
6 5 2
7 4 23
8 3 23
10 1 23
update t1 set c = 11 where a = 3 or b = 7;
select * from t1 where a = 3 or b = 7 order by a;
a b c
3 8 11
4 7 11
update t1 set a = 13, b = 20 where a = 3;
select * from t1 where a = 13 order by a;
a b c
13 20 11
update t1 set a = 12, b = 19 where b = 7;
select * from t1 where b = 19 order by a;
a b c
12 19 11
select * from t1 where b = 7 order by a;
a b c
update t1 set c = 12, b = 29 where a = 5 and b = 6;
select * from t1 where b = 19 order by a;
a b c
12 19 11
delete from t1 where b = 6 and c = 12;
select * from t1 where b = 6 order by a;
a b c
drop table t1;
...@@ -9,9 +9,6 @@ ...@@ -9,9 +9,6 @@
# Do not use any TAB characters for whitespace. # Do not use any TAB characters for whitespace.
# #
############################################################################## ##############################################################################
ndb_dd_sql_features : Bug#29102 ndb_dd_sql_features fails in pushbuild
ndb_load : BUG#17233 2006-05-04 tomas failed load data from infile causes mysqld dbug_assert, binlog not flushed
partition_03ndb : BUG#16385 2006-03-24 mikael Partitions: crash when updating a range partitioned NDB table partition_03ndb : BUG#16385 2006-03-24 mikael Partitions: crash when updating a range partitioned NDB table
ndb_partition_error2 : HF is not sure if the test can work as internded on all the platforms ndb_partition_error2 : HF is not sure if the test can work as internded on all the platforms
......
-- source include/have_ndb.inc
# BUG 30996
--disable_warnings
drop table if exists t1;
--enable_warnings
create table t1 (a int) engine ndb;
set autocommit=1;
lock table t1 write;
set autocommit=0;
insert into t1 values (0);
rollback;
select * from t1;
unlock tables;
drop table t1;
...@@ -122,4 +122,31 @@ connection server2; ...@@ -122,4 +122,31 @@ connection server2;
show tables; show tables;
drop database db; drop database db;
#
# bug#31470, ndb table with special characters in name
# are not discovered correctly
connection server1;
use test;
create table `test`.`t1$EX`
(server_id int unsigned,
master_server_id int unsigned,
master_epoch bigint unsigned,
count int unsigned,
primary key(server_id, master_server_id,
master_epoch, count))
engine ndb;
# check that table shows up ok on both servers
# before bugfix table would not show up on server2
show tables like '%$%';
connection server2;
use test;
show tables like '%$%';
# check cleanup
drop table `test`.`t1$EX`;
show tables like '%$%';
connection server1; connection server1;
show tables like '%$%';
...@@ -35,6 +35,11 @@ UPDATE IGNORE t1 set pk1 = 1, c = 2 where pk1 = 4; ...@@ -35,6 +35,11 @@ UPDATE IGNORE t1 set pk1 = 1, c = 2 where pk1 = 4;
select * from t1 order by pk1; select * from t1 order by pk1;
UPDATE t1 set pk1 = pk1 + 10; UPDATE t1 set pk1 = pk1 + 10;
select * from t1 order by pk1; select * from t1 order by pk1;
# bug#25817
create unique index ib on t1(b);
update t1 set c = 4 where pk1 = 12;
update ignore t1 set b = 55 where pk1 = 14;
select * from t1 order by pk1;
--disable_warnings --disable_warnings
DROP TABLE IF EXISTS t1; DROP TABLE IF EXISTS t1;
......
-- source include/have_ndb.inc
-- source include/not_embedded.inc
--disable_warnings
DROP TABLE IF EXISTS t1;
--enable_warnings
#
# New test case for WL 3686 (which is not until CGE-6.3)
# but test is committed in 5.1 to verify consistant results.
#
# When only constant expressions in update statements and
# only PK or UK in WHERE clause. No extra WHERE parts are
# allowed. WL #3687 takes of more advanced variants of
# avoiding the read before the update/delete
create table t1 (a int not null primary key, b int not null, c int,
unique index_b (b) using hash)
engine ndb;
insert into t1 values (1,10,1),(2,9,1),(3,8,1),(4,7,1),(5,6,1),(6,5,2),(7,4,2),(8,3,2),
(9,2,2),(10,1,2);
# These ones should use optimisation
update t1 set c = 111, b = 20 where a = 1;
select * from t1 where a = 1 order by a;
delete from t1 where a = 1;
select * from t1 where a = 1 order by a;
update t1 set c = 12, b = 19 where b = 2;
select * from t1 where b = 2 order by a;
delete from t1 where b = 19;
select * from t1 where b = 19 order by a;
update t1 set c = 22 where a = 10 or a >= 10;
select * from t1 order by a;
update t1 set c = 23 where a in (8,10);
select * from t1 order by a;
update t1 set c = 23 where a in (7,8) or a >= 10;
select * from t1 order by a;
# These ones should not use optimisation
update t1 set c = 11 where a = 3 or b = 7;
select * from t1 where a = 3 or b = 7 order by a;
update t1 set a = 13, b = 20 where a = 3;
select * from t1 where a = 13 order by a;
update t1 set a = 12, b = 19 where b = 7;
select * from t1 where b = 19 order by a;
select * from t1 where b = 7 order by a;
update t1 set c = 12, b = 29 where a = 5 and b = 6;
select * from t1 where b = 19 order by a;
delete from t1 where b = 6 and c = 12;
select * from t1 where b = 6 order by a;
drop table t1;
...@@ -40,7 +40,7 @@ show create database mysqltest3; ...@@ -40,7 +40,7 @@ show create database mysqltest3;
Database Create Database Database Create Database
mysqltest3 CREATE DATABASE `mysqltest3` /*!40100 DEFAULT CHARACTER SET armscii8 COLLATE armscii8_bin */ mysqltest3 CREATE DATABASE `mysqltest3` /*!40100 DEFAULT CHARACTER SET armscii8 COLLATE armscii8_bin */
use mysqltest2; use mysqltest2;
create table t1 (a int auto_increment primary key, b varchar(100)); create table t1 (a int auto_increment primary key, b varchar(100))engine=myisam;;
set character_set_client=cp850, collation_connection=latin2_croatian_ci; set character_set_client=cp850, collation_connection=latin2_croatian_ci;
insert into t1 (b) values(@@character_set_server); insert into t1 (b) values(@@character_set_server);
insert into t1 (b) values(@@collation_server); insert into t1 (b) values(@@collation_server);
...@@ -117,7 +117,7 @@ master-bin.000001 # Query # # create database mysqltest2 character set latin2 ...@@ -117,7 +117,7 @@ master-bin.000001 # Query # # create database mysqltest2 character set latin2
master-bin.000001 # Query # # create database mysqltest3 master-bin.000001 # Query # # create database mysqltest3
master-bin.000001 # Query # # drop database mysqltest3 master-bin.000001 # Query # # drop database mysqltest3
master-bin.000001 # Query # # create database mysqltest3 master-bin.000001 # Query # # create database mysqltest3
master-bin.000001 # Query # # use `mysqltest2`; create table t1 (a int auto_increment primary key, b varchar(100)) master-bin.000001 # Query # # use `mysqltest2`; create table t1 (a int auto_increment primary key, b varchar(100))engine=myisam
master-bin.000001 # Table_map # # table_id: # (mysqltest2.t1) master-bin.000001 # Table_map # # table_id: # (mysqltest2.t1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Table_map # # table_id: # (mysqltest2.t1) master-bin.000001 # Table_map # # table_id: # (mysqltest2.t1)
...@@ -177,14 +177,16 @@ select "--- --3943--" as ""; ...@@ -177,14 +177,16 @@ select "--- --3943--" as "";
--- --3943-- --- --3943--
use test; use test;
CREATE TABLE t1 (c1 VARBINARY(255), c2 VARBINARY(255)); CREATE TABLE t1 (c1 VARBINARY(255), c2 VARBINARY(255))ENGINE=myisam;;
SET CHARACTER_SET_CLIENT=koi8r, SET CHARACTER_SET_CLIENT=koi8r,
CHARACTER_SET_CONNECTION=cp1251, CHARACTER_SET_CONNECTION=cp1251,
CHARACTER_SET_RESULTS=koi8r; CHARACTER_SET_RESULTS=koi8r;
INSERT INTO t1 (c1, c2) VALUES (', ',', '); INSERT INTO t1 (c1, c2) VALUES (', ',', ');
SET SQL_BIG_SELECTS=1;
select hex(c1), hex(c2) from t1; select hex(c1), hex(c2) from t1;
hex(c1) hex(c2) hex(c1) hex(c2)
CDF32C20E7E020F0FBE1E0EBEAF3 CDF32C20E7E020F0FBE1E0EBEAF3 CDF32C20E7E020F0FBE1E0EBEAF3 CDF32C20E7E020F0FBE1E0EBEAF3
SET SQL_BIG_SELECTS=1;
select hex(c1), hex(c2) from t1; select hex(c1), hex(c2) from t1;
hex(c1) hex(c2) hex(c1) hex(c2)
CDF32C20E7E020F0FBE1E0EBEAF3 CDF32C20E7E020F0FBE1E0EBEAF3 CDF32C20E7E020F0FBE1E0EBEAF3 CDF32C20E7E020F0FBE1E0EBEAF3
......
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;
set timestamp=1000000000;
drop database if exists mysqltest2;
drop database if exists mysqltest3;
create database mysqltest2 character set latin2;
set @@character_set_server=latin5;
create database mysqltest3;
--- --master--
show create database mysqltest2;
Database Create Database
mysqltest2 CREATE DATABASE `mysqltest2` /*!40100 DEFAULT CHARACTER SET latin2 */
show create database mysqltest3;
Database Create Database
mysqltest3 CREATE DATABASE `mysqltest3` /*!40100 DEFAULT CHARACTER SET latin5 */
--- --slave--
show create database mysqltest2;
Database Create Database
mysqltest2 CREATE DATABASE `mysqltest2` /*!40100 DEFAULT CHARACTER SET latin2 */
show create database mysqltest3;
Database Create Database
mysqltest3 CREATE DATABASE `mysqltest3` /*!40100 DEFAULT CHARACTER SET latin5 */
set @@collation_server=armscii8_bin;
drop database mysqltest3;
create database mysqltest3;
--- --master--
show create database mysqltest3;
Database Create Database
mysqltest3 CREATE DATABASE `mysqltest3` /*!40100 DEFAULT CHARACTER SET armscii8 COLLATE armscii8_bin */
--- --slave--
show create database mysqltest3;
Database Create Database
mysqltest3 CREATE DATABASE `mysqltest3` /*!40100 DEFAULT CHARACTER SET armscii8 COLLATE armscii8_bin */
use mysqltest2;
create table t1 (a int auto_increment primary key, b varchar(100))engine=innodb;;
set character_set_client=cp850, collation_connection=latin2_croatian_ci;
insert into t1 (b) values(@@character_set_server);
insert into t1 (b) values(@@collation_server);
insert into t1 (b) values(@@character_set_client);
insert into t1 (b) values(@@character_set_connection);
insert into t1 (b) values(@@collation_connection);
--- --master--
select * from t1 order by a;
a b
1 armscii8
2 armscii8_bin
3 cp850
4 latin2
5 latin2_croatian_ci
--- --slave--
select * from mysqltest2.t1 order by a;
a b
1 armscii8
2 armscii8_bin
3 cp850
4 latin2
5 latin2_croatian_ci
select "--- --muller--" as "";
--- --muller--
set character_set_client=latin1, collation_connection=latin1_german1_ci;
truncate table t1;
insert into t1 (b) values(@@collation_connection);
insert into t1 (b) values(LEAST("Mller","Muffler"));
set collation_connection=latin1_german2_ci;
insert into t1 (b) values(@@collation_connection);
insert into t1 (b) values(LEAST("Mller","Muffler"));
--- --master--
select * from t1 order by a;
a b
1 latin1_german1_ci
2 Muffler
3 latin1_german2_ci
4 Mller
--- --slave--
select * from mysqltest2.t1 order by a;
a b
1 latin1_german1_ci
2 Muffler
3 latin1_german2_ci
4 Mller
select "--- --INSERT--" as "";
--- --INSERT--
set @a= _cp850 'Mller' collate cp850_general_ci;
truncate table t1;
insert into t1 (b) values(collation(@a));
--- --master--
select * from t1 order by a;
a b
1 cp850_general_ci
--- --slave--
select * from mysqltest2.t1 order by a;
a b
1 cp850_general_ci
drop database mysqltest2;
drop database mysqltest3;
show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # drop database if exists mysqltest2
master-bin.000001 # Query # # drop database if exists mysqltest3
master-bin.000001 # Query # # create database mysqltest2 character set latin2
master-bin.000001 # Query # # create database mysqltest3
master-bin.000001 # Query # # drop database mysqltest3
master-bin.000001 # Query # # create database mysqltest3
master-bin.000001 # Query # # use `mysqltest2`; create table t1 (a int auto_increment primary key, b varchar(100))engine=innodb
master-bin.000001 # Table_map # # table_id: # (mysqltest2.t1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Table_map # # table_id: # (mysqltest2.t1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Table_map # # table_id: # (mysqltest2.t1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Table_map # # table_id: # (mysqltest2.t1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Table_map # # table_id: # (mysqltest2.t1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Query # # use `mysqltest2`; truncate table t1
master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Table_map # # table_id: # (mysqltest2.t1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Table_map # # table_id: # (mysqltest2.t1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Table_map # # table_id: # (mysqltest2.t1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Table_map # # table_id: # (mysqltest2.t1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Query # # use `mysqltest2`; truncate table t1
master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Table_map # # table_id: # (mysqltest2.t1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Query # # drop database mysqltest2
master-bin.000001 # Query # # drop database mysqltest3
select "--- --global--" as "";
--- --global--
set global character_set_server=latin2;
set global character_set_server=latin1;
set global character_set_server=latin2;
set global character_set_server=latin1;
select "--- --oneshot--" as "";
--- --oneshot--
set one_shot @@character_set_server=latin5;
set @@max_join_size=1000;
select @@character_set_server;
@@character_set_server
latin5
select @@character_set_server;
@@character_set_server
latin1
set @@character_set_server=latin5;
select @@character_set_server;
@@character_set_server
latin5
select @@character_set_server;
@@character_set_server
latin5
set one_shot max_join_size=10;
ERROR HY000: The 'SET ONE_SHOT' syntax is reserved for purposes internal to the MySQL server
set character_set_client=9999999;
ERROR 42000: Unknown character set: '9999999'
set collation_server=9999998;
ERROR HY000: Unknown collation: '9999998'
select "--- --3943--" as "";
--- --3943--
use test;
CREATE TABLE t1 (c1 VARBINARY(255), c2 VARBINARY(255))ENGINE=innodb;;
SET CHARACTER_SET_CLIENT=koi8r,
CHARACTER_SET_CONNECTION=cp1251,
CHARACTER_SET_RESULTS=koi8r;
INSERT INTO t1 (c1, c2) VALUES (', ',', ');
SET SQL_BIG_SELECTS=1;
select hex(c1), hex(c2) from t1;
hex(c1) hex(c2)
CDF32C20E7E020F0FBE1E0EBEAF3 CDF32C20E7E020F0FBE1E0EBEAF3
SET SQL_BIG_SELECTS=1;
select hex(c1), hex(c2) from t1;
hex(c1) hex(c2)
CDF32C20E7E020F0FBE1E0EBEAF3 CDF32C20E7E020F0FBE1E0EBEAF3
drop table t1;
select "--- --6676--" as "";
--- --6676--
create table `t1` (
`pk` varchar(10) not null default '',
primary key (`pk`)
) engine=innodb default charset=latin1;
set @p=_latin1 'test';
update t1 set pk='test' where pk=@p;
drop table t1;
...@@ -12,4 +12,5 @@ set binlog_format=row; ...@@ -12,4 +12,5 @@ set binlog_format=row;
set binlog_format=statement; set binlog_format=statement;
-- source extra/rpl_tests/rpl_extraMaster_Col.test -- source extra/rpl_tests/rpl_extraMaster_Col.test
set binlog_format=mixed;
-- source extra/rpl_tests/rpl_extraMaster_Col.test
...@@ -11,3 +11,5 @@ set binlog_format=row; ...@@ -11,3 +11,5 @@ set binlog_format=row;
set binlog_format=statement; set binlog_format=statement;
-- source extra/rpl_tests/rpl_extraMaster_Col.test -- source extra/rpl_tests/rpl_extraMaster_Col.test
set binlog_format=mixed;
-- source extra/rpl_tests/rpl_extraMaster_Col.test
########################################################
# By JBM 2005-02-15 Wrapped to allow reuse of test code#
# Added to skip if ndb is default #
########################################################
-- source include/not_ndb_default.inc
-- source include/have_binlog_format_row.inc
-- source include/master-slave.inc
let $engine_type=innodb;
-- source extra/rpl_tests/rpl_row_charset.test
###########################################
# Purpose: Wrapper for rpl_extraMaster_Col.test
# Using NDB
###########################################
-- source include/have_ndb.inc
-- source include/ndb_master-slave.inc
-- source include/have_binlog_format_statement.inc
let $engine_type = 'NDB';
-- source extra/rpl_tests/rpl_extraMaster_Col.test
...@@ -40,7 +40,7 @@ show create database mysqltest3; ...@@ -40,7 +40,7 @@ show create database mysqltest3;
Database Create Database Database Create Database
mysqltest3 CREATE DATABASE `mysqltest3` /*!40100 DEFAULT CHARACTER SET armscii8 COLLATE armscii8_bin */ mysqltest3 CREATE DATABASE `mysqltest3` /*!40100 DEFAULT CHARACTER SET armscii8 COLLATE armscii8_bin */
use mysqltest2; use mysqltest2;
create table t1 (a int auto_increment primary key, b varchar(100)); create table t1 (a int auto_increment primary key, b varchar(100))engine=NDB;;
set character_set_client=cp850, collation_connection=latin2_croatian_ci; set character_set_client=cp850, collation_connection=latin2_croatian_ci;
insert into t1 (b) values(@@character_set_server); insert into t1 (b) values(@@character_set_server);
insert into t1 (b) values(@@collation_server); insert into t1 (b) values(@@collation_server);
...@@ -117,29 +117,27 @@ master-bin.000001 # Query # # create database mysqltest2 character set latin2 ...@@ -117,29 +117,27 @@ master-bin.000001 # Query # # create database mysqltest2 character set latin2
master-bin.000001 # Query # # create database mysqltest3 master-bin.000001 # Query # # create database mysqltest3
master-bin.000001 # Query # # drop database mysqltest3 master-bin.000001 # Query # # drop database mysqltest3
master-bin.000001 # Query # # create database mysqltest3 master-bin.000001 # Query # # create database mysqltest3
master-bin.000001 # Query # # use `mysqltest2`; create table t1 (a int auto_increment primary key, b varchar(100)) master-bin.000001 # Query # # use `mysqltest2`; create table t1 (a int auto_increment primary key, b varchar(100))engine=NDB
master-bin.000001 # Table_map # # table_id: # (mysqltest2.t1) master-bin.000001 # Query # # BEGIN
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Table_map # # table_id: # (mysqltest2.t1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Table_map # # table_id: # (mysqltest2.t1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Table_map # # table_id: # (mysqltest2.t1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Table_map # # table_id: # (mysqltest2.t1) master-bin.000001 # Table_map # # table_id: # (mysqltest2.t1)
master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status)
master-bin.000001 # Write_rows # # table_id: #
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # use `mysqltest2`; truncate table t1 master-bin.000001 # Query # # use `mysqltest2`; truncate table t1
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (mysqltest2.t1) master-bin.000001 # Table_map # # table_id: # (mysqltest2.t1)
master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status)
master-bin.000001 # Write_rows # # table_id: #
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Table_map # # table_id: # (mysqltest2.t1) master-bin.000001 # Query # # COMMIT
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Table_map # # table_id: # (mysqltest2.t1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Table_map # # table_id: # (mysqltest2.t1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # use `mysqltest2`; truncate table t1 master-bin.000001 # Query # # use `mysqltest2`; truncate table t1
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (mysqltest2.t1) master-bin.000001 # Table_map # # table_id: # (mysqltest2.t1)
master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status)
master-bin.000001 # Write_rows # # table_id: #
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # drop database mysqltest2 master-bin.000001 # Query # # drop database mysqltest2
master-bin.000001 # Query # # drop database mysqltest3 master-bin.000001 # Query # # drop database mysqltest3
select "--- --global--" as ""; select "--- --global--" as "";
...@@ -177,14 +175,16 @@ select "--- --3943--" as ""; ...@@ -177,14 +175,16 @@ select "--- --3943--" as "";
--- --3943-- --- --3943--
use test; use test;
CREATE TABLE t1 (c1 VARBINARY(255), c2 VARBINARY(255)); CREATE TABLE t1 (c1 VARBINARY(255), c2 VARBINARY(255))ENGINE=NDB;;
SET CHARACTER_SET_CLIENT=koi8r, SET CHARACTER_SET_CLIENT=koi8r,
CHARACTER_SET_CONNECTION=cp1251, CHARACTER_SET_CONNECTION=cp1251,
CHARACTER_SET_RESULTS=koi8r; CHARACTER_SET_RESULTS=koi8r;
INSERT INTO t1 (c1, c2) VALUES (', ',', '); INSERT INTO t1 (c1, c2) VALUES (', ',', ');
SET SQL_BIG_SELECTS=1;
select hex(c1), hex(c2) from t1; select hex(c1), hex(c2) from t1;
hex(c1) hex(c2) hex(c1) hex(c2)
CDF32C20E7E020F0FBE1E0EBEAF3 CDF32C20E7E020F0FBE1E0EBEAF3 CDF32C20E7E020F0FBE1E0EBEAF3 CDF32C20E7E020F0FBE1E0EBEAF3
SET SQL_BIG_SELECTS=1;
select hex(c1), hex(c2) from t1; select hex(c1), hex(c2) from t1;
hex(c1) hex(c2) hex(c1) hex(c2)
CDF32C20E7E020F0FBE1E0EBEAF3 CDF32C20E7E020F0FBE1E0EBEAF3 CDF32C20E7E020F0FBE1E0EBEAF3 CDF32C20E7E020F0FBE1E0EBEAF3
......
This diff is collapsed.
######################################################## ########################################################
# By JBM 2005-02-15 Wrapped to allow reuse of test code# # By JBM 2005-02-15 Wrapped to allow reuse of test code#
######################################################## ########################################################
--source include/have_ndb.inc -- source include/have_ndb.inc
-- source include/have_binlog_format_row.inc -- source include/have_binlog_format_mixed_or_row.inc
-- source include/ndb_master-slave.inc -- source include/ndb_master-slave.inc
let $engine_type=NDB; let $engine_type=NDB;
-- source extra/rpl_tests/rpl_row_charset.test -- source extra/rpl_tests/rpl_row_charset.test
########################################### #############################################################
# Purpose: Wrapper for rpl_extraMaster_Col.test # Purpose: To test having extra columns on the master WL#3915
# Using NDB #############################################################
###########################################
-- source include/have_ndb.inc -- source include/have_ndb.inc
-- source include/ndb_master-slave.inc -- source include/ndb_master-slave.inc
-- source include/have_binlog_format_row.inc -- source include/have_binlog_format_mixed_or_row.inc
let $engine_type = 'NDB'; let $engine_type = 'NDB';
set binlog_format=row;
-- source extra/rpl_tests/rpl_extraMaster_Col.test -- source extra/rpl_tests/rpl_extraMaster_Col.test
set binlog_format=mixed;
-- source extra/rpl_tests/rpl_extraMaster_Col.test
This diff is collapsed.
This diff is collapsed.
...@@ -1338,9 +1338,23 @@ ha_ndbcluster_cond::generate_scan_filter(NdbScanOperation *op) ...@@ -1338,9 +1338,23 @@ ha_ndbcluster_cond::generate_scan_filter(NdbScanOperation *op)
if (m_cond_stack) if (m_cond_stack)
{ {
NdbScanFilter filter(op); NdbScanFilter filter(op, false); // don't abort on too large
DBUG_RETURN(generate_scan_filter_from_cond(filter)); int ret=generate_scan_filter_from_cond(filter);
if (ret != 0)
{
const NdbError& err=filter.getNdbError();
if (err.code == NdbScanFilter::FilterTooLarge)
{
// err.message has static storage
DBUG_PRINT("info", ("%s", err.message));
push_warning(current_thd, MYSQL_ERROR::WARN_LEVEL_WARN,
err.code, err.message);
ret=0;
}
}
if (ret != 0)
DBUG_RETURN(ret);
} }
else else
{ {
...@@ -1391,7 +1405,7 @@ int ha_ndbcluster_cond::generate_scan_filter_from_key(NdbScanOperation *op, ...@@ -1391,7 +1405,7 @@ int ha_ndbcluster_cond::generate_scan_filter_from_key(NdbScanOperation *op,
{ {
KEY_PART_INFO* key_part= key_info->key_part; KEY_PART_INFO* key_part= key_info->key_part;
KEY_PART_INFO* end= key_part+key_info->key_parts; KEY_PART_INFO* end= key_part+key_info->key_parts;
NdbScanFilter filter(op); NdbScanFilter filter(op, true); // abort on too large
int res; int res;
DBUG_ENTER("generate_scan_filter_from_key"); DBUG_ENTER("generate_scan_filter_from_key");
......
...@@ -2641,8 +2641,7 @@ int ha_create_table_from_engine(THD* thd, const char *db, const char *name) ...@@ -2641,8 +2641,7 @@ int ha_create_table_from_engine(THD* thd, const char *db, const char *name)
frmblob and frmlen are set, write the frm to disk frmblob and frmlen are set, write the frm to disk
*/ */
(void)strxnmov(path,FN_REFLEN-1,mysql_data_home,FN_ROOTDIR, build_table_filename(path, FN_REFLEN-1, db, name, "", 0);
db,FN_ROOTDIR,name,NullS);
// Save the frm file // Save the frm file
error= writefrm(path, frmblob, frmlen); error= writefrm(path, frmblob, frmlen);
my_free(frmblob, MYF(0)); my_free(frmblob, MYF(0));
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment