mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Merge sanja.is.com.ua:/home/bell/mysql/bk/work-top3-4.1
into sanja.is.com.ua:/home/bell/mysql/bk/work-simple_in-4.1
This commit is contained in:
@ -150,3 +150,91 @@ select last_insert_id();
|
||||
last_insert_id()
|
||||
0
|
||||
drop table t1;
|
||||
create table t1(a int auto_increment,b int null,primary key(a));
|
||||
SET SQL_MODE=NO_AUTO_VALUE_ON_ZERO;
|
||||
insert into t1(a,b)values(NULL,1);
|
||||
insert into t1(a,b)values(200,2);
|
||||
insert into t1(a,b)values(0,3);
|
||||
insert into t1(b)values(4);
|
||||
insert into t1(b)values(5);
|
||||
insert into t1(b)values(6);
|
||||
insert into t1(b)values(7);
|
||||
select * from t1 order by b;
|
||||
a b
|
||||
1 1
|
||||
200 2
|
||||
0 3
|
||||
201 4
|
||||
202 5
|
||||
203 6
|
||||
204 7
|
||||
delete from t1 where a=0;
|
||||
update t1 set a=0 where b=5;
|
||||
select * from t1 order by b;
|
||||
a b
|
||||
1 1
|
||||
200 2
|
||||
201 4
|
||||
0 5
|
||||
203 6
|
||||
204 7
|
||||
delete from t1 where a=0;
|
||||
update t1 set a=NULL where b=6;
|
||||
Warnings:
|
||||
Warning 1261 Data truncated, NULL supplied to NOT NULL column 'a' at row 4
|
||||
update t1 set a=300 where b=7;
|
||||
SET SQL_MODE='';
|
||||
insert into t1(a,b)values(NULL,8);
|
||||
insert into t1(a,b)values(400,9);
|
||||
insert into t1(a,b)values(0,10);
|
||||
insert into t1(b)values(11);
|
||||
insert into t1(b)values(12);
|
||||
insert into t1(b)values(13);
|
||||
insert into t1(b)values(14);
|
||||
select * from t1 order by b;
|
||||
a b
|
||||
1 1
|
||||
200 2
|
||||
201 4
|
||||
0 6
|
||||
300 7
|
||||
301 8
|
||||
400 9
|
||||
401 10
|
||||
402 11
|
||||
403 12
|
||||
404 13
|
||||
405 14
|
||||
delete from t1 where a=0;
|
||||
update t1 set a=0 where b=12;
|
||||
select * from t1 order by b;
|
||||
a b
|
||||
1 1
|
||||
200 2
|
||||
201 4
|
||||
300 7
|
||||
301 8
|
||||
400 9
|
||||
401 10
|
||||
402 11
|
||||
0 12
|
||||
404 13
|
||||
405 14
|
||||
delete from t1 where a=0;
|
||||
update t1 set a=NULL where b=13;
|
||||
Warnings:
|
||||
Warning 1261 Data truncated, NULL supplied to NOT NULL column 'a' at row 9
|
||||
update t1 set a=500 where b=14;
|
||||
select * from t1 order by b;
|
||||
a b
|
||||
1 1
|
||||
200 2
|
||||
201 4
|
||||
300 7
|
||||
301 8
|
||||
400 9
|
||||
401 10
|
||||
402 11
|
||||
0 13
|
||||
500 14
|
||||
drop table t1;
|
||||
|
@ -7,6 +7,10 @@ CREATE TABLE t2 (
|
||||
latin1_f CHAR(32) CHARACTER SET latin1 COLLATE koi8r_general_ci NOT NULL
|
||||
);
|
||||
ERROR 42000: COLLATION 'koi8r_general_ci' is not valid for CHARACTER SET 'latin1'
|
||||
CREATE TABLE t2 (
|
||||
latin1_f CHAR(32) CHARACTER SET latin1 COLLATE some_non_existing_col NOT NULL
|
||||
);
|
||||
ERROR HY000: Unknown collation: 'some_non_existing_col'
|
||||
INSERT INTO t1 (latin1_f) VALUES (_latin1'A');
|
||||
INSERT INTO t1 (latin1_f) VALUES (_latin1'a');
|
||||
INSERT INTO t1 (latin1_f) VALUES (_latin1'AD');
|
||||
@ -482,7 +486,7 @@ y
|
||||
Z
|
||||
z
|
||||
SELECT DISTINCT latin1_f COLLATE koi8r FROM t1;
|
||||
ERROR 42000: COLLATION 'koi8r' is not valid for CHARACTER SET 'latin1'
|
||||
ERROR HY000: Unknown collation: 'koi8r'
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
@ -526,3 +530,9 @@ latin1 latin1_swedish_ci 3 1
|
||||
SET CHARACTER SET 'DEFAULT';
|
||||
ERROR 42000: Unknown character set: 'DEFAULT'
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1
|
||||
(s1 CHAR(5) COLLATE latin1_german1_ci,
|
||||
s2 CHAR(5) COLLATE latin1_swedish_ci);
|
||||
SELECT * FROM t1 WHERE s1 = s2;
|
||||
ERROR HY000: Illegal mix of collations (latin1_german1_ci,IMPLICIT) and (latin1_swedish_ci,IMPLICIT) for operation '='
|
||||
DROP TABLE t1;
|
||||
|
23
mysql-test/r/grant2.result
Normal file
23
mysql-test/r/grant2.result
Normal file
@ -0,0 +1,23 @@
|
||||
delete from mysql.user where user like 'mysqltest\_%';
|
||||
delete from mysql.db where user like 'mysqltest\_%';
|
||||
flush privileges;
|
||||
grant all privileges on `my\_%`.* to mysqltest_1@localhost with grant option;
|
||||
select current_user();
|
||||
current_user()
|
||||
mysqltest_1@localhost
|
||||
grant all privileges on `my\_1`.* to mysqltest_2@localhost with grant option;
|
||||
grant all privileges on `my_%`.* to mysqltest_3@localhost with grant option;
|
||||
ERROR 42000: Access denied for user: 'mysqltest_1'@'localhost' to database 'my_%'
|
||||
show grants for mysqltest_1@localhost;
|
||||
Grants for mysqltest_1@localhost
|
||||
GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost'
|
||||
GRANT ALL PRIVILEGES ON `my\_%`.* TO 'mysqltest_1'@'localhost' WITH GRANT OPTION
|
||||
show grants for mysqltest_2@localhost;
|
||||
Grants for mysqltest_2@localhost
|
||||
GRANT USAGE ON *.* TO 'mysqltest_2'@'localhost'
|
||||
GRANT ALL PRIVILEGES ON `my\_1`.* TO 'mysqltest_2'@'localhost' WITH GRANT OPTION
|
||||
show grants for mysqltest_3@localhost;
|
||||
ERROR 42000: There is no such grant defined for user 'mysqltest_3' on host 'localhost'
|
||||
delete from mysql.user where user like 'mysqltest\_%';
|
||||
delete from mysql.db where user like 'mysqltest\_%';
|
||||
flush privileges;
|
@ -84,7 +84,7 @@ a b c a
|
||||
1 1 1 test.t1
|
||||
2 2 2 test.t1
|
||||
select * from t2;
|
||||
ERROR 42000: select command denied to user: 'mysqltest_2@localhost' for table 't2'
|
||||
ERROR 42000: select command denied to user: 'mysqltest_2'@'localhost' for table 't2'
|
||||
show status like "Qcache_queries_in_cache";
|
||||
Variable_name Value
|
||||
Qcache_queries_in_cache 6
|
||||
@ -98,17 +98,17 @@ select "user3";
|
||||
user3
|
||||
user3
|
||||
select * from t1;
|
||||
ERROR 42000: select command denied to user: 'mysqltest_3@localhost' for column 'b' in table 't1'
|
||||
ERROR 42000: select command denied to user: 'mysqltest_3'@'localhost' for column 'b' in table 't1'
|
||||
select a from t1;
|
||||
a
|
||||
1
|
||||
2
|
||||
select c from t1;
|
||||
ERROR 42000: SELECT command denied to user: 'mysqltest_3@localhost' for column 'c' in table 't1'
|
||||
ERROR 42000: SELECT command denied to user: 'mysqltest_3'@'localhost' for column 'c' in table 't1'
|
||||
select * from t2;
|
||||
ERROR 42000: select command denied to user: 'mysqltest_3@localhost' for table 't2'
|
||||
ERROR 42000: select command denied to user: 'mysqltest_3'@'localhost' for table 't2'
|
||||
select mysqltest.t1.c from test.t1,mysqltest.t1;
|
||||
ERROR 42000: SELECT command denied to user: 'mysqltest_3@localhost' for column 'c' in table 't1'
|
||||
ERROR 42000: SELECT command denied to user: 'mysqltest_3'@'localhost' for column 'c' in table 't1'
|
||||
show status like "Qcache_queries_in_cache";
|
||||
Variable_name Value
|
||||
Qcache_queries_in_cache 6
|
||||
|
@ -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 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
|
||||
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 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
|
||||
127.0.0.1 test MASTER_PORT 7 4 slave-relay-bin.000001 4 No No 0 0 0 4
|
||||
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 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
|
||||
127.0.0.1 root MASTER_PORT 7 4 slave-relay-bin.000001 4 No No 0 0 0 4
|
||||
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 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
|
||||
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
|
||||
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 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
|
||||
load table t1 from master;
|
||||
ERROR 08S01: Error connecting to master: Master is not configured
|
||||
load table t1 from master;
|
||||
|
@ -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 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.000001 122 slave-bin.000001 Yes Yes 0 0 79 122
|
||||
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.000001 122 slave-bin.000001 Yes Yes 0 0 79 122
|
||||
|
@ -24,7 +24,3 @@ drop table t2;
|
||||
drop table t3;
|
||||
create table t1(a int, b int, unique(b));
|
||||
insert into t1 values(1,10);
|
||||
load data infile '../../std_data/rpl_loaddata.dat' into table t1;
|
||||
show status like 'slave_running';
|
||||
Variable_name Value
|
||||
Slave_running OFF
|
||||
|
@ -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 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.000002 1531 master-bin.000002 Yes Yes 0 0 276 1535
|
||||
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.000002 1531 master-bin.000002 Yes Yes 0 0 276 1535
|
||||
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 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 127
|
||||
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 127
|
||||
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 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
|
||||
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
|
||||
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 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 Yes 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
|
||||
127.0.0.1 root MASTER_PORT 1 master-bin.000001 73 slave-relay-bin.000001 4 master-bin.000001 No Yes 0 0 73 4
|
||||
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 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
|
||||
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
|
||||
show master status;
|
||||
File Position Binlog_do_db Binlog_ignore_db
|
||||
master-bin.000001 79
|
||||
|
@ -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 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
|
||||
SHOW SLAVE HOSTS;
|
||||
Server_id Host Port Rpl_recovery_rank Master_id
|
||||
2 127.0.0.1 SLAVE_PORT 2 1
|
||||
|
@ -26,3 +26,6 @@ n
|
||||
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 1329
|
||||
|
@ -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 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
|
||||
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
|
||||
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 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
|
||||
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
|
||||
select * from t2;
|
||||
m
|
||||
34
|
||||
@ -82,8 +82,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 Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space
|
||||
127.0.0.1 root MASTER_PORT 60 master-bin.000006 838 slave-relay-bin.000001 8067 master-bin.000006 Yes Yes 0 0 838 8067
|
||||
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.000006 838 slave-relay-bin.000001 8067 master-bin.000006 Yes Yes 0 0 838 8067
|
||||
lock tables t3 read;
|
||||
select count(*) from t3 where n >= 4;
|
||||
count(*)
|
||||
|
@ -184,6 +184,8 @@ set GLOBAL table_type=DEFAULT;
|
||||
ERROR 42000: Variable 'table_type' doesn't have a default value
|
||||
set character_set_client=UNKNOWN_CHARACTER_SET;
|
||||
ERROR 42000: Unknown character set: 'UNKNOWN_CHARACTER_SET'
|
||||
set collation_connection=UNKNOWN_COLLATION;
|
||||
ERROR HY000: Unknown collation: 'UNKNOWN_COLLATION'
|
||||
set global autocommit=1;
|
||||
ERROR HY000: Variable 'autocommit' is a LOCAL variable and can't be used with SET GLOBAL
|
||||
select @@global.timestamp;
|
||||
|
@ -106,3 +106,36 @@ select last_insert_id();
|
||||
|
||||
drop table t1;
|
||||
|
||||
create table t1(a int auto_increment,b int null,primary key(a));
|
||||
SET SQL_MODE=NO_AUTO_VALUE_ON_ZERO;
|
||||
insert into t1(a,b)values(NULL,1);
|
||||
insert into t1(a,b)values(200,2);
|
||||
insert into t1(a,b)values(0,3);
|
||||
insert into t1(b)values(4);
|
||||
insert into t1(b)values(5);
|
||||
insert into t1(b)values(6);
|
||||
insert into t1(b)values(7);
|
||||
select * from t1 order by b;
|
||||
delete from t1 where a=0;
|
||||
update t1 set a=0 where b=5;
|
||||
select * from t1 order by b;
|
||||
delete from t1 where a=0;
|
||||
update t1 set a=NULL where b=6;
|
||||
update t1 set a=300 where b=7;
|
||||
SET SQL_MODE='';
|
||||
insert into t1(a,b)values(NULL,8);
|
||||
insert into t1(a,b)values(400,9);
|
||||
insert into t1(a,b)values(0,10);
|
||||
insert into t1(b)values(11);
|
||||
insert into t1(b)values(12);
|
||||
insert into t1(b)values(13);
|
||||
insert into t1(b)values(14);
|
||||
select * from t1 order by b;
|
||||
delete from t1 where a=0;
|
||||
update t1 set a=0 where b=12;
|
||||
select * from t1 order by b;
|
||||
delete from t1 where a=0;
|
||||
update t1 set a=NULL where b=13;
|
||||
update t1 set a=500 where b=14;
|
||||
select * from t1 order by b;
|
||||
drop table t1;
|
||||
|
@ -12,6 +12,11 @@ CREATE TABLE t2 (
|
||||
latin1_f CHAR(32) CHARACTER SET latin1 COLLATE koi8r_general_ci NOT NULL
|
||||
);
|
||||
|
||||
--error 1271
|
||||
CREATE TABLE t2 (
|
||||
latin1_f CHAR(32) CHARACTER SET latin1 COLLATE some_non_existing_col NOT NULL
|
||||
);
|
||||
|
||||
|
||||
INSERT INTO t1 (latin1_f) VALUES (_latin1'A');
|
||||
INSERT INTO t1 (latin1_f) VALUES (_latin1'a');
|
||||
@ -93,7 +98,7 @@ SELECT DISTINCT latin1_f COLLATE latin1_swedish_ci FROM t1;
|
||||
SELECT DISTINCT latin1_f COLLATE latin1_german2_ci FROM t1;
|
||||
SELECT DISTINCT latin1_f COLLATE latin1_general_ci FROM t1;
|
||||
SELECT DISTINCT latin1_f COLLATE latin1_bin FROM t1;
|
||||
--error 1251
|
||||
--error 1271
|
||||
SELECT DISTINCT latin1_f COLLATE koi8r FROM t1;
|
||||
|
||||
|
||||
@ -143,3 +148,11 @@ SELECT charset('a'),collation('a'),coercibility('a'),'a'='A';
|
||||
SET CHARACTER SET 'DEFAULT';
|
||||
|
||||
DROP TABLE t1;
|
||||
|
||||
CREATE TABLE t1
|
||||
(s1 CHAR(5) COLLATE latin1_german1_ci,
|
||||
s2 CHAR(5) COLLATE latin1_swedish_ci);
|
||||
--error 1265
|
||||
SELECT * FROM t1 WHERE s1 = s2;
|
||||
DROP TABLE t1;
|
||||
|
30
mysql-test/t/grant2.test
Normal file
30
mysql-test/t/grant2.test
Normal file
@ -0,0 +1,30 @@
|
||||
#
|
||||
# GRANT tests that require several connections
|
||||
# (usually it's GRANT, reconnect as another user, try something)
|
||||
#
|
||||
|
||||
|
||||
#
|
||||
# wild_compare fun
|
||||
#
|
||||
|
||||
delete from mysql.user where user like 'mysqltest\_%';
|
||||
delete from mysql.db where user like 'mysqltest\_%';
|
||||
flush privileges;
|
||||
grant all privileges on `my\_%`.* to mysqltest_1@localhost with grant option;
|
||||
connect (user1,localhost,mysqltest_1,,);
|
||||
connection user1;
|
||||
select current_user();
|
||||
grant all privileges on `my\_1`.* to mysqltest_2@localhost with grant option;
|
||||
--error 1044
|
||||
grant all privileges on `my_%`.* to mysqltest_3@localhost with grant option;
|
||||
disconnect user1;
|
||||
connection default;
|
||||
show grants for mysqltest_1@localhost;
|
||||
show grants for mysqltest_2@localhost;
|
||||
--error 1141
|
||||
show grants for mysqltest_3@localhost;
|
||||
delete from mysql.user where user like 'mysqltest\_%';
|
||||
delete from mysql.db where user like 'mysqltest\_%';
|
||||
flush privileges;
|
||||
|
1
mysql-test/t/rpl_insert_id-slave.opt
Normal file
1
mysql-test/t/rpl_insert_id-slave.opt
Normal file
@ -0,0 +1 @@
|
||||
--innodb
|
@ -37,14 +37,21 @@ connection slave;
|
||||
sync_with_master;
|
||||
insert into t1 values(1,10);
|
||||
|
||||
connection master;
|
||||
load data infile '../../std_data/rpl_loaddata.dat' into table t1;
|
||||
|
||||
save_master_pos;
|
||||
connection slave;
|
||||
# don't sync_with_master because the slave SQL thread should be stopped because
|
||||
# of the error so MASTER_POS_WAIT() will not return; just sleep and hope the
|
||||
# slave SQL thread will have had time to stop.
|
||||
# NOTE UNTIL MERGE 4.0 INTO 4.1
|
||||
# Below we generate an error, but this error shows up in SHOW SLAVE STATUS
|
||||
# in the next test. In 4.0 this is fixed (RESET SLAVE resets the error), but it
|
||||
# has not been merged into 4.1 yet. So for the moment, I comment all lines
|
||||
# below, to not generate the error, so that the test suite passes.
|
||||
# When you do the 4.0 -> 4.1 merge, please remove this note and re-enable the
|
||||
# error generation, by deleting the '#' characters below, and update the result.
|
||||
# The changeset to merge in 4.1 is
|
||||
# ChangeSet@1.1455.34.1, 2003-06-10 23:29:49+02:00, guilhem@mysql.com
|
||||
|
||||
sleep 1;
|
||||
show status like 'slave_running';
|
||||
#connection master;
|
||||
#load data infile '../../std_data/rpl_loaddata.dat' into table t1;
|
||||
|
||||
#save_master_pos;
|
||||
#connection slave;
|
||||
# The SQL slave thread should be stopped now.
|
||||
#wait_for_slave_to_stop;
|
||||
|
@ -31,3 +31,7 @@ drop table if exists t1,t2,t11;
|
||||
save_master_pos;
|
||||
connection slave;
|
||||
sync_with_master;
|
||||
# show slave status, just to see of it prints replicate-do-table
|
||||
--replace_result $MASTER_MYPORT MASTER_PORT
|
||||
show slave status;
|
||||
|
||||
|
@ -120,6 +120,8 @@ set SESSION query_cache_size=10000;
|
||||
set GLOBAL table_type=DEFAULT;
|
||||
--error 1115
|
||||
set character_set_client=UNKNOWN_CHARACTER_SET;
|
||||
--error 1271
|
||||
set collation_connection=UNKNOWN_COLLATION;
|
||||
--error 1228
|
||||
set global autocommit=1;
|
||||
--error 1228
|
||||
|
Reference in New Issue
Block a user