mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
Merge mskold@bk-internal.mysql.com:/home/bk/mysql-4.1-ndb
into mysql.com:/usr/local/home/marty/MySQL/mysql-4.1-ndb mysql-test/r/ndb_alter_table.result: Auto merged mysql-test/r/ndb_basic.result: Auto merged mysql-test/r/ndb_lock.result: Auto merged mysql-test/t/ndb_alter_table.test: Auto merged mysql-test/t/ndb_basic.test: Auto merged mysql-test/t/ndb_lock.test: Auto merged ndb/src/ndbapi/Ndb.cpp: Auto merged sql/ha_ndbcluster.cc: Auto merged
This commit is contained in:
@ -1450,9 +1450,11 @@ then
|
||||
then
|
||||
echo "Starting ndbcluster"
|
||||
./ndb/ndbcluster --port-base=$NDBCLUSTER_PORT --small --diskless --initial --data-dir=$MYSQL_TEST_DIR/var || exit 1
|
||||
export NDB_CONNECTSTRING="host=localhost:$NDBCLUSTER_PORT"
|
||||
NDB_CONNECTSTRING="host=localhost:$NDBCLUSTER_PORT"
|
||||
export NDB_CONNECTSTRING
|
||||
else
|
||||
export NDB_CONNECTSTRING="$USE_RUNNING_NDBCLUSTER"
|
||||
NDB_CONNECTSTRING="$USE_RUNNING_NDBCLUSTER"
|
||||
export NDB_CONNECTSTRING
|
||||
echo "Using ndbcluster at $NDB_CONNECTSTRING"
|
||||
fi
|
||||
fi
|
||||
|
@ -4,6 +4,7 @@ MaxNoOfConcurrentOperations: CHOOSE_MaxNoOfConcurrentOperations
|
||||
DataMemory: CHOOSE_DataMemory
|
||||
IndexMemory: CHOOSE_IndexMemory
|
||||
Diskless: CHOOSE_Diskless
|
||||
TimeBetweenWatchDogCheck: 30000
|
||||
|
||||
[COMPUTER]
|
||||
Id: 1
|
||||
|
@ -86,7 +86,6 @@ fs_name_1=$fs_ndb/node-1-fs
|
||||
fs_name_2=$fs_ndb/node-2-fs
|
||||
|
||||
NDB_HOME=
|
||||
export NDB_CONNECTSTRING
|
||||
if [ ! -x $fsdir ]; then
|
||||
echo "$fsdir missing"
|
||||
exit 1
|
||||
@ -102,7 +101,8 @@ fi
|
||||
|
||||
ndb_host="localhost"
|
||||
ndb_mgmd_port=$port_base
|
||||
export NDB_CONNECTSTRING="host=$ndb_host:$ndb_mgmd_port"
|
||||
NDB_CONNECTSTRING="host=$ndb_host:$ndb_mgmd_port"
|
||||
export NDB_CONNECTSTRING
|
||||
|
||||
start_default_ndbcluster() {
|
||||
|
||||
|
@ -201,6 +201,24 @@ a b
|
||||
202 5
|
||||
203 6
|
||||
204 7
|
||||
alter table t1 modify b mediumint;
|
||||
select * from t1 order by b;
|
||||
a b
|
||||
1 1
|
||||
200 2
|
||||
0 3
|
||||
201 4
|
||||
202 5
|
||||
203 6
|
||||
204 7
|
||||
create table t2 (a int);
|
||||
insert t2 values (1),(2);
|
||||
alter table t2 add b int auto_increment primary key;
|
||||
select * from t2;
|
||||
a b
|
||||
1 1
|
||||
2 2
|
||||
drop table t2;
|
||||
delete from t1 where a=0;
|
||||
update t1 set a=0 where b=5;
|
||||
select * from t1 order by b;
|
||||
|
@ -40,6 +40,8 @@ show tables;
|
||||
Tables_in_test
|
||||
update mysql.user set password=old_password("gambling2") where user=_binary"test";
|
||||
flush privileges;
|
||||
set password='gambling3';
|
||||
ERROR HY000: Password hash should be a 41-digit hexadecimal number
|
||||
set password=old_password('gambling3');
|
||||
show tables;
|
||||
Tables_in_mysql
|
||||
|
@ -90,16 +90,23 @@ insert into t1 values
|
||||
('2003-01-02 11:11:12Pm', '%Y-%m-%d %h:%i:%S%p'),
|
||||
('10:20:10', '%H:%i:%s'),
|
||||
('10:20:10', '%h:%i:%s.%f'),
|
||||
('10:20:10', '%T'),
|
||||
('10:20:10AM', '%h:%i:%s%p'),
|
||||
('10:20:10AM', '%r'),
|
||||
('10:20:10.44AM', '%h:%i:%s.%f%p'),
|
||||
('15-01-2001 12:59:58', '%d-%m-%Y %H:%i:%S'),
|
||||
('15 September 2001', '%d %M %Y'),
|
||||
('15 SEPTEMB 2001', '%d %M %Y'),
|
||||
('15 MAY 2001', '%d %b %Y'),
|
||||
('15th May 2001', '%D %b %Y'),
|
||||
('Sunday 15 MAY 2001', '%W %d %b %Y'),
|
||||
('Sund 15 MAY 2001', '%W %d %b %Y'),
|
||||
('Tuesday 00 2002', '%W %U %Y'),
|
||||
('Thursday 53 1998', '%W %u %Y'),
|
||||
('Sunday 01 2001', '%W %v %x'),
|
||||
('Tuesday 52 2001', '%W %V %X'),
|
||||
('060 2004', '%j %Y'),
|
||||
('4 53 1998', '%w %u %Y'),
|
||||
('15-01-2001', '%d-%m-%Y %H:%i:%S'),
|
||||
('15-01-20', '%d-%m-%y'),
|
||||
('15-2001-1', '%d-%Y-%c');
|
||||
@ -114,16 +121,23 @@ date format str_to_date
|
||||
2003-01-02 11:11:12Pm %Y-%m-%d %h:%i:%S%p 2003-01-02 23:11:12
|
||||
10:20:10 %H:%i:%s 0000-00-00 10:20:10
|
||||
10:20:10 %h:%i:%s.%f 0000-00-00 10:20:10
|
||||
10:20:10 %T 0000-00-00 10:20:10
|
||||
10:20:10AM %h:%i:%s%p 0000-00-00 10:20:10
|
||||
10:20:10AM %r 0000-00-00 10:20:10
|
||||
10:20:10.44AM %h:%i:%s.%f%p 0000-00-00 10:20:10.440000
|
||||
15-01-2001 12:59:58 %d-%m-%Y %H:%i:%S 2001-01-15 12:59:58
|
||||
15 September 2001 %d %M %Y 2001-09-15 00:00:00
|
||||
15 SEPTEMB 2001 %d %M %Y 2001-09-15 00:00:00
|
||||
15 MAY 2001 %d %b %Y 2001-05-15 00:00:00
|
||||
15th May 2001 %D %b %Y 2001-05-15 00:00:00
|
||||
Sunday 15 MAY 2001 %W %d %b %Y 2001-05-15 00:00:00
|
||||
Sund 15 MAY 2001 %W %d %b %Y 2001-05-15 00:00:00
|
||||
Tuesday 00 2002 %W %U %Y 2002-01-01 00:00:00
|
||||
Thursday 53 1998 %W %u %Y 1998-12-31 00:00:00
|
||||
Sunday 01 2001 %W %v %x 2001-01-07 00:00:00
|
||||
Tuesday 52 2001 %W %V %X 2002-01-01 00:00:00
|
||||
060 2004 %j %Y 2004-02-29 00:00:00
|
||||
4 53 1998 %w %u %Y 1998-12-31 00:00:00
|
||||
15-01-2001 %d-%m-%Y %H:%i:%S 2001-01-15 00:00:00
|
||||
15-01-20 %d-%m-%y 2020-01-15 00:00:00
|
||||
15-2001-1 %d-%Y-%c 2001-01-15 00:00:00
|
||||
@ -138,16 +152,23 @@ date format con
|
||||
2003-01-02 11:11:12Pm %Y-%m-%d %h:%i:%S%p 2003-01-02 23:11:12
|
||||
10:20:10 %H:%i:%s 0000-00-00 10:20:10
|
||||
10:20:10 %h:%i:%s.%f 0000-00-00 10:20:10
|
||||
10:20:10 %T 0000-00-00 10:20:10
|
||||
10:20:10AM %h:%i:%s%p 0000-00-00 10:20:10
|
||||
10:20:10AM %r 0000-00-00 10:20:10
|
||||
10:20:10.44AM %h:%i:%s.%f%p 0000-00-00 10:20:10.440000
|
||||
15-01-2001 12:59:58 %d-%m-%Y %H:%i:%S 2001-01-15 12:59:58
|
||||
15 September 2001 %d %M %Y 2001-09-15 00:00:00
|
||||
15 SEPTEMB 2001 %d %M %Y 2001-09-15 00:00:00
|
||||
15 MAY 2001 %d %b %Y 2001-05-15 00:00:00
|
||||
15th May 2001 %D %b %Y 2001-05-15 00:00:00
|
||||
Sunday 15 MAY 2001 %W %d %b %Y 2001-05-15 00:00:00
|
||||
Sund 15 MAY 2001 %W %d %b %Y 2001-05-15 00:00:00
|
||||
Tuesday 00 2002 %W %U %Y 2002-01-01 00:00:00
|
||||
Thursday 53 1998 %W %u %Y 1998-12-31 00:00:00
|
||||
Sunday 01 2001 %W %v %x 2001-01-07 00:00:00
|
||||
Tuesday 52 2001 %W %V %X 2002-01-01 00:00:00
|
||||
060 2004 %j %Y 2004-02-29 00:00:00
|
||||
4 53 1998 %w %u %Y 1998-12-31 00:00:00
|
||||
15-01-2001 %d-%m-%Y %H:%i:%S 2001-01-15 00:00:00
|
||||
15-01-20 %d-%m-%y 2020-01-15 00:00:00
|
||||
15-2001-1 %d-%Y-%c 2001-01-15 00:00:00
|
||||
@ -162,16 +183,23 @@ date format datetime
|
||||
2003-01-02 11:11:12Pm %Y-%m-%d %h:%i:%S%p 2003-01-02 23:11:12
|
||||
10:20:10 %H:%i:%s 0000-00-00 10:20:10
|
||||
10:20:10 %h:%i:%s.%f 0000-00-00 10:20:10
|
||||
10:20:10 %T 0000-00-00 10:20:10
|
||||
10:20:10AM %h:%i:%s%p 0000-00-00 10:20:10
|
||||
10:20:10AM %r 0000-00-00 10:20:10
|
||||
10:20:10.44AM %h:%i:%s.%f%p 0000-00-00 10:20:10.440000
|
||||
15-01-2001 12:59:58 %d-%m-%Y %H:%i:%S 2001-01-15 12:59:58
|
||||
15 September 2001 %d %M %Y 2001-09-15 00:00:00
|
||||
15 SEPTEMB 2001 %d %M %Y 2001-09-15 00:00:00
|
||||
15 MAY 2001 %d %b %Y 2001-05-15 00:00:00
|
||||
15th May 2001 %D %b %Y 2001-05-15 00:00:00
|
||||
Sunday 15 MAY 2001 %W %d %b %Y 2001-05-15 00:00:00
|
||||
Sund 15 MAY 2001 %W %d %b %Y 2001-05-15 00:00:00
|
||||
Tuesday 00 2002 %W %U %Y 2002-01-01 00:00:00
|
||||
Thursday 53 1998 %W %u %Y 1998-12-31 00:00:00
|
||||
Sunday 01 2001 %W %v %x 2001-01-07 00:00:00
|
||||
Tuesday 52 2001 %W %V %X 2002-01-01 00:00:00
|
||||
060 2004 %j %Y 2004-02-29 00:00:00
|
||||
4 53 1998 %w %u %Y 1998-12-31 00:00:00
|
||||
15-01-2001 %d-%m-%Y %H:%i:%S 2001-01-15 00:00:00
|
||||
15-01-20 %d-%m-%y 2020-01-15 00:00:00
|
||||
15-2001-1 %d-%Y-%c 2001-01-15 00:00:00
|
||||
@ -186,16 +214,23 @@ date format date2
|
||||
2003-01-02 11:11:12Pm %Y-%m-%d %h:%i:%S%p 2003-01-02
|
||||
10:20:10 %H:%i:%s 0000-00-00
|
||||
10:20:10 %h:%i:%s.%f 0000-00-00
|
||||
10:20:10 %T 0000-00-00
|
||||
10:20:10AM %h:%i:%s%p 0000-00-00
|
||||
10:20:10AM %r 0000-00-00
|
||||
10:20:10.44AM %h:%i:%s.%f%p 0000-00-00
|
||||
15-01-2001 12:59:58 %d-%m-%Y %H:%i:%S 2001-01-15
|
||||
15 September 2001 %d %M %Y 2001-09-15
|
||||
15 SEPTEMB 2001 %d %M %Y 2001-09-15
|
||||
15 MAY 2001 %d %b %Y 2001-05-15
|
||||
15th May 2001 %D %b %Y 2001-05-15
|
||||
Sunday 15 MAY 2001 %W %d %b %Y 2001-05-15
|
||||
Sund 15 MAY 2001 %W %d %b %Y 2001-05-15
|
||||
Tuesday 00 2002 %W %U %Y 2002-01-01
|
||||
Thursday 53 1998 %W %u %Y 1998-12-31
|
||||
Sunday 01 2001 %W %v %x 2001-01-07
|
||||
Tuesday 52 2001 %W %V %X 2002-01-01
|
||||
060 2004 %j %Y 2004-02-29
|
||||
4 53 1998 %w %u %Y 1998-12-31
|
||||
15-01-2001 %d-%m-%Y %H:%i:%S 2001-01-15
|
||||
15-01-20 %d-%m-%y 2020-01-15
|
||||
15-2001-1 %d-%Y-%c 2001-01-15
|
||||
@ -210,16 +245,23 @@ date format time
|
||||
2003-01-02 11:11:12Pm %Y-%m-%d %h:%i:%S%p 23:11:12
|
||||
10:20:10 %H:%i:%s 10:20:10
|
||||
10:20:10 %h:%i:%s.%f 10:20:10
|
||||
10:20:10 %T 10:20:10
|
||||
10:20:10AM %h:%i:%s%p 10:20:10
|
||||
10:20:10AM %r 10:20:10
|
||||
10:20:10.44AM %h:%i:%s.%f%p 10:20:10.440000
|
||||
15-01-2001 12:59:58 %d-%m-%Y %H:%i:%S 12:59:58
|
||||
15 September 2001 %d %M %Y 00:00:00
|
||||
15 SEPTEMB 2001 %d %M %Y 00:00:00
|
||||
15 MAY 2001 %d %b %Y 00:00:00
|
||||
15th May 2001 %D %b %Y 00:00:00
|
||||
Sunday 15 MAY 2001 %W %d %b %Y 00:00:00
|
||||
Sund 15 MAY 2001 %W %d %b %Y 00:00:00
|
||||
Tuesday 00 2002 %W %U %Y 00:00:00
|
||||
Thursday 53 1998 %W %u %Y 00:00:00
|
||||
Sunday 01 2001 %W %v %x 00:00:00
|
||||
Tuesday 52 2001 %W %V %X 00:00:00
|
||||
060 2004 %j %Y 00:00:00
|
||||
4 53 1998 %w %u %Y 00:00:00
|
||||
15-01-2001 %d-%m-%Y %H:%i:%S 00:00:00
|
||||
15-01-20 %d-%m-%y 00:00:00
|
||||
15-2001-1 %d-%Y-%c 00:00:00
|
||||
@ -234,16 +276,23 @@ date format time2
|
||||
2003-01-02 11:11:12Pm %Y-%m-%d %h:%i:%S%p 23:11:12
|
||||
10:20:10 %H:%i:%s 10:20:10
|
||||
10:20:10 %h:%i:%s.%f 10:20:10
|
||||
10:20:10 %T 10:20:10
|
||||
10:20:10AM %h:%i:%s%p 10:20:10
|
||||
10:20:10AM %r 10:20:10
|
||||
10:20:10.44AM %h:%i:%s.%f%p 10:20:10.440000
|
||||
15-01-2001 12:59:58 %d-%m-%Y %H:%i:%S 12:59:58
|
||||
15 September 2001 %d %M %Y 00:00:00
|
||||
15 SEPTEMB 2001 %d %M %Y 00:00:00
|
||||
15 MAY 2001 %d %b %Y 00:00:00
|
||||
15th May 2001 %D %b %Y 00:00:00
|
||||
Sunday 15 MAY 2001 %W %d %b %Y 00:00:00
|
||||
Sund 15 MAY 2001 %W %d %b %Y 00:00:00
|
||||
Tuesday 00 2002 %W %U %Y 00:00:00
|
||||
Thursday 53 1998 %W %u %Y 00:00:00
|
||||
Sunday 01 2001 %W %v %x 00:00:00
|
||||
Tuesday 52 2001 %W %V %X 00:00:00
|
||||
060 2004 %j %Y 00:00:00
|
||||
4 53 1998 %w %u %Y 00:00:00
|
||||
15-01-2001 %d-%m-%Y %H:%i:%S 00:00:00
|
||||
15-01-20 %d-%m-%y 00:00:00
|
||||
15-2001-1 %d-%Y-%c 00:00:00
|
||||
@ -258,10 +307,13 @@ insert into t1 values
|
||||
('15 Septembei 2001', '%d %M %Y'),
|
||||
('15 Ju 2001', '%d %M %Y'),
|
||||
('Sund 15 MA', '%W %d %b %Y'),
|
||||
('Sunday 01 2001', '%W %V %X'),
|
||||
('Thursdai 12 1998', '%W %u %Y'),
|
||||
(NULL, get_format(DATE,'USA')),
|
||||
('Tuesday 52 2001', '%W %V %X');
|
||||
('Sunday 01 2001', '%W %v %X'),
|
||||
('Tuesday 52 2001', '%W %V %x'),
|
||||
('Tuesday 52 2001', '%W %V %Y'),
|
||||
('Tuesday 52 2001', '%W %u %x'),
|
||||
('7 53 1998', '%w %u %Y'),
|
||||
(NULL, get_format(DATE,'USA'));
|
||||
select date,format,str_to_date(date, format) as str_to_date from t1;
|
||||
date format str_to_date
|
||||
2003-01-02 10:11:12 PM %Y-%m-%d %H:%i:%S %p NULL
|
||||
@ -273,10 +325,13 @@ date format str_to_date
|
||||
15 Septembei 2001 %d %M %Y NULL
|
||||
15 Ju 2001 %d %M %Y NULL
|
||||
Sund 15 MA %W %d %b %Y NULL
|
||||
Sunday 01 2001 %W %V %X NULL
|
||||
Thursdai 12 1998 %W %u %Y NULL
|
||||
Sunday 01 2001 %W %v %X NULL
|
||||
Tuesday 52 2001 %W %V %x NULL
|
||||
Tuesday 52 2001 %W %V %Y NULL
|
||||
Tuesday 52 2001 %W %u %x NULL
|
||||
7 53 1998 %w %u %Y NULL
|
||||
NULL %m.%d.%Y NULL
|
||||
Tuesday 52 2001 %W %V %X NULL
|
||||
select date,format,concat(str_to_date(date, format),'') as con from t1;
|
||||
date format con
|
||||
2003-01-02 10:11:12 PM %Y-%m-%d %H:%i:%S %p NULL
|
||||
@ -288,10 +343,13 @@ date format con
|
||||
15 Septembei 2001 %d %M %Y NULL
|
||||
15 Ju 2001 %d %M %Y NULL
|
||||
Sund 15 MA %W %d %b %Y NULL
|
||||
Sunday 01 2001 %W %V %X NULL
|
||||
Thursdai 12 1998 %W %u %Y NULL
|
||||
Sunday 01 2001 %W %v %X NULL
|
||||
Tuesday 52 2001 %W %V %x NULL
|
||||
Tuesday 52 2001 %W %V %Y NULL
|
||||
Tuesday 52 2001 %W %u %x NULL
|
||||
7 53 1998 %w %u %Y NULL
|
||||
NULL %m.%d.%Y NULL
|
||||
Tuesday 52 2001 %W %V %X NULL
|
||||
truncate table t1;
|
||||
insert into t1 values
|
||||
('10:20:10AM', '%h:%i:%s'),
|
||||
|
@ -283,6 +283,12 @@ ID Value1 Value2
|
||||
SELECT * FROM t1 NATURAL JOIN t2 WHERE (Value1 = 'A' AND Value2 <> 'B') AND 1;
|
||||
ID Value1 Value2
|
||||
drop table t1,t2;
|
||||
CREATE TABLE t1 (a int);
|
||||
CREATE TABLE t2 (b int);
|
||||
CREATE TABLE t3 (c int);
|
||||
SELECT * FROM t1 NATURAL JOIN t2 NATURAL JOIN t3;
|
||||
a b c
|
||||
DROP TABLE t1, t2, t3;
|
||||
create table t1 (i int);
|
||||
create table t2 (i int);
|
||||
create table t3 (i int);
|
||||
|
@ -21,7 +21,7 @@ def test t1 t1 g g 5 4 0 Y 32768 3 63
|
||||
def test t1 t1 h h 0 7 0 Y 32768 4 63
|
||||
def test t1 t1 i i 13 4 0 Y 32864 0 63
|
||||
def test t1 t1 j j 10 10 0 Y 128 0 63
|
||||
def test t1 t1 k k 7 19 0 N 1217 0 63
|
||||
def test t1 t1 k k 7 19 0 N 1249 0 63
|
||||
def test t1 t1 l l 12 19 0 Y 128 0 63
|
||||
def test t1 t1 m m 254 1 0 Y 256 0 8
|
||||
def test t1 t1 n n 254 3 0 Y 2048 0 8
|
||||
|
446
mysql-test/r/mysqlbinlog2.result
Normal file
446
mysql-test/r/mysqlbinlog2.result
Normal file
@ -0,0 +1,446 @@
|
||||
drop table if exists t1;
|
||||
reset master;
|
||||
set @a=UNIX_TIMESTAMP("2020-01-21 15:32:22");
|
||||
set timestamp=@a;
|
||||
create table t1 (a int auto_increment not null primary key, b char(3));
|
||||
insert into t1 values(null, "a");
|
||||
insert into t1 values(null, "b");
|
||||
set timestamp=@a+2;
|
||||
insert into t1 values(null, "c");
|
||||
set timestamp=@a+4;
|
||||
insert into t1 values(null, "d");
|
||||
insert into t1 values(null, "e");
|
||||
flush logs;
|
||||
set timestamp=@a+1;
|
||||
insert into t1 values(null, "f");
|
||||
|
||||
--- Local --
|
||||
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
|
||||
use test;
|
||||
SET TIMESTAMP=1579609942;
|
||||
create table t1 (a int auto_increment not null primary key, b char(3));
|
||||
SET INSERT_ID=1;
|
||||
SET TIMESTAMP=1579609942;
|
||||
insert into t1 values(null, "a");
|
||||
SET INSERT_ID=2;
|
||||
SET TIMESTAMP=1579609942;
|
||||
insert into t1 values(null, "b");
|
||||
SET INSERT_ID=3;
|
||||
SET TIMESTAMP=1579609944;
|
||||
insert into t1 values(null, "c");
|
||||
SET INSERT_ID=4;
|
||||
SET TIMESTAMP=1579609946;
|
||||
insert into t1 values(null, "d");
|
||||
SET INSERT_ID=5;
|
||||
SET TIMESTAMP=1579609946;
|
||||
insert into t1 values(null, "e");
|
||||
|
||||
--- offset --
|
||||
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
|
||||
SET INSERT_ID=1;
|
||||
use test;
|
||||
SET TIMESTAMP=1579609942;
|
||||
insert into t1 values(null, "a");
|
||||
SET INSERT_ID=2;
|
||||
SET TIMESTAMP=1579609942;
|
||||
insert into t1 values(null, "b");
|
||||
SET INSERT_ID=3;
|
||||
SET TIMESTAMP=1579609944;
|
||||
insert into t1 values(null, "c");
|
||||
SET INSERT_ID=4;
|
||||
SET TIMESTAMP=1579609946;
|
||||
insert into t1 values(null, "d");
|
||||
SET INSERT_ID=5;
|
||||
SET TIMESTAMP=1579609946;
|
||||
insert into t1 values(null, "e");
|
||||
|
||||
--- start-position --
|
||||
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
|
||||
use test;
|
||||
SET TIMESTAMP=1579609946;
|
||||
insert into t1 values(null, "d");
|
||||
SET INSERT_ID=5;
|
||||
SET TIMESTAMP=1579609946;
|
||||
insert into t1 values(null, "e");
|
||||
|
||||
--- stop-position --
|
||||
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
|
||||
use test;
|
||||
SET TIMESTAMP=1579609942;
|
||||
create table t1 (a int auto_increment not null primary key, b char(3));
|
||||
SET INSERT_ID=1;
|
||||
SET TIMESTAMP=1579609942;
|
||||
insert into t1 values(null, "a");
|
||||
SET INSERT_ID=2;
|
||||
SET TIMESTAMP=1579609942;
|
||||
insert into t1 values(null, "b");
|
||||
SET INSERT_ID=3;
|
||||
SET TIMESTAMP=1579609944;
|
||||
insert into t1 values(null, "c");
|
||||
SET INSERT_ID=4;
|
||||
|
||||
--- start-datetime --
|
||||
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
|
||||
SET INSERT_ID=3;
|
||||
use test;
|
||||
SET TIMESTAMP=1579609944;
|
||||
insert into t1 values(null, "c");
|
||||
SET INSERT_ID=4;
|
||||
SET TIMESTAMP=1579609946;
|
||||
insert into t1 values(null, "d");
|
||||
SET INSERT_ID=5;
|
||||
SET TIMESTAMP=1579609946;
|
||||
insert into t1 values(null, "e");
|
||||
|
||||
--- stop-datetime --
|
||||
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
|
||||
use test;
|
||||
SET TIMESTAMP=1579609942;
|
||||
create table t1 (a int auto_increment not null primary key, b char(3));
|
||||
SET INSERT_ID=1;
|
||||
SET TIMESTAMP=1579609942;
|
||||
insert into t1 values(null, "a");
|
||||
SET INSERT_ID=2;
|
||||
SET TIMESTAMP=1579609942;
|
||||
insert into t1 values(null, "b");
|
||||
|
||||
--- Local with 2 binlogs on command line --
|
||||
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
|
||||
use test;
|
||||
SET TIMESTAMP=1579609942;
|
||||
create table t1 (a int auto_increment not null primary key, b char(3));
|
||||
SET INSERT_ID=1;
|
||||
SET TIMESTAMP=1579609942;
|
||||
insert into t1 values(null, "a");
|
||||
SET INSERT_ID=2;
|
||||
SET TIMESTAMP=1579609942;
|
||||
insert into t1 values(null, "b");
|
||||
SET INSERT_ID=3;
|
||||
SET TIMESTAMP=1579609944;
|
||||
insert into t1 values(null, "c");
|
||||
SET INSERT_ID=4;
|
||||
SET TIMESTAMP=1579609946;
|
||||
insert into t1 values(null, "d");
|
||||
SET INSERT_ID=5;
|
||||
SET TIMESTAMP=1579609946;
|
||||
insert into t1 values(null, "e");
|
||||
SET INSERT_ID=6;
|
||||
use test;
|
||||
SET TIMESTAMP=1579609943;
|
||||
insert into t1 values(null, "f");
|
||||
|
||||
--- offset --
|
||||
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
|
||||
SET INSERT_ID=1;
|
||||
use test;
|
||||
SET TIMESTAMP=1579609942;
|
||||
insert into t1 values(null, "a");
|
||||
SET INSERT_ID=2;
|
||||
SET TIMESTAMP=1579609942;
|
||||
insert into t1 values(null, "b");
|
||||
SET INSERT_ID=3;
|
||||
SET TIMESTAMP=1579609944;
|
||||
insert into t1 values(null, "c");
|
||||
SET INSERT_ID=4;
|
||||
SET TIMESTAMP=1579609946;
|
||||
insert into t1 values(null, "d");
|
||||
SET INSERT_ID=5;
|
||||
SET TIMESTAMP=1579609946;
|
||||
insert into t1 values(null, "e");
|
||||
SET INSERT_ID=6;
|
||||
use test;
|
||||
SET TIMESTAMP=1579609943;
|
||||
insert into t1 values(null, "f");
|
||||
|
||||
--- start-position --
|
||||
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
|
||||
use test;
|
||||
SET TIMESTAMP=1579609946;
|
||||
insert into t1 values(null, "d");
|
||||
SET INSERT_ID=5;
|
||||
SET TIMESTAMP=1579609946;
|
||||
insert into t1 values(null, "e");
|
||||
SET INSERT_ID=6;
|
||||
use test;
|
||||
SET TIMESTAMP=1579609943;
|
||||
insert into t1 values(null, "f");
|
||||
|
||||
--- stop-position --
|
||||
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
|
||||
use test;
|
||||
SET TIMESTAMP=1579609942;
|
||||
create table t1 (a int auto_increment not null primary key, b char(3));
|
||||
SET INSERT_ID=1;
|
||||
SET TIMESTAMP=1579609942;
|
||||
insert into t1 values(null, "a");
|
||||
SET INSERT_ID=2;
|
||||
SET TIMESTAMP=1579609942;
|
||||
insert into t1 values(null, "b");
|
||||
SET INSERT_ID=3;
|
||||
SET TIMESTAMP=1579609944;
|
||||
insert into t1 values(null, "c");
|
||||
SET INSERT_ID=4;
|
||||
SET TIMESTAMP=1579609946;
|
||||
insert into t1 values(null, "d");
|
||||
SET INSERT_ID=5;
|
||||
SET TIMESTAMP=1579609946;
|
||||
insert into t1 values(null, "e");
|
||||
SET INSERT_ID=6;
|
||||
|
||||
--- start-datetime --
|
||||
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
|
||||
SET INSERT_ID=3;
|
||||
use test;
|
||||
SET TIMESTAMP=1579609944;
|
||||
insert into t1 values(null, "c");
|
||||
SET INSERT_ID=4;
|
||||
SET TIMESTAMP=1579609946;
|
||||
insert into t1 values(null, "d");
|
||||
SET INSERT_ID=5;
|
||||
SET TIMESTAMP=1579609946;
|
||||
insert into t1 values(null, "e");
|
||||
SET INSERT_ID=6;
|
||||
use test;
|
||||
SET TIMESTAMP=1579609943;
|
||||
insert into t1 values(null, "f");
|
||||
|
||||
--- stop-datetime --
|
||||
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
|
||||
use test;
|
||||
SET TIMESTAMP=1579609942;
|
||||
create table t1 (a int auto_increment not null primary key, b char(3));
|
||||
SET INSERT_ID=1;
|
||||
SET TIMESTAMP=1579609942;
|
||||
insert into t1 values(null, "a");
|
||||
SET INSERT_ID=2;
|
||||
SET TIMESTAMP=1579609942;
|
||||
insert into t1 values(null, "b");
|
||||
|
||||
--- Remote --
|
||||
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
|
||||
use test;
|
||||
SET TIMESTAMP=1579609942;
|
||||
create table t1 (a int auto_increment not null primary key, b char(3));
|
||||
SET INSERT_ID=1;
|
||||
SET TIMESTAMP=1579609942;
|
||||
insert into t1 values(null, "a");
|
||||
SET INSERT_ID=2;
|
||||
SET TIMESTAMP=1579609942;
|
||||
insert into t1 values(null, "b");
|
||||
SET INSERT_ID=3;
|
||||
SET TIMESTAMP=1579609944;
|
||||
insert into t1 values(null, "c");
|
||||
SET INSERT_ID=4;
|
||||
SET TIMESTAMP=1579609946;
|
||||
insert into t1 values(null, "d");
|
||||
SET INSERT_ID=5;
|
||||
SET TIMESTAMP=1579609946;
|
||||
insert into t1 values(null, "e");
|
||||
|
||||
--- offset --
|
||||
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
|
||||
SET INSERT_ID=1;
|
||||
use test;
|
||||
SET TIMESTAMP=1579609942;
|
||||
insert into t1 values(null, "a");
|
||||
SET INSERT_ID=2;
|
||||
SET TIMESTAMP=1579609942;
|
||||
insert into t1 values(null, "b");
|
||||
SET INSERT_ID=3;
|
||||
SET TIMESTAMP=1579609944;
|
||||
insert into t1 values(null, "c");
|
||||
SET INSERT_ID=4;
|
||||
SET TIMESTAMP=1579609946;
|
||||
insert into t1 values(null, "d");
|
||||
SET INSERT_ID=5;
|
||||
SET TIMESTAMP=1579609946;
|
||||
insert into t1 values(null, "e");
|
||||
|
||||
--- start-position --
|
||||
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
|
||||
use test;
|
||||
SET TIMESTAMP=1579609946;
|
||||
insert into t1 values(null, "d");
|
||||
SET INSERT_ID=5;
|
||||
SET TIMESTAMP=1579609946;
|
||||
insert into t1 values(null, "e");
|
||||
|
||||
--- stop-position --
|
||||
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
|
||||
use test;
|
||||
SET TIMESTAMP=1579609942;
|
||||
create table t1 (a int auto_increment not null primary key, b char(3));
|
||||
SET INSERT_ID=1;
|
||||
SET TIMESTAMP=1579609942;
|
||||
insert into t1 values(null, "a");
|
||||
SET INSERT_ID=2;
|
||||
SET TIMESTAMP=1579609942;
|
||||
insert into t1 values(null, "b");
|
||||
SET INSERT_ID=3;
|
||||
SET TIMESTAMP=1579609944;
|
||||
insert into t1 values(null, "c");
|
||||
SET INSERT_ID=4;
|
||||
|
||||
--- start-datetime --
|
||||
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
|
||||
SET INSERT_ID=3;
|
||||
use test;
|
||||
SET TIMESTAMP=1579609944;
|
||||
insert into t1 values(null, "c");
|
||||
SET INSERT_ID=4;
|
||||
SET TIMESTAMP=1579609946;
|
||||
insert into t1 values(null, "d");
|
||||
SET INSERT_ID=5;
|
||||
SET TIMESTAMP=1579609946;
|
||||
insert into t1 values(null, "e");
|
||||
|
||||
--- stop-datetime --
|
||||
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
|
||||
use test;
|
||||
SET TIMESTAMP=1579609942;
|
||||
create table t1 (a int auto_increment not null primary key, b char(3));
|
||||
SET INSERT_ID=1;
|
||||
SET TIMESTAMP=1579609942;
|
||||
insert into t1 values(null, "a");
|
||||
SET INSERT_ID=2;
|
||||
SET TIMESTAMP=1579609942;
|
||||
insert into t1 values(null, "b");
|
||||
|
||||
--- Remote with 2 binlogs on command line --
|
||||
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
|
||||
use test;
|
||||
SET TIMESTAMP=1579609942;
|
||||
create table t1 (a int auto_increment not null primary key, b char(3));
|
||||
SET INSERT_ID=1;
|
||||
SET TIMESTAMP=1579609942;
|
||||
insert into t1 values(null, "a");
|
||||
SET INSERT_ID=2;
|
||||
SET TIMESTAMP=1579609942;
|
||||
insert into t1 values(null, "b");
|
||||
SET INSERT_ID=3;
|
||||
SET TIMESTAMP=1579609944;
|
||||
insert into t1 values(null, "c");
|
||||
SET INSERT_ID=4;
|
||||
SET TIMESTAMP=1579609946;
|
||||
insert into t1 values(null, "d");
|
||||
SET INSERT_ID=5;
|
||||
SET TIMESTAMP=1579609946;
|
||||
insert into t1 values(null, "e");
|
||||
SET INSERT_ID=6;
|
||||
use test;
|
||||
SET TIMESTAMP=1579609943;
|
||||
insert into t1 values(null, "f");
|
||||
|
||||
--- offset --
|
||||
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
|
||||
SET INSERT_ID=1;
|
||||
use test;
|
||||
SET TIMESTAMP=1579609942;
|
||||
insert into t1 values(null, "a");
|
||||
SET INSERT_ID=2;
|
||||
SET TIMESTAMP=1579609942;
|
||||
insert into t1 values(null, "b");
|
||||
SET INSERT_ID=3;
|
||||
SET TIMESTAMP=1579609944;
|
||||
insert into t1 values(null, "c");
|
||||
SET INSERT_ID=4;
|
||||
SET TIMESTAMP=1579609946;
|
||||
insert into t1 values(null, "d");
|
||||
SET INSERT_ID=5;
|
||||
SET TIMESTAMP=1579609946;
|
||||
insert into t1 values(null, "e");
|
||||
SET INSERT_ID=6;
|
||||
use test;
|
||||
SET TIMESTAMP=1579609943;
|
||||
insert into t1 values(null, "f");
|
||||
|
||||
--- start-position --
|
||||
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
|
||||
use test;
|
||||
SET TIMESTAMP=1579609946;
|
||||
insert into t1 values(null, "d");
|
||||
SET INSERT_ID=5;
|
||||
SET TIMESTAMP=1579609946;
|
||||
insert into t1 values(null, "e");
|
||||
SET INSERT_ID=6;
|
||||
use test;
|
||||
SET TIMESTAMP=1579609943;
|
||||
insert into t1 values(null, "f");
|
||||
|
||||
--- stop-position --
|
||||
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
|
||||
use test;
|
||||
SET TIMESTAMP=1579609942;
|
||||
create table t1 (a int auto_increment not null primary key, b char(3));
|
||||
SET INSERT_ID=1;
|
||||
SET TIMESTAMP=1579609942;
|
||||
insert into t1 values(null, "a");
|
||||
SET INSERT_ID=2;
|
||||
SET TIMESTAMP=1579609942;
|
||||
insert into t1 values(null, "b");
|
||||
SET INSERT_ID=3;
|
||||
SET TIMESTAMP=1579609944;
|
||||
insert into t1 values(null, "c");
|
||||
SET INSERT_ID=4;
|
||||
SET TIMESTAMP=1579609946;
|
||||
insert into t1 values(null, "d");
|
||||
SET INSERT_ID=5;
|
||||
SET TIMESTAMP=1579609946;
|
||||
insert into t1 values(null, "e");
|
||||
SET INSERT_ID=6;
|
||||
|
||||
--- start-datetime --
|
||||
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
|
||||
SET INSERT_ID=3;
|
||||
use test;
|
||||
SET TIMESTAMP=1579609944;
|
||||
insert into t1 values(null, "c");
|
||||
SET INSERT_ID=4;
|
||||
SET TIMESTAMP=1579609946;
|
||||
insert into t1 values(null, "d");
|
||||
SET INSERT_ID=5;
|
||||
SET TIMESTAMP=1579609946;
|
||||
insert into t1 values(null, "e");
|
||||
SET INSERT_ID=6;
|
||||
use test;
|
||||
SET TIMESTAMP=1579609943;
|
||||
insert into t1 values(null, "f");
|
||||
|
||||
--- stop-datetime --
|
||||
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
|
||||
use test;
|
||||
SET TIMESTAMP=1579609942;
|
||||
create table t1 (a int auto_increment not null primary key, b char(3));
|
||||
SET INSERT_ID=1;
|
||||
SET TIMESTAMP=1579609942;
|
||||
insert into t1 values(null, "a");
|
||||
SET INSERT_ID=2;
|
||||
SET TIMESTAMP=1579609942;
|
||||
insert into t1 values(null, "b");
|
||||
|
||||
--- to-last-log --
|
||||
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
|
||||
use test;
|
||||
SET TIMESTAMP=1579609942;
|
||||
create table t1 (a int auto_increment not null primary key, b char(3));
|
||||
SET INSERT_ID=1;
|
||||
SET TIMESTAMP=1579609942;
|
||||
insert into t1 values(null, "a");
|
||||
SET INSERT_ID=2;
|
||||
SET TIMESTAMP=1579609942;
|
||||
insert into t1 values(null, "b");
|
||||
SET INSERT_ID=3;
|
||||
SET TIMESTAMP=1579609944;
|
||||
insert into t1 values(null, "c");
|
||||
SET INSERT_ID=4;
|
||||
SET TIMESTAMP=1579609946;
|
||||
insert into t1 values(null, "d");
|
||||
SET INSERT_ID=5;
|
||||
SET TIMESTAMP=1579609946;
|
||||
insert into t1 values(null, "e");
|
||||
SET INSERT_ID=6;
|
||||
SET TIMESTAMP=1579609943;
|
||||
insert into t1 values(null, "f");
|
||||
|
||||
--- end of test --
|
||||
drop table t1;
|
@ -15,7 +15,7 @@ col2 varchar(30) not null,
|
||||
col3 varchar (20) not null,
|
||||
col4 varchar(4) not null,
|
||||
col5 enum('PENDING', 'ACTIVE', 'DISABLED') not null,
|
||||
col6 int not null, to_be_deleted int);
|
||||
col6 int not null, to_be_deleted int) ENGINE=ndbcluster;
|
||||
insert into t1 values (2,4,3,5,"PENDING",1,7), (NULL,4,3,5,"PENDING",1,7), (25, 4,3,5,"PENDING",1,7), (NULL,4,3,5,"PENDING",1,7);
|
||||
select * from t1 order by col1;
|
||||
col1 col2 col3 col4 col5 col6 to_be_deleted
|
||||
|
31
mysql-test/r/ndb_limit.result
Normal file
31
mysql-test/r/ndb_limit.result
Normal file
@ -0,0 +1,31 @@
|
||||
DROP TABLE IF EXISTS t2;
|
||||
CREATE TABLE t2 (
|
||||
a bigint unsigned NOT NULL PRIMARY KEY,
|
||||
b int unsigned not null,
|
||||
c int unsigned
|
||||
) engine=ndbcluster;
|
||||
select count(*) from t2;
|
||||
count(*)
|
||||
10000
|
||||
delete from t2 limit 1;
|
||||
select count(*) from t2;
|
||||
count(*)
|
||||
9999
|
||||
delete from t2 limit 100;
|
||||
select count(*) from t2;
|
||||
count(*)
|
||||
9899
|
||||
delete from t2 limit 1000;
|
||||
select count(*) from t2;
|
||||
count(*)
|
||||
8899
|
||||
update t2 set c=12345678 limit 100;
|
||||
select count(*) from t2 where c=12345678;
|
||||
count(*)
|
||||
100
|
||||
select count(*) from t2 where c=12345678 limit 1000;
|
||||
count(*)
|
||||
100
|
||||
select * from t2 limit 0;
|
||||
a b c
|
||||
drop table t2;
|
14
mysql-test/r/ndb_truncate.result
Normal file
14
mysql-test/r/ndb_truncate.result
Normal file
@ -0,0 +1,14 @@
|
||||
DROP TABLE IF EXISTS t2;
|
||||
CREATE TABLE t2 (
|
||||
a bigint unsigned NOT NULL PRIMARY KEY,
|
||||
b int unsigned not null,
|
||||
c int unsigned
|
||||
) engine=ndbcluster;
|
||||
select count(*) from t2;
|
||||
count(*)
|
||||
5000
|
||||
truncate table t2;
|
||||
select count(*) from t2;
|
||||
count(*)
|
||||
0
|
||||
drop table t2;
|
@ -870,7 +870,7 @@ def test t_many_col_types t_many_col_types c11 c11 0 9 6 Y 32768 4 63
|
||||
def test t_many_col_types t_many_col_types c12 c12 0 10 6 Y 32768 4 63
|
||||
def test t_many_col_types t_many_col_types c13 c13 10 10 10 Y 128 0 63
|
||||
def test t_many_col_types t_many_col_types c14 c14 12 19 19 Y 128 0 63
|
||||
def test t_many_col_types t_many_col_types c15 c15 7 19 19 N 1217 0 63
|
||||
def test t_many_col_types t_many_col_types c15 c15 7 19 19 N 1249 0 63
|
||||
def test t_many_col_types t_many_col_types c16 c16 11 8 8 Y 128 0 63
|
||||
def test t_many_col_types t_many_col_types c17 c17 13 4 4 Y 32864 0 63
|
||||
def test t_many_col_types t_many_col_types c18 c18 1 1 1 Y 32768 0 63
|
||||
|
@ -870,7 +870,7 @@ def test t_many_col_types t_many_col_types c11 c11 0 9 6 Y 32768 4 63
|
||||
def test t_many_col_types t_many_col_types c12 c12 0 10 6 Y 32768 4 63
|
||||
def test t_many_col_types t_many_col_types c13 c13 10 10 10 Y 128 0 63
|
||||
def test t_many_col_types t_many_col_types c14 c14 12 19 19 Y 128 0 63
|
||||
def test t_many_col_types t_many_col_types c15 c15 7 19 19 N 1217 0 63
|
||||
def test t_many_col_types t_many_col_types c15 c15 7 19 19 N 1249 0 63
|
||||
def test t_many_col_types t_many_col_types c16 c16 11 8 8 Y 128 0 63
|
||||
def test t_many_col_types t_many_col_types c17 c17 13 4 4 Y 32864 0 63
|
||||
def test t_many_col_types t_many_col_types c18 c18 1 1 1 Y 32768 0 63
|
||||
|
@ -871,7 +871,7 @@ def test t_many_col_types t_many_col_types c11 c11 0 9 6 Y 32768 4 63
|
||||
def test t_many_col_types t_many_col_types c12 c12 0 10 6 Y 32768 4 63
|
||||
def test t_many_col_types t_many_col_types c13 c13 10 10 10 Y 128 0 63
|
||||
def test t_many_col_types t_many_col_types c14 c14 12 19 19 Y 128 0 63
|
||||
def test t_many_col_types t_many_col_types c15 c15 7 19 19 N 1217 0 63
|
||||
def test t_many_col_types t_many_col_types c15 c15 7 19 19 N 1249 0 63
|
||||
def test t_many_col_types t_many_col_types c16 c16 11 8 8 Y 128 0 63
|
||||
def test t_many_col_types t_many_col_types c17 c17 13 4 4 Y 32864 0 63
|
||||
def test t_many_col_types t_many_col_types c18 c18 1 1 1 Y 32768 0 63
|
||||
|
@ -913,7 +913,7 @@ def test t_many_col_types t_many_col_types c11 c11 0 9 6 Y 32768 4 63
|
||||
def test t_many_col_types t_many_col_types c12 c12 0 10 6 Y 32768 4 63
|
||||
def test t_many_col_types t_many_col_types c13 c13 10 10 10 Y 128 0 63
|
||||
def test t_many_col_types t_many_col_types c14 c14 12 19 19 Y 128 0 63
|
||||
def test t_many_col_types t_many_col_types c15 c15 7 19 19 N 1217 0 63
|
||||
def test t_many_col_types t_many_col_types c15 c15 7 19 19 N 1249 0 63
|
||||
def test t_many_col_types t_many_col_types c16 c16 11 8 8 Y 128 0 63
|
||||
def test t_many_col_types t_many_col_types c17 c17 13 4 4 Y 32864 0 63
|
||||
def test t_many_col_types t_many_col_types c18 c18 1 1 1 Y 32768 0 63
|
||||
@ -2106,7 +2106,7 @@ def test t_many_col_types t_many_col_types c11 c11 0 9 6 Y 32768 4 63
|
||||
def test t_many_col_types t_many_col_types c12 c12 0 10 6 Y 32768 4 63
|
||||
def test t_many_col_types t_many_col_types c13 c13 10 10 10 Y 128 0 63
|
||||
def test t_many_col_types t_many_col_types c14 c14 12 19 19 Y 128 0 63
|
||||
def test t_many_col_types t_many_col_types c15 c15 7 19 19 N 1217 0 63
|
||||
def test t_many_col_types t_many_col_types c15 c15 7 19 19 N 1249 0 63
|
||||
def test t_many_col_types t_many_col_types c16 c16 11 8 8 Y 128 0 63
|
||||
def test t_many_col_types t_many_col_types c17 c17 13 4 4 Y 32864 0 63
|
||||
def test t_many_col_types t_many_col_types c18 c18 1 1 1 Y 32768 0 63
|
||||
|
@ -870,7 +870,7 @@ def test t_many_col_types t_many_col_types c11 c11 0 9 6 Y 32768 4 63
|
||||
def test t_many_col_types t_many_col_types c12 c12 0 10 6 Y 32768 4 63
|
||||
def test t_many_col_types t_many_col_types c13 c13 10 10 10 Y 128 0 63
|
||||
def test t_many_col_types t_many_col_types c14 c14 12 19 19 Y 128 0 63
|
||||
def test t_many_col_types t_many_col_types c15 c15 7 19 19 N 1217 0 63
|
||||
def test t_many_col_types t_many_col_types c15 c15 7 19 19 N 1249 0 63
|
||||
def test t_many_col_types t_many_col_types c16 c16 11 8 8 Y 128 0 63
|
||||
def test t_many_col_types t_many_col_types c17 c17 13 4 4 Y 32864 0 63
|
||||
def test t_many_col_types t_many_col_types c18 c18 1 1 1 Y 32768 0 63
|
||||
|
File diff suppressed because one or more lines are too long
@ -138,6 +138,13 @@ insert into t1(b)values(5);
|
||||
insert into t1(b)values(6);
|
||||
insert into t1(b)values(7);
|
||||
select * from t1 order by b;
|
||||
alter table t1 modify b mediumint;
|
||||
select * from t1 order by b;
|
||||
create table t2 (a int);
|
||||
insert t2 values (1),(2);
|
||||
alter table t2 add b int auto_increment primary key;
|
||||
select * from t2;
|
||||
drop table t2;
|
||||
delete from t1 where a=0;
|
||||
update t1 set a=0 where b=5;
|
||||
select * from t1 order by b;
|
||||
|
@ -48,6 +48,8 @@ flush privileges;
|
||||
#connect (con1,localhost,test,gambling2,"");
|
||||
#show tables;
|
||||
connect (con1,localhost,test,gambling2,mysql);
|
||||
--error 1105
|
||||
set password='gambling3';
|
||||
set password=old_password('gambling3');
|
||||
show tables;
|
||||
connect (con1,localhost,test,gambling3,test);
|
||||
|
@ -132,16 +132,23 @@ insert into t1 values
|
||||
('2003-01-02 11:11:12Pm', '%Y-%m-%d %h:%i:%S%p'),
|
||||
('10:20:10', '%H:%i:%s'),
|
||||
('10:20:10', '%h:%i:%s.%f'),
|
||||
('10:20:10', '%T'),
|
||||
('10:20:10AM', '%h:%i:%s%p'),
|
||||
('10:20:10AM', '%r'),
|
||||
('10:20:10.44AM', '%h:%i:%s.%f%p'),
|
||||
('15-01-2001 12:59:58', '%d-%m-%Y %H:%i:%S'),
|
||||
('15 September 2001', '%d %M %Y'),
|
||||
('15 SEPTEMB 2001', '%d %M %Y'),
|
||||
('15 MAY 2001', '%d %b %Y'),
|
||||
('15th May 2001', '%D %b %Y'),
|
||||
('Sunday 15 MAY 2001', '%W %d %b %Y'),
|
||||
('Sund 15 MAY 2001', '%W %d %b %Y'),
|
||||
('Tuesday 00 2002', '%W %U %Y'),
|
||||
('Thursday 53 1998', '%W %u %Y'),
|
||||
('Sunday 01 2001', '%W %v %x'),
|
||||
('Tuesday 52 2001', '%W %V %X'),
|
||||
('060 2004', '%j %Y'),
|
||||
('4 53 1998', '%w %u %Y'),
|
||||
('15-01-2001', '%d-%m-%Y %H:%i:%S'),
|
||||
('15-01-20', '%d-%m-%y'),
|
||||
('15-2001-1', '%d-%Y-%c');
|
||||
@ -156,7 +163,7 @@ select date,format,DATE(str_to_date(date, format)) as date2 from t1;
|
||||
select date,format,TIME(str_to_date(date, format)) as time from t1;
|
||||
select date,format,concat(TIME(str_to_date(date, format))) as time2 from t1;
|
||||
|
||||
# Test wrong dates
|
||||
# Test wrong dates or converion specifiers
|
||||
|
||||
truncate table t1;
|
||||
insert into t1 values
|
||||
@ -169,10 +176,13 @@ insert into t1 values
|
||||
('15 Septembei 2001', '%d %M %Y'),
|
||||
('15 Ju 2001', '%d %M %Y'),
|
||||
('Sund 15 MA', '%W %d %b %Y'),
|
||||
('Sunday 01 2001', '%W %V %X'),
|
||||
('Thursdai 12 1998', '%W %u %Y'),
|
||||
(NULL, get_format(DATE,'USA')),
|
||||
('Tuesday 52 2001', '%W %V %X');
|
||||
('Sunday 01 2001', '%W %v %X'),
|
||||
('Tuesday 52 2001', '%W %V %x'),
|
||||
('Tuesday 52 2001', '%W %V %Y'),
|
||||
('Tuesday 52 2001', '%W %u %x'),
|
||||
('7 53 1998', '%w %u %Y'),
|
||||
(NULL, get_format(DATE,'USA'));
|
||||
select date,format,str_to_date(date, format) as str_to_date from t1;
|
||||
select date,format,concat(str_to_date(date, format),'') as con from t1;
|
||||
|
||||
|
@ -284,6 +284,16 @@ SELECT * FROM t1 NATURAL JOIN t2 WHERE 1 AND Value1 = 'A' AND Value2 <> 'B';
|
||||
SELECT * FROM t1 NATURAL JOIN t2 WHERE (Value1 = 'A' AND Value2 <> 'B') AND 1;
|
||||
drop table t1,t2;
|
||||
|
||||
#
|
||||
# dummy natural join (no common columns) Bug #4807
|
||||
#
|
||||
|
||||
CREATE TABLE t1 (a int);
|
||||
CREATE TABLE t2 (b int);
|
||||
CREATE TABLE t3 (c int);
|
||||
SELECT * FROM t1 NATURAL JOIN t2 NATURAL JOIN t3;
|
||||
DROP TABLE t1, t2, t3;
|
||||
|
||||
#
|
||||
# Test combination of join methods
|
||||
#
|
||||
|
156
mysql-test/t/mysqlbinlog2.test
Normal file
156
mysql-test/t/mysqlbinlog2.test
Normal file
@ -0,0 +1,156 @@
|
||||
# Test for the new options --start-datetime, stop-datetime,
|
||||
# and a few others.
|
||||
|
||||
--disable_warnings
|
||||
drop table if exists t1;
|
||||
--enable_warnings
|
||||
reset master;
|
||||
|
||||
# We need this for getting fixed timestamps inside of this test.
|
||||
# I use a date in the future to keep a growing timestamp along the
|
||||
# binlog (including the Start_log_event). This test will work
|
||||
# unchanged everywhere, because mysql-test-run has fixed TZ, which it
|
||||
# exports (so mysqlbinlog has same fixed TZ).
|
||||
set @a=UNIX_TIMESTAMP("2020-01-21 15:32:22");
|
||||
set timestamp=@a;
|
||||
create table t1 (a int auto_increment not null primary key, b char(3));
|
||||
insert into t1 values(null, "a");
|
||||
insert into t1 values(null, "b");
|
||||
set timestamp=@a+2;
|
||||
insert into t1 values(null, "c");
|
||||
set timestamp=@a+4;
|
||||
insert into t1 values(null, "d");
|
||||
insert into t1 values(null, "e");
|
||||
|
||||
flush logs;
|
||||
set timestamp=@a+1; # this could happen on a slave
|
||||
insert into t1 values(null, "f");
|
||||
|
||||
# delimiters are for easier debugging in future
|
||||
|
||||
--disable_query_log
|
||||
select "--- Local --" as "";
|
||||
--enable_query_log
|
||||
|
||||
#
|
||||
# We should use --short-form everywhere because in other case output will
|
||||
# be time dependent (the Start events). Better than nothing.
|
||||
#
|
||||
|
||||
--exec $MYSQL_BINLOG --short-form $MYSQL_TEST_DIR/var/log/master-bin.000001
|
||||
|
||||
--disable_query_log
|
||||
select "--- offset --" as "";
|
||||
--enable_query_log
|
||||
--exec $MYSQL_BINLOG --short-form --offset=2 $MYSQL_TEST_DIR/var/log/master-bin.000001
|
||||
--disable_query_log
|
||||
select "--- start-position --" as "";
|
||||
--enable_query_log
|
||||
--exec $MYSQL_BINLOG --short-form --start-position=497 $MYSQL_TEST_DIR/var/log/master-bin.000001
|
||||
--disable_query_log
|
||||
select "--- stop-position --" as "";
|
||||
--enable_query_log
|
||||
--exec $MYSQL_BINLOG --short-form --stop-position=497 $MYSQL_TEST_DIR/var/log/master-bin.000001
|
||||
--disable_query_log
|
||||
select "--- start-datetime --" as "";
|
||||
--enable_query_log
|
||||
--exec $MYSQL_BINLOG --short-form "--start-datetime=2020-01-21 15:32:24" $MYSQL_TEST_DIR/var/log/master-bin.000001
|
||||
--disable_query_log
|
||||
select "--- stop-datetime --" as "";
|
||||
--enable_query_log
|
||||
--exec $MYSQL_BINLOG --short-form "--stop-datetime=2020-01-21 15:32:24" $MYSQL_TEST_DIR/var/log/master-bin.000001
|
||||
|
||||
--disable_query_log
|
||||
select "--- Local with 2 binlogs on command line --" as "";
|
||||
--enable_query_log
|
||||
|
||||
# This is to verify that some options apply only to first, or last binlog
|
||||
|
||||
--exec $MYSQL_BINLOG --short-form $MYSQL_TEST_DIR/var/log/master-bin.000001 $MYSQL_TEST_DIR/var/log/master-bin.000002
|
||||
|
||||
--disable_query_log
|
||||
select "--- offset --" as "";
|
||||
--enable_query_log
|
||||
--exec $MYSQL_BINLOG --short-form --offset=2 $MYSQL_TEST_DIR/var/log/master-bin.000001 $MYSQL_TEST_DIR/var/log/master-bin.000002
|
||||
--disable_query_log
|
||||
select "--- start-position --" as "";
|
||||
--enable_query_log
|
||||
--exec $MYSQL_BINLOG --short-form --start-position=497 $MYSQL_TEST_DIR/var/log/master-bin.000001 $MYSQL_TEST_DIR/var/log/master-bin.000002
|
||||
--disable_query_log
|
||||
select "--- stop-position --" as "";
|
||||
--enable_query_log
|
||||
--exec $MYSQL_BINLOG --short-form --stop-position=32 $MYSQL_TEST_DIR/var/log/master-bin.000001 $MYSQL_TEST_DIR/var/log/master-bin.000002
|
||||
--disable_query_log
|
||||
select "--- start-datetime --" as "";
|
||||
--enable_query_log
|
||||
--exec $MYSQL_BINLOG --short-form "--start-datetime=2020-01-21 15:32:24" $MYSQL_TEST_DIR/var/log/master-bin.000001 $MYSQL_TEST_DIR/var/log/master-bin.000002
|
||||
--disable_query_log
|
||||
select "--- stop-datetime --" as "";
|
||||
--enable_query_log
|
||||
--exec $MYSQL_BINLOG --short-form "--stop-datetime=2020-01-21 15:32:24" $MYSQL_TEST_DIR/var/log/master-bin.000001 $MYSQL_TEST_DIR/var/log/master-bin.000002
|
||||
|
||||
--disable_query_log
|
||||
select "--- Remote --" as "";
|
||||
--enable_query_log
|
||||
|
||||
--exec $MYSQL_BINLOG --short-form --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001
|
||||
|
||||
--disable_query_log
|
||||
select "--- offset --" as "";
|
||||
--enable_query_log
|
||||
--exec $MYSQL_BINLOG --short-form --offset=2 --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001
|
||||
--disable_query_log
|
||||
select "--- start-position --" as "";
|
||||
--enable_query_log
|
||||
--exec $MYSQL_BINLOG --short-form --start-position=497 --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001
|
||||
--disable_query_log
|
||||
select "--- stop-position --" as "";
|
||||
--enable_query_log
|
||||
--exec $MYSQL_BINLOG --short-form --stop-position=497 --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001
|
||||
--disable_query_log
|
||||
select "--- start-datetime --" as "";
|
||||
--enable_query_log
|
||||
--exec $MYSQL_BINLOG --short-form "--start-datetime=2020-01-21 15:32:24" --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001
|
||||
--disable_query_log
|
||||
select "--- stop-datetime --" as "";
|
||||
--enable_query_log
|
||||
--exec $MYSQL_BINLOG --short-form "--stop-datetime=2020-01-21 15:32:24" --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001
|
||||
|
||||
--disable_query_log
|
||||
select "--- Remote with 2 binlogs on command line --" as "";
|
||||
--enable_query_log
|
||||
|
||||
--exec $MYSQL_BINLOG --short-form --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001 master-bin.000002
|
||||
|
||||
--disable_query_log
|
||||
select "--- offset --" as "";
|
||||
--enable_query_log
|
||||
--exec $MYSQL_BINLOG --short-form --offset=2 --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001 master-bin.000002
|
||||
--disable_query_log
|
||||
select "--- start-position --" as "";
|
||||
--enable_query_log
|
||||
--exec $MYSQL_BINLOG --short-form --start-position=497 --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001 master-bin.000002
|
||||
--disable_query_log
|
||||
select "--- stop-position --" as "";
|
||||
--enable_query_log
|
||||
--exec $MYSQL_BINLOG --short-form --stop-position=32 --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001 master-bin.000002
|
||||
--disable_query_log
|
||||
select "--- start-datetime --" as "";
|
||||
--enable_query_log
|
||||
--exec $MYSQL_BINLOG --short-form "--start-datetime=20200121153224" --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001 master-bin.000002
|
||||
--disable_query_log
|
||||
select "--- stop-datetime --" as "";
|
||||
--enable_query_log
|
||||
--exec $MYSQL_BINLOG --short-form "--stop-datetime=2020/01/21 15@32@24" --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001 master-bin.000002
|
||||
|
||||
--disable_query_log
|
||||
select "--- to-last-log --" as "";
|
||||
--enable_query_log
|
||||
|
||||
--exec $MYSQL_BINLOG --short-form --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT --to-last-log master-bin.000001
|
||||
|
||||
# clean up
|
||||
--disable_query_log
|
||||
select "--- end of test --" as "";
|
||||
--enable_query_log
|
||||
drop table t1;
|
@ -29,7 +29,7 @@ col2 varchar(30) not null,
|
||||
col3 varchar (20) not null,
|
||||
col4 varchar(4) not null,
|
||||
col5 enum('PENDING', 'ACTIVE', 'DISABLED') not null,
|
||||
col6 int not null, to_be_deleted int);
|
||||
col6 int not null, to_be_deleted int) ENGINE=ndbcluster;
|
||||
insert into t1 values (2,4,3,5,"PENDING",1,7), (NULL,4,3,5,"PENDING",1,7), (25, 4,3,5,"PENDING",1,7), (NULL,4,3,5,"PENDING",1,7);
|
||||
select * from t1 order by col1;
|
||||
alter table t1
|
||||
|
44
mysql-test/t/ndb_limit.test
Normal file
44
mysql-test/t/ndb_limit.test
Normal file
@ -0,0 +1,44 @@
|
||||
-- source include/have_ndb.inc
|
||||
|
||||
--disable_warnings
|
||||
DROP TABLE IF EXISTS t2;
|
||||
--enable_warnings
|
||||
|
||||
|
||||
CREATE TABLE t2 (
|
||||
a bigint unsigned NOT NULL PRIMARY KEY,
|
||||
b int unsigned not null,
|
||||
c int unsigned
|
||||
) engine=ndbcluster;
|
||||
|
||||
|
||||
#
|
||||
# insert records into table
|
||||
#
|
||||
let $1=1000;
|
||||
disable_query_log;
|
||||
while ($1)
|
||||
{
|
||||
eval insert into t2 values($1*10, $1+9, 5*$1), ($1*10+1, $1+10, 7),($1*10+2, $1+10, 7*$1), ($1*10+3, $1+10, 10+$1), ($1*10+4, $1+10, 70*$1), ($1*10+5, $1+10, 7), ($1*10+6, $1+10, 9), ($1*10+7, $1+299, 899), ($1*10+8, $1+10, 12), ($1*10+9, $1+10, 14*$1);
|
||||
dec $1;
|
||||
}
|
||||
enable_query_log;
|
||||
|
||||
select count(*) from t2;
|
||||
|
||||
delete from t2 limit 1;
|
||||
select count(*) from t2;
|
||||
|
||||
delete from t2 limit 100;
|
||||
select count(*) from t2;
|
||||
|
||||
delete from t2 limit 1000;
|
||||
select count(*) from t2;
|
||||
|
||||
update t2 set c=12345678 limit 100;
|
||||
select count(*) from t2 where c=12345678;
|
||||
select count(*) from t2 where c=12345678 limit 1000;
|
||||
|
||||
select * from t2 limit 0;
|
||||
|
||||
drop table t2;
|
33
mysql-test/t/ndb_truncate.test
Normal file
33
mysql-test/t/ndb_truncate.test
Normal file
@ -0,0 +1,33 @@
|
||||
-- source include/have_ndb.inc
|
||||
|
||||
--disable_warnings
|
||||
DROP TABLE IF EXISTS t2;
|
||||
--enable_warnings
|
||||
|
||||
|
||||
CREATE TABLE t2 (
|
||||
a bigint unsigned NOT NULL PRIMARY KEY,
|
||||
b int unsigned not null,
|
||||
c int unsigned
|
||||
) engine=ndbcluster;
|
||||
|
||||
|
||||
#
|
||||
# insert records into table
|
||||
#
|
||||
let $1=500;
|
||||
disable_query_log;
|
||||
while ($1)
|
||||
{
|
||||
eval insert into t2 values($1*10, $1+9, 5*$1), ($1*10+1, $1+10, 7),($1*10+2, $1+10, 7*$1), ($1*10+3, $1+10, 10+$1), ($1*10+4, $1+10, 70*$1), ($1*10+5, $1+10, 7), ($1*10+6, $1+10, 9), ($1*10+7, $1+299, 899), ($1*10+8, $1+10, 12), ($1*10+9, $1+10, 14*$1);
|
||||
dec $1;
|
||||
}
|
||||
enable_query_log;
|
||||
|
||||
select count(*) from t2;
|
||||
|
||||
truncate table t2;
|
||||
|
||||
select count(*) from t2;
|
||||
|
||||
drop table t2;
|
@ -8,8 +8,7 @@
|
||||
# The slave is started with max_binlog_size=16384 bytes,
|
||||
# to force many rotations (approximately 30 rotations)
|
||||
|
||||
# If the master or slave does not support InnoDB, this test will pass
|
||||
|
||||
source include/have_innodb.inc;
|
||||
source include/master-slave.inc;
|
||||
connection slave;
|
||||
stop slave;
|
||||
|
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user