mariadb/mysql-test/r/ndb_binlog_basic.result
monty@mysql.com/nosik.monty.fi f6682e2743 Added --debug-info to most clients to detect memory leaks in mysql-test-run
Moved .progress files into the log directory
Moved 'cluster' database tables into the MySQL database, to not have 'cluster' beeing a reserved database name
Fixed bug where mysqld got a core dump when trying to use a table created by MySQL 3.23
Fixed some compiler warnings
Fixed small memory leak in libmysql
Note that this doesn't changeset doesn't include the new mysqldump.c code required to run some tests. This will be added when I merge 5.0 to 5.1
2006-11-21 22:32:58 +02:00

51 lines
1.4 KiB
Text

drop table if exists t1, t2;
drop database if exists mysqltest;
create database mysqltest;
use mysqltest;
drop database mysqltest;
use test;
create table t1 (a int primary key) engine=ndb;
insert into t1 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
select @max_epoch:=max(epoch)-1 from mysql.binlog_index;
@max_epoch:=max(epoch)-1
#
delete from t1;
alter table t1 add (b int);
insert into t1 values (3,3),(4,4);
alter table t1 rename t2;
begin;
insert into t2 values (1,1),(2,2);
update t2 set b=1 where a=3;
delete from t2 where a=4;
commit;
drop table t2;
select inserts from mysql.binlog_index where epoch > @max_epoch and inserts > 5;
inserts
10
select deletes from mysql.binlog_index where epoch > @max_epoch and deletes > 5;
deletes
10
select inserts,updates,deletes from
mysql.binlog_index where epoch > @max_epoch and updates > 0;
inserts updates deletes
2 1 1
flush logs;
purge master logs before now();
select count(*) from mysql.binlog_index;
count(*)
0
create table t1 (a int primary key, b int) engine=ndb;
create database mysqltest;
use mysqltest;
create table t1 (c int, d int primary key) engine=ndb;
use test;
insert into mysqltest.t1 values (2,1),(2,2);
select @max_epoch:=max(epoch)-1 from mysql.binlog_index;
@max_epoch:=max(epoch)-1
#
drop table t1;
drop database mysqltest;
select inserts,updates,deletes from
mysql.binlog_index where epoch > @max_epoch and inserts > 0;
inserts updates deletes
2 0 0