Commit f92959de authored by mskold/marty@linux.site's avatar mskold/marty@linux.site

Merge mskold@bk-internal.mysql.com:/home/bk/mysql-5.1-ndb

into  mysql.com:/windows/Linux_space/MySQL/mysql-5.1-new-ndb
parents ddde5e9f 15157cd7
...@@ -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;
...@@ -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 (%$%)
...@@ -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 '%$%';
...@@ -61,3 +61,4 @@ visits_id myid src ip cc org ref time host entry visit_exit user_id visit_start ...@@ -61,3 +61,4 @@ visits_id myid src ip cc org ref time host entry visit_exit user_id visit_start
SELECT * FROM visits_events; SELECT * FROM visits_events;
event_id visit_id timestamp src data visits_events_id event_id visit_id timestamp src data visits_events_id
20000 21231038 2007-09-18 03:59:02 Downloads/MySQL-4.1/mysql-4.1.12a-win32.zip 33712207 20000 21231038 2007-09-18 03:59:02 Downloads/MySQL-4.1/mysql-4.1.12a-win32.zip 33712207
DROP DATABASE track;
...@@ -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;
...@@ -111,3 +111,6 @@ VALUES ('3m3l4rhs6do0sf5p1i9lr94g928a272v', '', '', INET_ATON('71.118.124.98'), ...@@ -111,3 +111,6 @@ VALUES ('3m3l4rhs6do0sf5p1i9lr94g928a272v', '', '', INET_ATON('71.118.124.98'),
SELECT * FROM visits; SELECT * FROM visits;
SELECT * FROM visits_events; SELECT * FROM visits_events;
DROP DATABASE track;
# End 5.1 test case
...@@ -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
...@@ -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));
......
...@@ -46,6 +46,7 @@ public: ...@@ -46,6 +46,7 @@ public:
* Length of signal * Length of signal
*/ */
STATIC_CONST( StaticLength = 11 ); STATIC_CONST( StaticLength = 11 );
STATIC_CONST( MaxTotalAttrInfo = 0xFFFF );
private: private:
......
...@@ -1056,6 +1056,7 @@ class Ndb ...@@ -1056,6 +1056,7 @@ class Ndb
friend class NdbBlob; friend class NdbBlob;
friend class NdbImpl; friend class NdbImpl;
friend class Ndb_internal; friend class Ndb_internal;
friend class NdbScanFilterImpl;
#endif #endif
public: public:
......
...@@ -842,8 +842,10 @@ protected: ...@@ -842,8 +842,10 @@ protected:
virtual ~NdbOperation(); virtual ~NdbOperation();
void next(NdbOperation*); // Set next pointer void next(NdbOperation*); // Set next pointer
NdbOperation* next(); // Get next pointer NdbOperation* next(); // Get next pointer
public: public:
#ifndef DOXYGEN_SHOULD_SKIP_INTERNAL #ifndef DOXYGEN_SHOULD_SKIP_INTERNAL
NdbTransaction* getNdbTransaction();
const NdbOperation* next() const; const NdbOperation* next() const;
const NdbRecAttr* getFirstRecAttr() const; const NdbRecAttr* getFirstRecAttr() const;
#endif #endif
......
...@@ -17,7 +17,8 @@ class Ndb; ...@@ -17,7 +17,8 @@ class Ndb;
class NdbPool; class NdbPool;
bool bool
create_instance(Uint32 max_ndb_objects, create_instance(Ndb_cluster_connection* cc,
Uint32 max_ndb_objects,
Uint32 no_conn_obj, Uint32 no_conn_obj,
Uint32 init_no_ndb_objects); Uint32 init_no_ndb_objects);
......
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
#define NDB_SCAN_FILTER_HPP #define NDB_SCAN_FILTER_HPP
#include <ndb_types.h> #include <ndb_types.h>
#include <ndbapi_limits.h>
/** /**
* @class NdbScanFilter * @class NdbScanFilter
...@@ -31,8 +32,13 @@ public: ...@@ -31,8 +32,13 @@ public:
/** /**
* Constructor * Constructor
* @param op The NdbOperation that the filter belongs to (is applied to). * @param op The NdbOperation that the filter belongs to (is applied to).
* @param abort_on_too_large abort transaction on filter too large
* default: true
* @param max_size Maximum size of generated filter in words
*/ */
NdbScanFilter(class NdbOperation * op); NdbScanFilter(class NdbOperation * op,
bool abort_on_too_large = true,
Uint32 max_size = NDB_MAX_SCANFILTER_SIZE_IN_WORDS);
~NdbScanFilter(); ~NdbScanFilter();
/** /**
...@@ -166,6 +172,27 @@ public: ...@@ -166,6 +172,27 @@ public:
/** @} *********************************************************************/ /** @} *********************************************************************/
#endif #endif
enum Error {
FilterTooLarge = 4294
};
/**
* Get filter level error.
*
* Most errors are set only on operation level, and they abort the
* transaction. The error FilterTooLarge is set on filter level and
* by default it propagates to operation level and also aborts the
* transaction.
*
* If option abort_on_too_large is set to false, then FilterTooLarge
* does not propagate. One can then either ignore this error (in
* which case no filtering is done) or try to define a new filter
* immediately.
*/
const class NdbError & getNdbError() const;
#ifndef DOXYGEN_SHOULD_SKIP_INTERNAL
NdbOperation * getNdbOperation();
#endif
private: private:
#ifndef DOXYGEN_SHOULD_SKIP_INTERNAL #ifndef DOXYGEN_SHOULD_SKIP_INTERNAL
friend class NdbScanFilterImpl; friend class NdbScanFilterImpl;
......
...@@ -170,6 +170,15 @@ public: ...@@ -170,6 +170,15 @@ public:
#endif #endif
}; };
#ifndef DOXYGEN_SHOULD_SKIP_INTERNAL
/**
* Convenience method to fetch this transaction's Ndb* object
*/
Ndb * getNdb() {
return theNdb;
}
#endif
#ifndef DOXYGEN_SHOULD_SKIP_DEPRECATED #ifndef DOXYGEN_SHOULD_SKIP_DEPRECATED
/** /**
* Get an NdbOperation for a table. * Get an NdbOperation for a table.
......
...@@ -26,4 +26,6 @@ ...@@ -26,4 +26,6 @@
#define NDB_MAX_TUPLE_SIZE (NDB_MAX_TUPLE_SIZE_IN_WORDS*4) #define NDB_MAX_TUPLE_SIZE (NDB_MAX_TUPLE_SIZE_IN_WORDS*4)
#define NDB_MAX_ACTIVE_EVENTS 100 #define NDB_MAX_ACTIVE_EVENTS 100
#define NDB_MAX_SCANFILTER_SIZE_IN_WORDS 50000
#endif #endif
...@@ -498,10 +498,10 @@ void getTextTransReportCounters(QQQQ) { ...@@ -498,10 +498,10 @@ void getTextTransReportCounters(QQQQ) {
// ------------------------------------------------------------------- // -------------------------------------------------------------------
BaseString::snprintf(m_text, m_text_len, BaseString::snprintf(m_text, m_text_len,
"Trans. Count = %u, Commit Count = %u, " "Trans. Count = %u, Commit Count = %u, "
"Read Count = %u, Simple Read Count = %u,\n" "Read Count = %u, Simple Read Count = %u, "
"Write Count = %u, AttrInfo Count = %u, " "Write Count = %u, AttrInfo Count = %u, "
"Concurrent Operations = %u, Abort Count = %u\n" "Concurrent Operations = %u, Abort Count = %u"
" Scans: %u Range scans: %u", " Scans = %u Range scans = %u",
theData[1], theData[1],
theData[2], theData[2],
theData[3], theData[3],
...@@ -797,9 +797,9 @@ void getTextBackupFailedToStart(QQQQ) { ...@@ -797,9 +797,9 @@ void getTextBackupFailedToStart(QQQQ) {
} }
void getTextBackupCompleted(QQQQ) { void getTextBackupCompleted(QQQQ) {
BaseString::snprintf(m_text, m_text_len, BaseString::snprintf(m_text, m_text_len,
"Backup %u started from node %u completed\n" "Backup %u started from node %u completed."
" StartGCP: %u StopGCP: %u\n" " StartGCP: %u StopGCP: %u"
" #Records: %u #LogRecords: %u\n" " #Records: %u #LogRecords: %u"
" Data: %u bytes Log: %u bytes", " Data: %u bytes Log: %u bytes",
theData[2], refToNode(theData[1]), theData[2], refToNode(theData[1]),
theData[3], theData[4], theData[6], theData[8], theData[3], theData[4], theData[6], theData[8],
......
...@@ -145,7 +145,7 @@ CPCDAPISession::CPCDAPISession(NDB_SOCKET_TYPE sock, ...@@ -145,7 +145,7 @@ CPCDAPISession::CPCDAPISession(NDB_SOCKET_TYPE sock,
: SocketServer::Session(sock) : SocketServer::Session(sock)
, m_cpcd(cpcd) , m_cpcd(cpcd)
{ {
m_input = new SocketInputStream(sock); m_input = new SocketInputStream(sock, 7*24*60*60000);
m_output = new SocketOutputStream(sock); m_output = new SocketOutputStream(sock);
m_parser = new Parser<CPCDAPISession>(commands, *m_input, true, true, true); m_parser = new Parser<CPCDAPISession>(commands, *m_input, true, true, true);
} }
......
...@@ -5,7 +5,7 @@ Next DBACC 3002 ...@@ -5,7 +5,7 @@ Next DBACC 3002
Next DBTUP 4029 Next DBTUP 4029
Next DBLQH 5045 Next DBLQH 5045
Next DBDICT 6008 Next DBDICT 6008
Next DBDIH 7186 Next DBDIH 7193
Next DBTC 8054 Next DBTC 8054
Next CMVMI 9000 Next CMVMI 9000
Next BACKUP 10038 Next BACKUP 10038
...@@ -157,6 +157,9 @@ And crash when all have "not" been sent ...@@ -157,6 +157,9 @@ And crash when all have "not" been sent
7027: Crash in master when changing state to LCP_TAB_SAVED 7027: Crash in master when changing state to LCP_TAB_SAVED
7018: Crash in master when changing state to LCP_TAB_SAVED 7018: Crash in master when changing state to LCP_TAB_SAVED
7191: Crash when receiving LCP_COMPLETE_REP
7192: Crash in setLcpActiveStatusStart - when dead node missed to LCP's
ERROR CODES FOR TESTING NODE FAILURE, FAILURE IN COPY FRAGMENT PROCESS: ERROR CODES FOR TESTING NODE FAILURE, FAILURE IN COPY FRAGMENT PROCESS:
----------------------------------------------------------------------- -----------------------------------------------------------------------
......
...@@ -318,6 +318,7 @@ public: ...@@ -318,6 +318,7 @@ public:
Uint8 noOfStartedChkpt; Uint8 noOfStartedChkpt;
MasterLCPConf::State lcpStateAtTakeOver; MasterLCPConf::State lcpStateAtTakeOver;
Uint32 m_remove_node_from_table_lcp_id;
}; };
typedef Ptr<NodeRecord> NodeRecordPtr; typedef Ptr<NodeRecord> NodeRecordPtr;
/**********************************************************************/ /**********************************************************************/
......
...@@ -14084,11 +14084,16 @@ void Dblqh::execSTART_FRAGREQ(Signal* signal) ...@@ -14084,11 +14084,16 @@ void Dblqh::execSTART_FRAGREQ(Signal* signal)
fragptr.p->fragStatus = Fragrecord::ACTIVE_CREATION; fragptr.p->fragStatus = Fragrecord::ACTIVE_CREATION;
} }
c_tup->disk_restart_mark_no_lcp(tabptr.i, fragId); c_tup->disk_restart_lcp_id(tabptr.i, fragId, RNIL);
jamEntry(); jamEntry();
return; return;
}//if }
else
{
jam();
c_tup->disk_restart_lcp_id(tabptr.i, fragId, lcpId);
jamEntry();
}
c_lcpId = (c_lcpId == 0 ? lcpId : c_lcpId); c_lcpId = (c_lcpId == 0 ? lcpId : c_lcpId);
c_lcpId = (c_lcpId < lcpId ? c_lcpId : lcpId); c_lcpId = (c_lcpId < lcpId ? c_lcpId : lcpId);
......
...@@ -772,7 +772,7 @@ Dbtup::scanNext(Signal* signal, ScanOpPtr scanPtr) ...@@ -772,7 +772,7 @@ Dbtup::scanNext(Signal* signal, ScanOpPtr scanPtr)
uncommitted = committed = ~(unsigned)0; uncommitted = committed = ~(unsigned)0;
int ret = tsman.get_page_free_bits(&key, &uncommitted, &committed); int ret = tsman.get_page_free_bits(&key, &uncommitted, &committed);
ndbrequire(ret == 0); ndbrequire(ret == 0);
if (committed == 0) { if (committed == 0 && uncommitted == 0) {
// skip empty page // skip empty page
jam(); jam();
pos.m_get = ScanPos::Get_next_page_dd; pos.m_get = ScanPos::Get_next_page_dd;
......
...@@ -2701,8 +2701,16 @@ Lgman::execute_undo_record(Signal* signal) ...@@ -2701,8 +2701,16 @@ Lgman::execute_undo_record(Signal* signal)
Uint32 lcp = * (ptr - len + 1); Uint32 lcp = * (ptr - len + 1);
if(m_latest_lcp && lcp > m_latest_lcp) if(m_latest_lcp && lcp > m_latest_lcp)
{ {
// Just ignore if (0)
break; {
const Uint32 * base = ptr - len + 1;
Uint32 lcp = base[0];
Uint32 tableId = base[1] >> 16;
Uint32 fragId = base[1] & 0xFFFF;
ndbout_c("NOT! ignoring lcp: %u tab: %u frag: %u",
lcp, tableId, fragId);
}
} }
if(m_latest_lcp == 0 || if(m_latest_lcp == 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.
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