mirror of
https://github.com/MariaDB/server.git
synced 2025-07-02 14:22:51 +03:00
merge
This commit is contained in:
@ -21,8 +21,9 @@ benchdir_root= $(prefix)
|
||||
testdir = $(benchdir_root)/mysql-test
|
||||
EXTRA_SCRIPTS = mysql-test-run.sh install_test_db.sh
|
||||
EXTRA_DIST = $(EXTRA_SCRIPTS)
|
||||
test_SCRIPTS = mysql-test-run install_test_db
|
||||
CLEANFILES = $(test_SCRIPTS)
|
||||
test_SCRIPTS = mysql-test-run install_test_db
|
||||
test_DATA = std_data/client-key.pem std_data/client-cert.pem std_data/cacert.pem
|
||||
CLEANFILES = $(test_SCRIPTS) $(test_DATA)
|
||||
|
||||
dist-hook:
|
||||
mkdir -p $(distdir)/t $(distdir)/r $(distdir)/include \
|
||||
@ -32,6 +33,8 @@ dist-hook:
|
||||
$(INSTALL_DATA) $(srcdir)/r/*.result $(srcdir)/r/*.require $(distdir)/r
|
||||
$(INSTALL_DATA) $(srcdir)/std_data/*.dat $(srcdir)/std_data/*.000001 $(distdir)/std_data
|
||||
$(INSTALL_DATA) $(srcdir)/std_data/des_key_file $(distdir)/std_data
|
||||
$(INSTALL_DATA) $(srcdir)/std_data/*.pem $(distdir)/std_data
|
||||
|
||||
|
||||
install-data-local:
|
||||
$(mkinstalldirs) \
|
||||
@ -49,6 +52,11 @@ install-data-local:
|
||||
$(INSTALL_DATA) $(srcdir)/include/*.inc $(DESTDIR)$(testdir)/include
|
||||
$(INSTALL_DATA) $(srcdir)/std_data/*.dat $(DESTDIR)$(testdir)/std_data
|
||||
$(INSTALL_DATA) $(srcdir)/std_data/des_key_file $(DESTDIR)$(testdir)/std_data
|
||||
$(INSTALL_DATA) $(srcdir)/std_data/*.pem $(DESTDIR)$(testdir)/std_data
|
||||
|
||||
std_data/%.pem:
|
||||
@CP@ $(top_srcdir)/SSL/$(@F) $(srcdir)/std_data
|
||||
|
||||
|
||||
SUFFIXES = .sh
|
||||
|
||||
|
@ -30,6 +30,7 @@ show tables;
|
||||
Tables_in_test
|
||||
update mysql.user set password=old_password("gambling2") where user="test";
|
||||
flush privileges;
|
||||
set password=old_password('gambling3');
|
||||
show tables;
|
||||
Tables_in_mysql
|
||||
columns_priv
|
||||
|
@ -312,3 +312,52 @@ SET SESSION table_type=default;
|
||||
drop table t1;
|
||||
create table t1 select x'4132';
|
||||
drop table t1;
|
||||
create table t1(a int,b int,c int unsigned,d date,e char,f datetime,g time,h blob);
|
||||
insert into t1(a)values(1);
|
||||
insert into t1(a,b,c,d,e,f,g,h)
|
||||
values(2,-2,2,'1825-12-14','a','2003-1-1 3:2:1','4:3:2','binary data');
|
||||
select * from t1;
|
||||
a b c d e f g h
|
||||
1 NULL NULL NULL NULL NULL NULL NULL
|
||||
2 -2 2 1825-12-14 a 2003-01-01 03:02:01 04:03:02 binary data
|
||||
select a,
|
||||
ifnull(b,cast(-7 as signed)) as b,
|
||||
ifnull(c,cast(7 as unsigned)) as c,
|
||||
ifnull(d,cast('2000-01-01' as date)) as d,
|
||||
ifnull(e,cast('b' as char)) as e,
|
||||
ifnull(f,cast('2000-01-01' as datetime)) as f,
|
||||
ifnull(g,cast('5:4:3' as time)) as g,
|
||||
ifnull(h,cast('yet another binary data' as binary)) as h,
|
||||
addtime(cast('1:0:0' as time),cast('1:0:0' as time)) as dd
|
||||
from t1;
|
||||
a b c d e f g h dd
|
||||
1 -7 7 2000-01-01 b 2000-01-01 00:00:00 05:04:03 yet another binary data 02:00:00
|
||||
2 -2 2 1825-12-14 a 2003-01-01 03:02:01 04:03:02 binary data 02:00:00
|
||||
create table t2
|
||||
select
|
||||
a,
|
||||
ifnull(b,cast(-7 as signed)) as b,
|
||||
ifnull(c,cast(7 as unsigned)) as c,
|
||||
ifnull(d,cast('2000-01-01' as date)) as d,
|
||||
ifnull(e,cast('b' as char)) as e,
|
||||
ifnull(f,cast('2000-01-01' as datetime)) as f,
|
||||
ifnull(g,cast('5:4:3' as time)) as g,
|
||||
ifnull(h,cast('yet another binary data' as binary)) as h,
|
||||
addtime(cast('1:0:0' as time),cast('1:0:0' as time)) as dd
|
||||
from t1;
|
||||
explain t2;
|
||||
Field Type Null Key Default Extra
|
||||
a int(11) YES NULL
|
||||
b bigint(11) 0
|
||||
c bigint(10) 0
|
||||
d date 0000-00-00
|
||||
e char(1)
|
||||
f datetime 0000-00-00 00:00:00
|
||||
g time 00:00:00
|
||||
h mediumblob
|
||||
dd time 00:00:00
|
||||
select * from t2;
|
||||
a b c d e f g h dd
|
||||
1 -7 7 2000-01-01 b 2000-01-01 00:00:00 05:04:03 yet another binary data 02:00:00
|
||||
2 -2 2 1825-12-14 a 2003-01-01 03:02:01 04:03:02 binary data 02:00:00
|
||||
drop table t1, t2;
|
||||
|
@ -196,3 +196,11 @@ drop table t1,t2;
|
||||
SELECT a.x FROM (SELECT 1 AS x) AS a HAVING a.x = 1;
|
||||
x
|
||||
1
|
||||
create table a1 select 1 as a;
|
||||
select 2 as a from (select * from a1) b;
|
||||
ERROR 3D000: No Database Selected
|
||||
use test;
|
||||
select 2 as a from (select * from a1) b;
|
||||
a
|
||||
2
|
||||
drop table a1;
|
||||
|
@ -44,3 +44,13 @@ mysql
|
||||
test
|
||||
drop database mysqltest;
|
||||
ERROR HY000: Can't drop database 'mysqltest'; database doesn't exist
|
||||
drop table t1;
|
||||
flush tables with read lock;
|
||||
create table t1(n int);
|
||||
ERROR HY000: Can't execute the query because you have a conflicting read lock
|
||||
unlock tables;
|
||||
create table t1(n int);
|
||||
show tables;
|
||||
Tables_in_test
|
||||
t1
|
||||
drop table t1;
|
||||
|
@ -1,15 +1,79 @@
|
||||
select length(encrypt('foo', 'ff')) <> 0;
|
||||
length(encrypt('foo', 'ff')) <> 0
|
||||
1
|
||||
select password("a",""), password("a",NULL), password("","a"), password(NULL,"a");
|
||||
password("a","") password("a",NULL) password("","a") password(NULL,"a")
|
||||
*2517f7235d68d4ba2e5019c93420523101157a792c01 NULL NULL
|
||||
select password("aaaaaaaaaaaaaaaa","a"), password("a","aaaaaaaaaaaaaaaa");
|
||||
password("aaaaaaaaaaaaaaaa","a") password("a","aaaaaaaaaaaaaaaa")
|
||||
*2cd3b9a44e9a9994789a30f935c92f45a96c5472f381 *37c7c5c794ff144819f2531bf03c57772cd84e40db09
|
||||
select old_password('test'), length(password("1")), length(encrypt('test')), encrypt('test','aa');
|
||||
old_password('test') length(password("1")) length(encrypt('test')) encrypt('test','aa')
|
||||
378b243e220ca493 45 13 aaqPiZY5xR5l.
|
||||
select old_password(""), old_password(NULL), password(""), password(NULL);
|
||||
old_password("") old_password(NULL) password("") password(NULL)
|
||||
NULL NULL
|
||||
select password('abc');
|
||||
password('abc')
|
||||
*0D3CED9BEC10A777AEC23CCC353A8C08A633045E
|
||||
select password('');
|
||||
password('')
|
||||
|
||||
select old_password('abc');
|
||||
old_password('abc')
|
||||
7cd2b5942be28759
|
||||
select old_password('');
|
||||
old_password('')
|
||||
|
||||
select password('gabbagabbahey');
|
||||
password('gabbagabbahey')
|
||||
*B0F99D2963660DD7E16B751EC9EE2F17B6A68FA6
|
||||
select old_password('idkfa');
|
||||
old_password('idkfa')
|
||||
5c078dc54ca0fcca
|
||||
select length(password('1'));
|
||||
length(password('1'))
|
||||
41
|
||||
select length(encrypt('test'));
|
||||
length(encrypt('test'))
|
||||
13
|
||||
select encrypt('test','aa');
|
||||
encrypt('test','aa')
|
||||
aaqPiZY5xR5l.
|
||||
select old_password(NULL);
|
||||
old_password(NULL)
|
||||
NULL
|
||||
select password(NULL);
|
||||
password(NULL)
|
||||
NULL
|
||||
set global old_passwords=on;
|
||||
select password('');
|
||||
password('')
|
||||
|
||||
select old_password('');
|
||||
old_password('')
|
||||
|
||||
select password('idkfa');
|
||||
password('idkfa')
|
||||
*B669C9DAC3AA6F2254B03CDEF8DFDD6B2D1054BA
|
||||
select old_password('idkfa');
|
||||
old_password('idkfa')
|
||||
5c078dc54ca0fcca
|
||||
set old_passwords=on;
|
||||
select password('idkfa');
|
||||
password('idkfa')
|
||||
5c078dc54ca0fcca
|
||||
select old_password('idkfa');
|
||||
old_password('idkfa')
|
||||
5c078dc54ca0fcca
|
||||
set global old_passwords=off;
|
||||
select password('idkfa');
|
||||
password('idkfa')
|
||||
5c078dc54ca0fcca
|
||||
select old_password('idkfa');
|
||||
old_password('idkfa')
|
||||
5c078dc54ca0fcca
|
||||
set old_passwords=off;
|
||||
select password('idkfa ');
|
||||
password('idkfa ')
|
||||
*2DC31D90647B4C1ABC9231563D2236E96C9A2DB2
|
||||
select password('idkfa');
|
||||
password('idkfa')
|
||||
*B669C9DAC3AA6F2254B03CDEF8DFDD6B2D1054BA
|
||||
select password(' idkfa');
|
||||
password(' idkfa')
|
||||
*12B099E56BB7FE8D43C78FD834A9D1D11178D045
|
||||
select old_password('idkfa');
|
||||
old_password('idkfa')
|
||||
5c078dc54ca0fcca
|
||||
select old_password(' i d k f a ');
|
||||
old_password(' i d k f a ')
|
||||
5c078dc54ca0fcca
|
||||
|
@ -167,6 +167,11 @@ t2.URL_ID = t1.URL_ID group by REQ_ID;
|
||||
REQ_ID URL
|
||||
1 X
|
||||
5 X,X,X
|
||||
select REQ_ID, Group_Concat(URL) as URL, Min(t1.URL_ID) urll,
|
||||
Max(t1.URL_ID)
|
||||
urlg from t1, t2 where t2.URL_ID = t1.URL_ID group by REQ_ID;
|
||||
REQ_ID URL urll urlg
|
||||
1 X 4 4
|
||||
5 X,X,X 4 5
|
||||
drop table t1;
|
||||
drop table t2;
|
||||
@ -178,3 +183,16 @@ select distinct ifnull(group_concat(concat(t1.id, ':', t1.name)), 'shortname') a
|
||||
select distinct ifnull(group_concat(concat(t1.id, ':', t1.name)), 'shortname') as 'with distinct: cutoff at length of shortname' from t1;
|
||||
with distinct: cutoff at length of shortname
|
||||
1:longername,1:evenlongername
|
||||
drop table t1;
|
||||
create table t1(id int);
|
||||
create table t2(id int);
|
||||
insert into t1 values(0),(1);
|
||||
select group_concat(t1.id) FROM t1,t2;
|
||||
group_concat(t1.id)
|
||||
NULL
|
||||
drop table t1;
|
||||
drop table t2;
|
||||
create table t1 (bar varchar(32));
|
||||
insert into t1 values('test'),('test2');
|
||||
select * from t1 having group_concat(bar)='';
|
||||
bar
|
||||
|
@ -251,6 +251,18 @@ n
|
||||
6
|
||||
rollback;
|
||||
drop table t1;
|
||||
create table t1 (n int not null primary key) type=innodb;
|
||||
start transaction;
|
||||
insert into t1 values (4);
|
||||
flush tables with read lock;
|
||||
commit;
|
||||
ERROR HY000: Can't execute the query because you have a conflicting read lock
|
||||
unlock tables;
|
||||
commit;
|
||||
select * from t1;
|
||||
n
|
||||
4
|
||||
drop table t1;
|
||||
create table t1 ( id int NOT NULL PRIMARY KEY, nom varchar(64)) type=innodb;
|
||||
begin;
|
||||
insert into t1 values(1,'hamdouni');
|
||||
@ -1342,3 +1354,40 @@ id label
|
||||
3524 Societe Test
|
||||
3525 Fournisseur Test
|
||||
drop table t1,t2;
|
||||
create table t1 (c1 char(5) unique not null, c2 int, stamp timestamp) type=innodb;
|
||||
select * from t1;
|
||||
c1 c2 stamp
|
||||
replace delayed into t1 (c1, c2) values ( "text1","11"),( "text2","12");
|
||||
ERROR HY000: Table storage engine for 't1' doesn't have this option
|
||||
select * from t1;
|
||||
c1 c2 stamp
|
||||
replace delayed into t1 (c1, c2) values ( "text1","12"),( "text2","13"),( "text3","14", "a" ),( "text4","15", "b" );
|
||||
ERROR HY000: Table storage engine for 't1' doesn't have this option
|
||||
select * from t1;
|
||||
c1 c2 stamp
|
||||
drop table t1;
|
||||
create table t1 (a int, b varchar(200), c text not null) checksum=1 type=myisam;
|
||||
create table t2 (a int, b varchar(200), c text not null) checksum=0 type=innodb;
|
||||
create table t3 (a int, b varchar(200), c text not null) checksum=1 type=innodb;
|
||||
insert t1 values (1, "aaa", "bbb"), (NULL, "", "ccccc"), (0, NULL, "");
|
||||
insert t2 select * from t1;
|
||||
insert t3 select * from t1;
|
||||
checksum table t1, t2, t3, t4 quick;
|
||||
Table Checksum
|
||||
test.t1 968604391
|
||||
test.t2 NULL
|
||||
test.t3 NULL
|
||||
test.t4 NULL
|
||||
checksum table t1, t2, t3, t4;
|
||||
Table Checksum
|
||||
test.t1 968604391
|
||||
test.t2 968604391
|
||||
test.t3 968604391
|
||||
test.t4 NULL
|
||||
checksum table t1, t2, t3, t4 extended;
|
||||
Table Checksum
|
||||
test.t1 968604391
|
||||
test.t2 968604391
|
||||
test.t3 968604391
|
||||
test.t4 NULL
|
||||
drop table t1,t2,t3;
|
||||
|
@ -1,13 +1,5 @@
|
||||
drop table if exists t1,t2;
|
||||
create table t1 (a tinyint not null auto_increment, b blob not null, primary key (a)) type=isam;
|
||||
Warnings:
|
||||
Warning 1263 Data truncated for column 'b' at row 1
|
||||
Warnings:
|
||||
Warning 1263 Data truncated for column 'b' at row 1
|
||||
Warnings:
|
||||
Warning 1263 Data truncated for column 'b' at row 1
|
||||
Warnings:
|
||||
Warning 1263 Data truncated for column 'b' at row 1
|
||||
delete from t1 where (a & 1);
|
||||
select sum(length(b)) from t1;
|
||||
sum(length(b))
|
||||
|
@ -367,6 +367,23 @@ id select_type table type possible_keys key key_len ref rows Extra
|
||||
drop table t1,t2;
|
||||
CREATE TABLE t1 (`a` int(11) NOT NULL default '0', `b` int(11) NOT NULL default '0', UNIQUE KEY `a` USING RTREE (`a`,`b`)) TYPE=MyISAM;
|
||||
ERROR 42000: This version of MySQL doesn't yet support 'RTREE INDEX'
|
||||
DROP TABLE IF EXISTS t1;
|
||||
Warnings:
|
||||
Note 1051 Unknown table 't1'
|
||||
create table t1 (a int, b varchar(200), c text not null) checksum=1;
|
||||
create table t2 (a int, b varchar(200), c text not null) checksum=0;
|
||||
insert t1 values (1, "aaa", "bbb"), (NULL, "", "ccccc"), (0, NULL, "");
|
||||
insert t2 select * from t1;
|
||||
checksum table t1, t2, t3 quick;
|
||||
Table Checksum
|
||||
test.t1 968604391
|
||||
test.t2 NULL
|
||||
test.t3 NULL
|
||||
checksum table t1, t2, t3;
|
||||
Table Checksum
|
||||
test.t1 968604391
|
||||
test.t2 968604391
|
||||
test.t3 NULL
|
||||
checksum table t1, t2, t3 extended;
|
||||
Table Checksum
|
||||
test.t1 968604391
|
||||
test.t2 968604391
|
||||
test.t3 NULL
|
||||
drop table t1,t2;
|
||||
|
@ -254,3 +254,18 @@ ERROR 42000: This version of MySQL doesn't yet support 'CUBE'
|
||||
select product, country_id , year, sum(profit) from t1 group by product, country_id, year with cube union all select product, country_id , year, sum(profit) from t1 group by product, country_id, year with rollup;
|
||||
ERROR 42000: This version of MySQL doesn't yet support 'CUBE'
|
||||
drop table t1,t2;
|
||||
CREATE TABLE t1 (i int);
|
||||
INSERT INTO t1 VALUES(100);
|
||||
CREATE TABLE t2 (i int);
|
||||
INSERT INTO t2 VALUES (100),(200);
|
||||
SELECT i, COUNT(*) FROM t1 GROUP BY i WITH ROLLUP;
|
||||
i COUNT(*)
|
||||
100 1
|
||||
NULL 1
|
||||
SELECT t1.i, t2.i, COUNT(*) FROM t1,t2 GROUP BY t1.i,t2.i WITH ROLLUP;
|
||||
i i COUNT(*)
|
||||
100 100 1
|
||||
100 200 1
|
||||
100 NULL 2
|
||||
NULL NULL 2
|
||||
drop table t1,t2;
|
||||
|
@ -4,20 +4,20 @@ File Position Binlog_do_db Binlog_ignore_db
|
||||
master-bin.000001 79
|
||||
reset slave;
|
||||
show slave status;
|
||||
Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space
|
||||
Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key
|
||||
change master to master_host='127.0.0.1';
|
||||
show slave status;
|
||||
Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space
|
||||
127.0.0.1 test MASTER_PORT 7 4 slave-relay-bin.000001 4 No No 0 0 0 4
|
||||
Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key
|
||||
127.0.0.1 test MASTER_PORT 7 4 slave-relay-bin.000001 4 No No 0 0 0 4 No
|
||||
change master to master_host='127.0.0.1',master_user='root',
|
||||
master_password='',master_port=MASTER_PORT;
|
||||
show slave status;
|
||||
Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space
|
||||
127.0.0.1 root MASTER_PORT 7 4 slave-relay-bin.000001 4 No No 0 0 0 4
|
||||
Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key
|
||||
127.0.0.1 root MASTER_PORT 7 4 slave-relay-bin.000001 4 No No 0 0 0 4 No
|
||||
start slave;
|
||||
show slave status;
|
||||
Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space
|
||||
127.0.0.1 root MASTER_PORT 7 master-bin.000001 79 slave-relay-bin.000001 123 master-bin.000001 Yes Yes 0 0 79 123
|
||||
Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key
|
||||
127.0.0.1 root MASTER_PORT 7 master-bin.000001 79 slave-relay-bin.000001 123 master-bin.000001 Yes Yes 0 0 79 123 No
|
||||
drop table if exists t1;
|
||||
create table t1 (n int);
|
||||
insert into t1 values (10),(45),(90);
|
||||
|
@ -5,7 +5,7 @@ reset slave;
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
start slave;
|
||||
show slave status;
|
||||
Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space
|
||||
Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key
|
||||
load table t1 from master;
|
||||
ERROR 08S01: Error connecting to master: Master is not configured
|
||||
load table t1 from master;
|
||||
|
@ -8,8 +8,8 @@ create table t1 (a int primary key);
|
||||
insert into t1 values (1),(1);
|
||||
ERROR 23000: Duplicate entry '1' for key 1
|
||||
show slave status;
|
||||
Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space
|
||||
127.0.0.1 root MASTER_PORT 1 master-bin.000001 213 slave-relay-bin.000002 257 master-bin.000001 Yes Yes test.t1 0 0 213 257
|
||||
Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key
|
||||
127.0.0.1 root MASTER_PORT 1 master-bin.000001 213 slave-relay-bin.000002 257 master-bin.000001 Yes Yes test.t1 0 0 213 257 No
|
||||
show tables like 't1';
|
||||
Tables_in_test (t1)
|
||||
drop table t1;
|
||||
|
@ -13,5 +13,5 @@ master_password='',master_port=SLAVE_PORT;
|
||||
start slave;
|
||||
flush logs;
|
||||
show slave status;
|
||||
Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space
|
||||
127.0.0.1 root SLAVE_PORT 60 slave-bin.000001 79 relay-log.000002 4 slave-bin.000001 Yes Yes 0 0 79 4
|
||||
Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key
|
||||
127.0.0.1 root SLAVE_PORT 60 slave-bin.000001 79 relay-log.000002 4 slave-bin.000001 Yes Yes 0 0 79 4 No
|
||||
|
@ -28,8 +28,8 @@ load data infile '../../std_data/rpl_loaddata.dat' into table t1;
|
||||
set global sql_slave_skip_counter=1;
|
||||
start slave;
|
||||
show slave status;
|
||||
Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space
|
||||
127.0.0.1 root MASTER_PORT 1 master-bin.000001 1311 slave-relay-bin.000002 1355 master-bin.000001 Yes Yes 0 0 1311 1355
|
||||
Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key
|
||||
127.0.0.1 root MASTER_PORT 1 master-bin.000001 1311 slave-relay-bin.000002 1355 master-bin.000001 Yes Yes 0 0 1311 1355 No
|
||||
set sql_log_bin=0;
|
||||
delete from t1;
|
||||
set sql_log_bin=1;
|
||||
@ -38,8 +38,8 @@ stop slave;
|
||||
change master to master_user='test';
|
||||
change master to master_user='root';
|
||||
show slave status;
|
||||
Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space
|
||||
127.0.0.1 root MASTER_PORT 1 master-bin.000001 1442 slave-relay-bin.000001 4 master-bin.000001 No No 0 0 1442 4
|
||||
Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key
|
||||
127.0.0.1 root MASTER_PORT 1 master-bin.000001 1442 slave-relay-bin.000001 4 master-bin.000001 No No 0 0 1442 4 No
|
||||
set global sql_slave_skip_counter=1;
|
||||
start slave;
|
||||
set sql_log_bin=0;
|
||||
@ -49,5 +49,5 @@ load data infile '../../std_data/rpl_loaddata.dat' into table t1;
|
||||
stop slave;
|
||||
reset slave;
|
||||
show slave status;
|
||||
Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space
|
||||
127.0.0.1 root MASTER_PORT 1 4 slave-relay-bin.000001 4 No No 0 0 0 4
|
||||
Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key
|
||||
127.0.0.1 root MASTER_PORT 1 4 slave-relay-bin.000001 4 No No 0 0 0 4 No
|
||||
|
@ -92,7 +92,7 @@ slave-bin.000002 4 Query 1 110 use `test`; create table t1 (n int)
|
||||
slave-bin.000002 62 Query 1 168 use `test`; insert into t1 values (1)
|
||||
slave-bin.000002 122 Query 1 228 use `test`; drop table t1
|
||||
show slave status;
|
||||
Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space
|
||||
127.0.0.1 root MASTER_PORT 1 master-bin.000002 276 slave-relay-bin.000003 214 master-bin.000002 Yes Yes 0 0 276 214
|
||||
Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key
|
||||
127.0.0.1 root MASTER_PORT 1 master-bin.000002 276 slave-relay-bin.000003 214 master-bin.000002 Yes Yes 0 0 276 214 No
|
||||
show binlog events in 'slave-bin.000005' from 4;
|
||||
ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Could not find target log
|
||||
|
@ -8,26 +8,26 @@ show master status;
|
||||
File Position Binlog_do_db Binlog_ignore_db
|
||||
master-bin.000001 79
|
||||
show slave status;
|
||||
Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space
|
||||
127.0.0.1 root MASTER_PORT 1 master-bin.000001 79 slave-relay-bin.000002 123 master-bin.000001 Yes Yes 0 0 79 123
|
||||
Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key
|
||||
127.0.0.1 root MASTER_PORT 1 master-bin.000001 79 slave-relay-bin.000002 123 master-bin.000001 Yes Yes 0 0 79 123 No
|
||||
stop slave;
|
||||
change master to master_log_pos=73;
|
||||
start slave;
|
||||
stop slave;
|
||||
change master to master_log_pos=73;
|
||||
show slave status;
|
||||
Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space
|
||||
127.0.0.1 root MASTER_PORT 1 master-bin.000001 73 slave-relay-bin.000001 4 master-bin.000001 No No 0 0 73 4
|
||||
Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key
|
||||
127.0.0.1 root MASTER_PORT 1 master-bin.000001 73 slave-relay-bin.000001 4 master-bin.000001 No No 0 0 73 4 No
|
||||
start slave;
|
||||
show slave status;
|
||||
Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space
|
||||
127.0.0.1 root MASTER_PORT 1 master-bin.000001 73 slave-relay-bin.000001 48 master-bin.000001 No Yes 0 0 73 48
|
||||
Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key
|
||||
127.0.0.1 root MASTER_PORT 1 master-bin.000001 73 slave-relay-bin.000001 48 master-bin.000001 No Yes 0 0 73 48 No
|
||||
stop slave;
|
||||
change master to master_log_pos=173;
|
||||
start slave;
|
||||
show slave status;
|
||||
Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space
|
||||
127.0.0.1 root MASTER_PORT 1 master-bin.000001 173 slave-relay-bin.000001 4 master-bin.000001 No Yes 0 0 173 4
|
||||
Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key
|
||||
127.0.0.1 root MASTER_PORT 1 master-bin.000001 173 slave-relay-bin.000001 4 master-bin.000001 No Yes 0 0 173 4 No
|
||||
show master status;
|
||||
File Position Binlog_do_db Binlog_ignore_db
|
||||
master-bin.000001 79
|
||||
|
@ -15,8 +15,8 @@ select @@global.max_relay_log_size;
|
||||
4096
|
||||
start slave;
|
||||
show slave status;
|
||||
Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space
|
||||
127.0.0.1 root MASTER_PORT 1 master-bin.000001 50477 slave-relay-bin.000014 1221 master-bin.000001 Yes Yes 0 0 50477 1221
|
||||
Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key
|
||||
127.0.0.1 root MASTER_PORT 1 master-bin.000001 50477 slave-relay-bin.000014 1221 master-bin.000001 Yes Yes 0 0 50477 1221 No
|
||||
stop slave;
|
||||
reset slave;
|
||||
set global max_relay_log_size=(5*4096);
|
||||
@ -25,8 +25,8 @@ select @@global.max_relay_log_size;
|
||||
20480
|
||||
start slave;
|
||||
show slave status;
|
||||
Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space
|
||||
127.0.0.1 root MASTER_PORT 1 master-bin.000001 50477 slave-relay-bin.000004 9457 master-bin.000001 Yes Yes 0 0 50477 9457
|
||||
Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key
|
||||
127.0.0.1 root MASTER_PORT 1 master-bin.000001 50477 slave-relay-bin.000004 9457 master-bin.000001 Yes Yes 0 0 50477 9457 No
|
||||
stop slave;
|
||||
reset slave;
|
||||
set global max_relay_log_size=0;
|
||||
@ -35,26 +35,26 @@ select @@global.max_relay_log_size;
|
||||
0
|
||||
start slave;
|
||||
show slave status;
|
||||
Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space
|
||||
127.0.0.1 root MASTER_PORT 1 master-bin.000001 50477 slave-relay-bin.000008 1283 master-bin.000001 Yes Yes 0 0 50477 1283
|
||||
Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key
|
||||
127.0.0.1 root MASTER_PORT 1 master-bin.000001 50477 slave-relay-bin.000008 1283 master-bin.000001 Yes Yes 0 0 50477 1283 No
|
||||
stop slave;
|
||||
reset slave;
|
||||
flush logs;
|
||||
show slave status;
|
||||
Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space
|
||||
127.0.0.1 root MASTER_PORT 1 4 slave-relay-bin.000001 4 No No 0 0 0 4
|
||||
Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key
|
||||
127.0.0.1 root MASTER_PORT 1 4 slave-relay-bin.000001 4 No No 0 0 0 4 No
|
||||
reset slave;
|
||||
start slave;
|
||||
flush logs;
|
||||
create table t1 (a int);
|
||||
show slave status;
|
||||
Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space
|
||||
127.0.0.1 root MASTER_PORT 1 master-bin.000001 50535 slave-relay-bin.000009 62 master-bin.000001 Yes Yes 0 0 50535 62
|
||||
Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key
|
||||
127.0.0.1 root MASTER_PORT 1 master-bin.000001 50535 slave-relay-bin.000009 62 master-bin.000001 Yes Yes 0 0 50535 62 No
|
||||
flush logs;
|
||||
drop table t1;
|
||||
show slave status;
|
||||
Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space
|
||||
127.0.0.1 root MASTER_PORT 1 master-bin.000001 50583 slave-relay-bin.000010 52 master-bin.000001 Yes Yes 0 0 50583 52
|
||||
Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key
|
||||
127.0.0.1 root MASTER_PORT 1 master-bin.000001 50583 slave-relay-bin.000010 52 master-bin.000001 Yes Yes 0 0 50583 52 No
|
||||
flush logs;
|
||||
show master status;
|
||||
File Position Binlog_do_db Binlog_ignore_db
|
||||
|
30
mysql-test/r/rpl_openssl.result
Normal file
30
mysql-test/r/rpl_openssl.result
Normal file
@ -0,0 +1,30 @@
|
||||
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;
|
||||
grant replication slave on *.* to replssl@'%' require ssl;
|
||||
create table t1 (t int);
|
||||
stop slave;
|
||||
change master to master_user='replssl',master_password='';
|
||||
start slave;
|
||||
insert into t1 values (1);
|
||||
select * from t1;
|
||||
t
|
||||
stop slave;
|
||||
change master to master_ssl=1 , master_ssl_ca ='MYSQL_TEST_DIR/std_data/cacert.pem', master_ssl_cert='MYSQL_TEST_DIR/std_data/client-cert.pem', master_ssl_key='MYSQL_TEST_DIR/std_data/client-key.pem';
|
||||
start slave;
|
||||
select * from t1;
|
||||
t
|
||||
1
|
||||
show slave status;
|
||||
Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key
|
||||
127.0.0.1 replssl MASTER_MYPORT 1 master-bin.000001 289 slave-relay-bin.000001 108 master-bin.000001 Yes Yes 0 0 289 108 Yes MYSQL_TEST_DIR/std_data/cacert.pem MYSQL_TEST_DIR/std_data/client-cert.pem MYSQL_TEST_DIR/std_data/client-key.pem
|
||||
stop slave;
|
||||
change master to master_user='root',master_password='', master_ssl=0;
|
||||
start slave;
|
||||
drop table t1;
|
||||
show slave status;
|
||||
Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key
|
||||
127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 337 slave-relay-bin.000001 96 master-bin.000001 Yes Yes 0 0 337 96 No MYSQL_TEST_DIR/std_data/cacert.pem MYSQL_TEST_DIR/std_data/client-cert.pem MYSQL_TEST_DIR/std_data/client-key.pem
|
@ -5,7 +5,7 @@ reset slave;
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
start slave;
|
||||
SHOW SLAVE STATUS;
|
||||
Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space
|
||||
Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key
|
||||
SHOW SLAVE HOSTS;
|
||||
Server_id Host Port Rpl_recovery_rank Master_id
|
||||
2 127.0.0.1 SLAVE_PORT 2 1
|
||||
|
@ -27,5 +27,5 @@ select * from t11;
|
||||
ERROR 42S02: Table 'test.t11' doesn't exist
|
||||
drop table if exists t1,t2,t11;
|
||||
show slave status;
|
||||
Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space
|
||||
127.0.0.1 root MASTER_PORT 1 master-bin.000001 1281 slave-relay-bin.000002 1325 master-bin.000001 Yes Yes test.t1 0 0 1281 1325
|
||||
Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key
|
||||
127.0.0.1 root MASTER_PORT 1 master-bin.000001 1281 slave-relay-bin.000002 1325 master-bin.000001 Yes Yes test.t1 0 0 1281 1325 No
|
||||
|
@ -5,18 +5,18 @@ reset slave;
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
start slave;
|
||||
show slave status;
|
||||
Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space
|
||||
127.0.0.1 root MASTER_PORT 1 master-bin.000001 79 slave-relay-bin.000002 123 master-bin.000001 Yes Yes 0 0 79 123
|
||||
Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key
|
||||
127.0.0.1 root MASTER_PORT 1 master-bin.000001 79 slave-relay-bin.000002 123 master-bin.000001 Yes Yes 0 0 79 123 No
|
||||
stop slave;
|
||||
change master to master_user='test';
|
||||
show slave status;
|
||||
Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space
|
||||
127.0.0.1 test MASTER_PORT 1 master-bin.000001 79 slave-relay-bin.000001 4 master-bin.000001 No No 0 0 79 4
|
||||
Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key
|
||||
127.0.0.1 test MASTER_PORT 1 master-bin.000001 79 slave-relay-bin.000001 4 master-bin.000001 No No 0 0 79 4 No
|
||||
reset slave;
|
||||
show slave status;
|
||||
Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space
|
||||
127.0.0.1 root MASTER_PORT 1 4 slave-relay-bin.000001 4 No No 0 0 0 4
|
||||
Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key
|
||||
127.0.0.1 root MASTER_PORT 1 4 slave-relay-bin.000001 4 No No 0 0 0 4 No
|
||||
start slave;
|
||||
show slave status;
|
||||
Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space
|
||||
127.0.0.1 root MASTER_PORT 1 master-bin.000001 79 slave-relay-bin.000002 123 master-bin.000001 Yes Yes 0 0 79 123
|
||||
Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key
|
||||
127.0.0.1 root MASTER_PORT 1 master-bin.000001 79 slave-relay-bin.000002 123 master-bin.000001 Yes Yes 0 0 79 123 No
|
||||
|
@ -15,8 +15,8 @@ insert into temp_table values ("testing temporary tables");
|
||||
create table t1 (s text);
|
||||
insert into t1 values('Could not break slave'),('Tried hard');
|
||||
show slave status;
|
||||
Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space
|
||||
127.0.0.1 root MASTER_PORT 60 master-bin.000001 417 slave-relay-bin.000001 461 master-bin.000001 Yes Yes 0 0 417 461
|
||||
Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key
|
||||
127.0.0.1 root MASTER_PORT 60 master-bin.000001 417 slave-relay-bin.000001 461 master-bin.000001 Yes Yes 0 0 417 461 No
|
||||
select * from t1;
|
||||
s
|
||||
Could not break slave
|
||||
@ -56,8 +56,8 @@ Log_name
|
||||
master-bin.000003
|
||||
insert into t2 values (65);
|
||||
show slave status;
|
||||
Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space
|
||||
127.0.0.1 root MASTER_PORT 60 master-bin.000003 290 slave-relay-bin.000001 1088 master-bin.000003 Yes Yes 0 0 290 1088
|
||||
Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key
|
||||
127.0.0.1 root MASTER_PORT 60 master-bin.000003 290 slave-relay-bin.000001 1088 master-bin.000003 Yes Yes 0 0 290 1088 No
|
||||
select * from t2;
|
||||
m
|
||||
34
|
||||
@ -80,8 +80,8 @@ select * from t4;
|
||||
a
|
||||
testing temporary tables part 2
|
||||
show slave status;
|
||||
Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space
|
||||
127.0.0.1 root MASTER_PORT 60 master-bin.000004 2886 slave-relay-bin.000001 7891 master-bin.000004 Yes Yes 0 0 2886 7891
|
||||
Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key
|
||||
127.0.0.1 root MASTER_PORT 60 master-bin.000004 2886 slave-relay-bin.000001 7891 master-bin.000004 Yes Yes 0 0 2886 7891 No
|
||||
lock tables t3 read;
|
||||
select count(*) from t3 where n >= 4;
|
||||
count(*)
|
||||
|
@ -43,7 +43,7 @@ wait_timeout 28800
|
||||
show variables like "this_doesn't_exists%";
|
||||
Variable_name Value
|
||||
show table status from test like "this_doesn't_exists%";
|
||||
Name Type Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Charset Create_options Comment
|
||||
Name Type Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Charset Checksum Create_options Comment
|
||||
show databases;
|
||||
Database
|
||||
mysql
|
||||
|
@ -1355,3 +1355,34 @@ a
|
||||
2
|
||||
10
|
||||
drop table t1,t2;
|
||||
CREATE TABLE t1 (s1 CHAR(5) COLLATE latin1_german1_ci,
|
||||
s2 CHAR(5) COLLATE latin1_swedish_ci);
|
||||
INSERT INTO t1 VALUES ('z','?');
|
||||
select * from t1 where s1 > (select max(s2) from t1);
|
||||
ERROR HY000: Illegal mix of collations (latin1_german1_ci,IMPLICIT) and (latin1_swedish_ci,IMPLICIT) for operation '>'
|
||||
select * from t1 where s1 > any (select max(s2) from t1);
|
||||
ERROR HY000: Illegal mix of collations (latin1_german1_ci,IMPLICIT) and (latin1_swedish_ci,IMPLICIT) for operation '>'
|
||||
drop table t1;
|
||||
create table t1(toid int,rd int);
|
||||
create table t2(userid int,pmnew int,pmtotal int);
|
||||
insert into t2 values(1,0,0),(2,0,0);
|
||||
insert into t1 values(1,0),(1,0),(1,0),(1,12),(1,15),(1,123),(1,12312),(1,12312),(1,123),(2,0),(2,0),(2,1),(2,2);
|
||||
select userid,pmtotal,pmnew, (select count(rd) from t1 where toid=t2.userid) calc_total, (select count(rd) from t1 where rd=0 and toid=t2.userid) calc_new from t2 where userid in (select distinct toid from t1);
|
||||
userid pmtotal pmnew calc_total calc_new
|
||||
1 0 0 9 3
|
||||
2 0 0 4 2
|
||||
drop table t1, t2;
|
||||
create table t1 (s1 char(5));
|
||||
select (select 'a','b' from t1 union select 'a','b' from t1) from t1;
|
||||
ERROR 21000: Cardinality error (more/less than 1 columns)
|
||||
insert into t1 values ('tttt');
|
||||
select * from t1 where ('a','b')=(select 'a','b' from t1 union select 'a','b' from t1);
|
||||
s1
|
||||
tttt
|
||||
explain (select * from t1);
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 system NULL NULL NULL NULL 1
|
||||
(select * from t1);
|
||||
s1
|
||||
tttt
|
||||
drop table t1;
|
||||
|
@ -46,8 +46,6 @@ alter table t8 rename t7;
|
||||
rename table t7 to t9;
|
||||
drop table t1;
|
||||
Got one of the listed errors
|
||||
Warnings:
|
||||
Note 1008 Can't drop database 'test_mysqltest'; database doesn't exist
|
||||
Got one of the listed errors
|
||||
Got one of the listed errors
|
||||
Got one of the listed errors
|
||||
|
@ -103,7 +103,7 @@ a b
|
||||
2 b
|
||||
select found_rows();
|
||||
found_rows()
|
||||
6
|
||||
8
|
||||
explain select a,b from t1 union all select a,b from t2;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 PRIMARY t1 ALL NULL NULL NULL NULL 4
|
||||
|
@ -48,8 +48,9 @@ flush privileges;
|
||||
#connect (con1,localhost,test,gambling2,"");
|
||||
#show tables;
|
||||
connect (con1,localhost,test,gambling2,mysql);
|
||||
set password=old_password('gambling3');
|
||||
show tables;
|
||||
connect (con1,localhost,test,gambling2,test);
|
||||
connect (con1,localhost,test,gambling3,test);
|
||||
show tables;
|
||||
|
||||
# Re enable this one day if error handling on connect will take place
|
||||
@ -63,7 +64,9 @@ show tables;
|
||||
#connect (con1,localhost,test,zorro,);
|
||||
#--error 1045
|
||||
|
||||
|
||||
# remove user 'test' so that other tests which may use 'test'
|
||||
# do not depend on this test.
|
||||
|
||||
delete from mysql.user where user="test";
|
||||
flush privileges;
|
||||
|
@ -219,6 +219,44 @@ drop table t1;
|
||||
#
|
||||
# Bug # 801
|
||||
#
|
||||
|
||||
create table t1 select x'4132';
|
||||
drop table t1;
|
||||
|
||||
#
|
||||
# Test types of data for create select with functions
|
||||
#
|
||||
|
||||
create table t1(a int,b int,c int unsigned,d date,e char,f datetime,g time,h blob);
|
||||
insert into t1(a)values(1);
|
||||
insert into t1(a,b,c,d,e,f,g,h)
|
||||
values(2,-2,2,'1825-12-14','a','2003-1-1 3:2:1','4:3:2','binary data');
|
||||
select * from t1;
|
||||
select a,
|
||||
ifnull(b,cast(-7 as signed)) as b,
|
||||
ifnull(c,cast(7 as unsigned)) as c,
|
||||
ifnull(d,cast('2000-01-01' as date)) as d,
|
||||
ifnull(e,cast('b' as char)) as e,
|
||||
ifnull(f,cast('2000-01-01' as datetime)) as f,
|
||||
ifnull(g,cast('5:4:3' as time)) as g,
|
||||
ifnull(h,cast('yet another binary data' as binary)) as h,
|
||||
addtime(cast('1:0:0' as time),cast('1:0:0' as time)) as dd
|
||||
from t1;
|
||||
|
||||
create table t2
|
||||
select
|
||||
a,
|
||||
ifnull(b,cast(-7 as signed)) as b,
|
||||
ifnull(c,cast(7 as unsigned)) as c,
|
||||
ifnull(d,cast('2000-01-01' as date)) as d,
|
||||
ifnull(e,cast('b' as char)) as e,
|
||||
ifnull(f,cast('2000-01-01' as datetime)) as f,
|
||||
ifnull(g,cast('5:4:3' as time)) as g,
|
||||
ifnull(h,cast('yet another binary data' as binary)) as h,
|
||||
addtime(cast('1:0:0' as time),cast('1:0:0' as time)) as dd
|
||||
from t1;
|
||||
explain t2;
|
||||
|
||||
select * from t2;
|
||||
|
||||
drop table t1, t2;
|
||||
|
||||
|
@ -94,3 +94,16 @@ drop table t1,t2;
|
||||
# derived table reference
|
||||
#
|
||||
SELECT a.x FROM (SELECT 1 AS x) AS a HAVING a.x = 1;
|
||||
|
||||
#
|
||||
# Test for select if database is not selected.
|
||||
#
|
||||
# Connect without a database
|
||||
create table a1 select 1 as a;
|
||||
connect (con1,localhost,mysqltest_1,,*NO-ONE*,$MASTER_MYPORT,master.sock);
|
||||
connection con1;
|
||||
--error 1046
|
||||
select 2 as a from (select * from a1) b;
|
||||
use test;
|
||||
select 2 as a from (select * from a1) b;
|
||||
drop table a1;
|
||||
|
@ -43,3 +43,13 @@ drop database mysqltest;
|
||||
show databases;
|
||||
--error 1008
|
||||
drop database mysqltest;
|
||||
|
||||
# test create table and FLUSH TABLES WITH READ LOCK
|
||||
drop table t1;
|
||||
flush tables with read lock;
|
||||
--error 1223;
|
||||
create table t1(n int);
|
||||
unlock tables;
|
||||
create table t1(n int);
|
||||
show tables;
|
||||
drop table t1;
|
||||
|
@ -4,7 +4,33 @@ select length(encrypt('foo', 'ff')) <> 0;
|
||||
--replace_result $1$aa$4OSUA5cjdx0RUQ08opV27/ aaqPiZY5xR5l.
|
||||
|
||||
# Test new and old password handling functions
|
||||
select password("a",""), password("a",NULL), password("","a"), password(NULL,"a");
|
||||
select password("aaaaaaaaaaaaaaaa","a"), password("a","aaaaaaaaaaaaaaaa");
|
||||
select old_password('test'), length(password("1")), length(encrypt('test')), encrypt('test','aa');
|
||||
select old_password(""), old_password(NULL), password(""), password(NULL);
|
||||
select password('abc');
|
||||
select password('');
|
||||
select old_password('abc');
|
||||
select old_password('');
|
||||
select password('gabbagabbahey');
|
||||
select old_password('idkfa');
|
||||
select length(password('1'));
|
||||
select length(encrypt('test'));
|
||||
select encrypt('test','aa');
|
||||
select old_password(NULL);
|
||||
select password(NULL);
|
||||
set global old_passwords=on;
|
||||
select password('');
|
||||
select old_password('');
|
||||
select password('idkfa');
|
||||
select old_password('idkfa');
|
||||
set old_passwords=on;
|
||||
select password('idkfa');
|
||||
select old_password('idkfa');
|
||||
set global old_passwords=off;
|
||||
select password('idkfa');
|
||||
select old_password('idkfa');
|
||||
|
||||
# this test shows that new scrambles honor spaces in passwords:
|
||||
set old_passwords=off;
|
||||
select password('idkfa ');
|
||||
select password('idkfa');
|
||||
select password(' idkfa');
|
||||
select old_password('idkfa');
|
||||
select old_password(' i d k f a ');
|
||||
|
@ -91,6 +91,11 @@ insert into t2 values (1,4), (5,4), (5,5);
|
||||
--replace_result www.help.com X www.host.com X www.google.com X
|
||||
select REQ_ID, Group_Concat(URL) as URL from t1, t2 where
|
||||
t2.URL_ID = t1.URL_ID group by REQ_ID;
|
||||
# check min/max function
|
||||
--replace_result www.help.com X www.host.com X www.google.com X
|
||||
select REQ_ID, Group_Concat(URL) as URL, Min(t1.URL_ID) urll,
|
||||
Max(t1.URL_ID)
|
||||
urlg from t1, t2 where t2.URL_ID = t1.URL_ID group by REQ_ID;
|
||||
|
||||
drop table t1;
|
||||
drop table t2;
|
||||
@ -99,3 +104,19 @@ insert into t1 values (1,'longername'),(1,'evenlongername');
|
||||
insert into t1 values (1,'longername'),(1,'evenlongername');
|
||||
select ifnull(group_concat(concat(t1.id, ':', t1.name)), 'shortname') as 'without distinct: how it should be' from t1;
|
||||
select distinct ifnull(group_concat(concat(t1.id, ':', t1.name)), 'shortname') as 'with distinct: cutoff at length of shortname' from t1;
|
||||
drop table t1;
|
||||
|
||||
# check zero rows
|
||||
create table t1(id int);
|
||||
create table t2(id int);
|
||||
insert into t1 values(0),(1);
|
||||
select group_concat(t1.id) FROM t1,t2;
|
||||
drop table t1;
|
||||
drop table t2;
|
||||
|
||||
# check having
|
||||
create table t1 (bar varchar(32));
|
||||
insert into t1 values('test'),('test2');
|
||||
select * from t1 having group_concat(bar)='';
|
||||
drop table t1;
|
||||
|
||||
|
@ -133,6 +133,21 @@ select n from t1;
|
||||
rollback;
|
||||
drop table t1;
|
||||
|
||||
#
|
||||
# Test for commit and FLUSH TABLES WITH READ LOCK
|
||||
#
|
||||
|
||||
create table t1 (n int not null primary key) type=innodb;
|
||||
start transaction;
|
||||
insert into t1 values (4);
|
||||
flush tables with read lock;
|
||||
--error 1223;
|
||||
commit;
|
||||
unlock tables;
|
||||
commit;
|
||||
select * from t1;
|
||||
drop table t1;
|
||||
|
||||
#
|
||||
# Testing transactions
|
||||
#
|
||||
@ -925,3 +940,29 @@ SELECT t2.id, t1.label FROM t2 INNER JOIN
|
||||
(SELECT t1.id_object as id_object FROM t1 WHERE t1.label LIKE '%test%') AS lbl
|
||||
ON (t2.id = lbl.id_object) INNER JOIN t1 ON (t2.id = t1.id_object);
|
||||
drop table t1,t2;
|
||||
|
||||
#
|
||||
# Bug #1078
|
||||
#
|
||||
create table t1 (c1 char(5) unique not null, c2 int, stamp timestamp) type=innodb;
|
||||
select * from t1;
|
||||
--error 1031
|
||||
replace delayed into t1 (c1, c2) values ( "text1","11"),( "text2","12");
|
||||
select * from t1;
|
||||
--error 1031
|
||||
replace delayed into t1 (c1, c2) values ( "text1","12"),( "text2","13"),( "text3","14", "a" ),( "text4","15", "b" );
|
||||
select * from t1;
|
||||
drop table t1;
|
||||
|
||||
create table t1 (a int, b varchar(200), c text not null) checksum=1 type=myisam;
|
||||
create table t2 (a int, b varchar(200), c text not null) checksum=0 type=innodb;
|
||||
create table t3 (a int, b varchar(200), c text not null) checksum=1 type=innodb;
|
||||
insert t1 values (1, "aaa", "bbb"), (NULL, "", "ccccc"), (0, NULL, "");
|
||||
insert t2 select * from t1;
|
||||
insert t3 select * from t1;
|
||||
checksum table t1, t2, t3, t4 quick;
|
||||
checksum table t1, t2, t3, t4;
|
||||
checksum table t1, t2, t3, t4 extended;
|
||||
#show table status;
|
||||
drop table t1,t2,t3;
|
||||
|
||||
|
@ -15,7 +15,3 @@ truncate table t1;
|
||||
load data infile '../../std_data/loaddata1.dat' into table t1 fields terminated by ',' LINES STARTING BY ',' (b,c,d);
|
||||
SELECT * from t1;
|
||||
drop table t1;
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -363,4 +363,15 @@ drop table t1,t2;
|
||||
CREATE TABLE t1 (`a` int(11) NOT NULL default '0', `b` int(11) NOT NULL default '0', UNIQUE KEY `a` USING RTREE (`a`,`b`)) TYPE=MyISAM;
|
||||
# INSERT INTO t1 VALUES (1,1),(1,1);
|
||||
# DELETE FROM rt WHERE a<1;
|
||||
DROP TABLE IF EXISTS t1;
|
||||
# DROP TABLE IF EXISTS t1;
|
||||
|
||||
create table t1 (a int, b varchar(200), c text not null) checksum=1;
|
||||
create table t2 (a int, b varchar(200), c text not null) checksum=0;
|
||||
insert t1 values (1, "aaa", "bbb"), (NULL, "", "ccccc"), (0, NULL, "");
|
||||
insert t2 select * from t1;
|
||||
checksum table t1, t2, t3 quick;
|
||||
checksum table t1, t2, t3;
|
||||
checksum table t1, t2, t3 extended;
|
||||
#show table status;
|
||||
drop table t1,t2;
|
||||
|
||||
|
@ -77,3 +77,14 @@ select product, country_id , year, sum(profit) from t1 group by product, country
|
||||
|
||||
drop table t1,t2;
|
||||
|
||||
#
|
||||
# Test bug with const tables
|
||||
#
|
||||
|
||||
CREATE TABLE t1 (i int);
|
||||
INSERT INTO t1 VALUES(100);
|
||||
CREATE TABLE t2 (i int);
|
||||
INSERT INTO t2 VALUES (100),(200);
|
||||
SELECT i, COUNT(*) FROM t1 GROUP BY i WITH ROLLUP;
|
||||
SELECT t1.i, t2.i, COUNT(*) FROM t1,t2 GROUP BY t1.i,t2.i WITH ROLLUP;
|
||||
drop table t1,t2;
|
||||
|
60
mysql-test/t/rpl_openssl.test
Normal file
60
mysql-test/t/rpl_openssl.test
Normal file
@ -0,0 +1,60 @@
|
||||
source include/have_openssl_1.inc;
|
||||
source include/master-slave.inc;
|
||||
|
||||
# We don't test all types of ssl auth params here since it's a bit hard
|
||||
# until problems with OpenSSL 0.9.7 are unresolved
|
||||
|
||||
# creating replication user for whom ssl auth is required
|
||||
# preparing playground
|
||||
connection master;
|
||||
grant replication slave on *.* to replssl@'%' require ssl;
|
||||
create table t1 (t int);
|
||||
save_master_pos;
|
||||
|
||||
#syncing with master
|
||||
connection slave;
|
||||
sync_with_master;
|
||||
|
||||
#trying to use this user without ssl
|
||||
stop slave;
|
||||
change master to master_user='replssl',master_password='';
|
||||
start slave;
|
||||
|
||||
#showing that replication don't work
|
||||
connection master;
|
||||
insert into t1 values (1);
|
||||
#reasonable timeout for changes to propagate to slave
|
||||
sleep 3;
|
||||
connection slave;
|
||||
select * from t1;
|
||||
|
||||
#showing that replication could work with ssl params
|
||||
stop slave;
|
||||
--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
|
||||
eval change master to master_ssl=1 , master_ssl_ca ='$MYSQL_TEST_DIR/std_data/cacert.pem', master_ssl_cert='$MYSQL_TEST_DIR/std_data/client-cert.pem', master_ssl_key='$MYSQL_TEST_DIR/std_data/client-key.pem';
|
||||
start slave;
|
||||
|
||||
#avoiding unneeded sleeps
|
||||
connection master;
|
||||
save_master_pos;
|
||||
connection slave;
|
||||
sync_with_master;
|
||||
|
||||
#checking that replication is ok
|
||||
select * from t1;
|
||||
|
||||
#checking show slave status
|
||||
--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR $MASTER_MYPORT MASTER_MYPORT
|
||||
show slave status;
|
||||
|
||||
#checking if replication works without ssl also performing clean up
|
||||
stop slave;
|
||||
change master to master_user='root',master_password='', master_ssl=0;
|
||||
start slave;
|
||||
connection master;
|
||||
drop table t1;
|
||||
save_master_pos;
|
||||
connection slave;
|
||||
sync_with_master;
|
||||
--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR $MASTER_MYPORT MASTER_MYPORT
|
||||
show slave status;
|
@ -901,3 +901,36 @@ insert into t3 values (1),(2),(10),(50);
|
||||
select a from t3 where t3.a in (select a from t1 where a <= 3 union select * from t2 where a <= 30);
|
||||
drop table t1,t2;
|
||||
|
||||
#
|
||||
# collation test
|
||||
#
|
||||
CREATE TABLE t1 (s1 CHAR(5) COLLATE latin1_german1_ci,
|
||||
s2 CHAR(5) COLLATE latin1_swedish_ci);
|
||||
INSERT INTO t1 VALUES ('z','?');
|
||||
-- error 1266
|
||||
select * from t1 where s1 > (select max(s2) from t1);
|
||||
-- error 1266
|
||||
select * from t1 where s1 > any (select max(s2) from t1);
|
||||
drop table t1;
|
||||
|
||||
#
|
||||
# aggregate functions reinitialization
|
||||
#
|
||||
create table t1(toid int,rd int);
|
||||
create table t2(userid int,pmnew int,pmtotal int);
|
||||
insert into t2 values(1,0,0),(2,0,0);
|
||||
insert into t1 values(1,0),(1,0),(1,0),(1,12),(1,15),(1,123),(1,12312),(1,12312),(1,123),(2,0),(2,0),(2,1),(2,2);
|
||||
select userid,pmtotal,pmnew, (select count(rd) from t1 where toid=t2.userid) calc_total, (select count(rd) from t1 where rd=0 and toid=t2.userid) calc_new from t2 where userid in (select distinct toid from t1);
|
||||
drop table t1, t2;
|
||||
|
||||
#
|
||||
# row union
|
||||
#
|
||||
create table t1 (s1 char(5));
|
||||
-- error 1240
|
||||
select (select 'a','b' from t1 union select 'a','b' from t1) from t1;
|
||||
insert into t1 values ('tttt');
|
||||
select * from t1 where ('a','b')=(select 'a','b' from t1 union select 'a','b' from t1);
|
||||
explain (select * from t1);
|
||||
(select * from t1);
|
||||
drop table t1;
|
||||
|
Reference in New Issue
Block a user