2004-06-03 23:17:18 +02:00
|
|
|
|
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;
|
2004-08-31 13:35:04 +02:00
|
|
|
|
drop database if exists mysqltest2;
|
|
|
|
|
drop database if exists mysqltest3;
|
|
|
|
|
create database mysqltest2 character set latin2;
|
2004-06-03 23:17:18 +02:00
|
|
|
|
set @@character_set_server=latin5;
|
2004-08-31 13:35:04 +02:00
|
|
|
|
create database mysqltest3;
|
2004-06-03 23:17:18 +02:00
|
|
|
|
|
|
|
|
|
--- --master--
|
2004-08-31 13:35:04 +02:00
|
|
|
|
show create database mysqltest2;
|
2004-06-03 23:17:18 +02:00
|
|
|
|
Database Create Database
|
2004-08-31 13:35:04 +02:00
|
|
|
|
mysqltest2 CREATE DATABASE `mysqltest2` /*!40100 DEFAULT CHARACTER SET latin2 */
|
|
|
|
|
show create database mysqltest3;
|
2004-06-03 23:17:18 +02:00
|
|
|
|
Database Create Database
|
2004-08-31 13:35:04 +02:00
|
|
|
|
mysqltest3 CREATE DATABASE `mysqltest3` /*!40100 DEFAULT CHARACTER SET latin5 */
|
2004-06-03 23:17:18 +02:00
|
|
|
|
|
|
|
|
|
--- --slave--
|
2004-08-31 13:35:04 +02:00
|
|
|
|
show create database mysqltest2;
|
2004-06-03 23:17:18 +02:00
|
|
|
|
Database Create Database
|
2004-08-31 13:35:04 +02:00
|
|
|
|
mysqltest2 CREATE DATABASE `mysqltest2` /*!40100 DEFAULT CHARACTER SET latin2 */
|
|
|
|
|
show create database mysqltest3;
|
2004-06-03 23:17:18 +02:00
|
|
|
|
Database Create Database
|
2004-08-31 13:35:04 +02:00
|
|
|
|
mysqltest3 CREATE DATABASE `mysqltest3` /*!40100 DEFAULT CHARACTER SET latin5 */
|
2004-07-06 10:43:15 +02:00
|
|
|
|
set @@collation_server=armscii8_bin;
|
2004-08-31 13:35:04 +02:00
|
|
|
|
drop database mysqltest3;
|
|
|
|
|
create database mysqltest3;
|
2004-06-03 23:17:18 +02:00
|
|
|
|
|
|
|
|
|
--- --master--
|
2004-08-31 13:35:04 +02:00
|
|
|
|
show create database mysqltest3;
|
2004-06-03 23:17:18 +02:00
|
|
|
|
Database Create Database
|
2004-08-31 13:35:04 +02:00
|
|
|
|
mysqltest3 CREATE DATABASE `mysqltest3` /*!40100 DEFAULT CHARACTER SET armscii8 COLLATE armscii8_bin */
|
2004-06-03 23:17:18 +02:00
|
|
|
|
|
|
|
|
|
--- --slave--
|
2004-08-31 13:35:04 +02:00
|
|
|
|
show create database mysqltest3;
|
2004-06-03 23:17:18 +02:00
|
|
|
|
Database Create Database
|
2004-08-31 13:35:04 +02:00
|
|
|
|
mysqltest3 CREATE DATABASE `mysqltest3` /*!40100 DEFAULT CHARACTER SET armscii8 COLLATE armscii8_bin */
|
|
|
|
|
use mysqltest2;
|
2004-06-03 23:17:18 +02:00
|
|
|
|
create table t1 (a int auto_increment primary key, b varchar(100));
|
|
|
|
|
set character_set_client=cp850, collation_connection=latin2_croatian_ci;
|
|
|
|
|
insert into t1 (b) values(@@character_set_server);
|
|
|
|
|
insert into t1 (b) values(@@collation_server);
|
|
|
|
|
insert into t1 (b) values(@@character_set_client);
|
|
|
|
|
insert into t1 (b) values(@@character_set_connection);
|
|
|
|
|
insert into t1 (b) values(@@collation_connection);
|
|
|
|
|
|
|
|
|
|
--- --master--
|
|
|
|
|
select * from t1 order by a;
|
|
|
|
|
a b
|
|
|
|
|
1 armscii8
|
2004-07-06 10:43:15 +02:00
|
|
|
|
2 armscii8_bin
|
2004-06-03 23:17:18 +02:00
|
|
|
|
3 cp850
|
|
|
|
|
4 latin2
|
|
|
|
|
5 latin2_croatian_ci
|
|
|
|
|
|
|
|
|
|
--- --slave--
|
2004-08-31 13:35:04 +02:00
|
|
|
|
select * from mysqltest2.t1 order by a;
|
2004-06-03 23:17:18 +02:00
|
|
|
|
a b
|
|
|
|
|
1 armscii8
|
2004-07-06 10:43:15 +02:00
|
|
|
|
2 armscii8_bin
|
2004-06-03 23:17:18 +02:00
|
|
|
|
3 cp850
|
|
|
|
|
4 latin2
|
|
|
|
|
5 latin2_croatian_ci
|
|
|
|
|
set character_set_client=latin1, collation_connection=latin1_german1_ci;
|
|
|
|
|
truncate table t1;
|
|
|
|
|
insert into t1 (b) values(@@collation_connection);
|
|
|
|
|
insert into t1 (b) values(LEAST("M<>ller","Muffler"));
|
|
|
|
|
set collation_connection=latin1_german2_ci;
|
|
|
|
|
insert into t1 (b) values(@@collation_connection);
|
|
|
|
|
insert into t1 (b) values(LEAST("M<>ller","Muffler"));
|
|
|
|
|
|
|
|
|
|
--- --master--
|
|
|
|
|
select * from t1 order by a;
|
|
|
|
|
a b
|
|
|
|
|
1 latin1_german1_ci
|
|
|
|
|
2 Muffler
|
|
|
|
|
3 latin1_german2_ci
|
|
|
|
|
4 M<>ller
|
|
|
|
|
|
|
|
|
|
--- --slave--
|
2004-08-31 13:35:04 +02:00
|
|
|
|
select * from mysqltest2.t1 order by a;
|
2004-06-03 23:17:18 +02:00
|
|
|
|
a b
|
|
|
|
|
1 latin1_german1_ci
|
|
|
|
|
2 Muffler
|
|
|
|
|
3 latin1_german2_ci
|
|
|
|
|
4 M<>ller
|
|
|
|
|
load data infile '../../std_data/words.dat' into table t1 (b);
|
|
|
|
|
set @a= _cp850 'M<>ller' collate cp850_general_ci;
|
|
|
|
|
truncate table t1;
|
|
|
|
|
insert into t1 (b) values(collation(@a));
|
|
|
|
|
|
|
|
|
|
--- --master--
|
|
|
|
|
select * from t1 order by a;
|
|
|
|
|
a b
|
|
|
|
|
1 cp850_general_ci
|
|
|
|
|
|
|
|
|
|
--- --slave--
|
2004-08-31 13:35:04 +02:00
|
|
|
|
select * from mysqltest2.t1 order by a;
|
2004-06-03 23:17:18 +02:00
|
|
|
|
a b
|
|
|
|
|
1 cp850_general_ci
|
2004-08-31 13:35:04 +02:00
|
|
|
|
drop database mysqltest2;
|
|
|
|
|
drop database mysqltest3;
|
2004-07-15 23:34:41 +02:00
|
|
|
|
show binlog events from 95;
|
|
|
|
|
Log_name Pos Event_type Server_id End_log_pos Info
|
2004-09-09 05:59:26 +02:00
|
|
|
|
master-bin.000001 # Query 1 # use `test`; drop database if exists mysqltest2
|
|
|
|
|
master-bin.000001 # Query 1 # use `test`; drop database if exists mysqltest3
|
|
|
|
|
master-bin.000001 # Query 1 # use `test`; create database mysqltest2 character set latin2
|
|
|
|
|
master-bin.000001 # Query 1 # use `test`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=8,COLLATION_DATABASE=8,COLLATION_SERVER=30
|
|
|
|
|
master-bin.000001 # Query 1 # use `test`; create database mysqltest3
|
|
|
|
|
master-bin.000001 # Query 1 # use `test`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=8,COLLATION_DATABASE=8,COLLATION_SERVER=64
|
|
|
|
|
master-bin.000001 # Query 1 # use `test`; drop database mysqltest3
|
|
|
|
|
master-bin.000001 # Query 1 # use `test`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=8,COLLATION_DATABASE=8,COLLATION_SERVER=64
|
|
|
|
|
master-bin.000001 # Query 1 # use `test`; create database mysqltest3
|
|
|
|
|
master-bin.000001 # Query 1 # use `mysqltest2`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=8,COLLATION_DATABASE=9,COLLATION_SERVER=64
|
|
|
|
|
master-bin.000001 # Query 1 # use `mysqltest2`; create table t1 (a int auto_increment primary key, b varchar(100))
|
|
|
|
|
master-bin.000001 # Query 1 # use `mysqltest2`; SET ONE_SHOT CHARACTER_SET_CLIENT=4,COLLATION_CONNECTION=27,COLLATION_DATABASE=9,COLLATION_SERVER=64
|
|
|
|
|
master-bin.000001 # Intvar 1 # INSERT_ID=1
|
|
|
|
|
master-bin.000001 # Query 1 # use `mysqltest2`; insert into t1 (b) values(@@character_set_server)
|
|
|
|
|
master-bin.000001 # Query 1 # use `mysqltest2`; SET ONE_SHOT CHARACTER_SET_CLIENT=4,COLLATION_CONNECTION=27,COLLATION_DATABASE=9,COLLATION_SERVER=64
|
|
|
|
|
master-bin.000001 # Intvar 1 # INSERT_ID=2
|
|
|
|
|
master-bin.000001 # Query 1 # use `mysqltest2`; insert into t1 (b) values(@@collation_server)
|
|
|
|
|
master-bin.000001 # Query 1 # use `mysqltest2`; SET ONE_SHOT CHARACTER_SET_CLIENT=4,COLLATION_CONNECTION=27,COLLATION_DATABASE=9,COLLATION_SERVER=64
|
|
|
|
|
master-bin.000001 # Intvar 1 # INSERT_ID=3
|
|
|
|
|
master-bin.000001 # Query 1 # use `mysqltest2`; insert into t1 (b) values(@@character_set_client)
|
|
|
|
|
master-bin.000001 # Query 1 # use `mysqltest2`; SET ONE_SHOT CHARACTER_SET_CLIENT=4,COLLATION_CONNECTION=27,COLLATION_DATABASE=9,COLLATION_SERVER=64
|
|
|
|
|
master-bin.000001 # Intvar 1 # INSERT_ID=4
|
|
|
|
|
master-bin.000001 # Query 1 # use `mysqltest2`; insert into t1 (b) values(@@character_set_connection)
|
|
|
|
|
master-bin.000001 # Query 1 # use `mysqltest2`; SET ONE_SHOT CHARACTER_SET_CLIENT=4,COLLATION_CONNECTION=27,COLLATION_DATABASE=9,COLLATION_SERVER=64
|
|
|
|
|
master-bin.000001 # Intvar 1 # INSERT_ID=5
|
|
|
|
|
master-bin.000001 # Query 1 # use `mysqltest2`; insert into t1 (b) values(@@collation_connection)
|
|
|
|
|
master-bin.000001 # Query 1 # use `mysqltest2`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=5,COLLATION_DATABASE=9,COLLATION_SERVER=64
|
|
|
|
|
master-bin.000001 # Query 1 # use `mysqltest2`; truncate table t1
|
|
|
|
|
master-bin.000001 # Query 1 # use `mysqltest2`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=5,COLLATION_DATABASE=9,COLLATION_SERVER=64
|
|
|
|
|
master-bin.000001 # Intvar 1 # INSERT_ID=1
|
|
|
|
|
master-bin.000001 # Query 1 # use `mysqltest2`; insert into t1 (b) values(@@collation_connection)
|
|
|
|
|
master-bin.000001 # Query 1 # use `mysqltest2`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=5,COLLATION_DATABASE=9,COLLATION_SERVER=64
|
|
|
|
|
master-bin.000001 # Intvar 1 # INSERT_ID=2
|
|
|
|
|
master-bin.000001 # Query 1 # use `mysqltest2`; insert into t1 (b) values(LEAST("M<>ller","Muffler"))
|
|
|
|
|
master-bin.000001 # Query 1 # use `mysqltest2`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=31,COLLATION_DATABASE=9,COLLATION_SERVER=64
|
|
|
|
|
master-bin.000001 # Intvar 1 # INSERT_ID=3
|
|
|
|
|
master-bin.000001 # Query 1 # use `mysqltest2`; insert into t1 (b) values(@@collation_connection)
|
|
|
|
|
master-bin.000001 # Query 1 # use `mysqltest2`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=31,COLLATION_DATABASE=9,COLLATION_SERVER=64
|
|
|
|
|
master-bin.000001 # Intvar 1 # INSERT_ID=4
|
|
|
|
|
master-bin.000001 # Query 1 # use `mysqltest2`; insert into t1 (b) values(LEAST("M<>ller","Muffler"))
|
|
|
|
|
master-bin.000001 # Query 1 # use `mysqltest2`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=31,COLLATION_DATABASE=9,COLLATION_SERVER=64
|
|
|
|
|
master-bin.000001 # Intvar 1 # INSERT_ID=74
|
|
|
|
|
master-bin.000001 # Create_file 1 # db=mysqltest2;table=t1;file_id=1;block_len=581
|
|
|
|
|
master-bin.000001 # Query 1 # use `mysqltest2`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=31,COLLATION_DATABASE=9,COLLATION_SERVER=64
|
|
|
|
|
master-bin.000001 # Intvar 1 # INSERT_ID=5
|
|
|
|
|
master-bin.000001 # Exec_load 1 # ;file_id=1
|
|
|
|
|
master-bin.000001 # Query 1 # use `mysqltest2`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=31,COLLATION_DATABASE=9,COLLATION_SERVER=64
|
|
|
|
|
master-bin.000001 # Query 1 # use `mysqltest2`; truncate table t1
|
|
|
|
|
master-bin.000001 # Query 1 # use `mysqltest2`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=31,COLLATION_DATABASE=9,COLLATION_SERVER=64
|
|
|
|
|
master-bin.000001 # Intvar 1 # INSERT_ID=1
|
|
|
|
|
master-bin.000001 # User var 1 # @`a`=_cp850 0x4DFC6C6C6572 COLLATE cp850_general_ci
|
|
|
|
|
master-bin.000001 # Query 1 # use `mysqltest2`; insert into t1 (b) values(collation(@a))
|
|
|
|
|
master-bin.000001 # Query 1 # use `mysqltest2`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=31,COLLATION_DATABASE=9,COLLATION_SERVER=64
|
|
|
|
|
master-bin.000001 # Query 1 # use `mysqltest2`; drop database mysqltest2
|
|
|
|
|
master-bin.000001 # Query 1 # SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=31,COLLATION_DATABASE=9,COLLATION_SERVER=64
|
|
|
|
|
master-bin.000001 # Query 1 # drop database mysqltest3
|
2004-06-03 23:17:18 +02:00
|
|
|
|
set global character_set_server=latin2;
|
2004-10-20 03:04:37 +02:00
|
|
|
|
ERROR HY000: Binary logging and replication forbid changing the global server character set, collation
|
2004-06-03 23:17:18 +02:00
|
|
|
|
set global character_set_server=latin2;
|
2004-10-20 03:04:37 +02:00
|
|
|
|
ERROR HY000: Binary logging and replication forbid changing the global server character set, collation
|
2004-06-03 23:17:18 +02:00
|
|
|
|
set one_shot @@character_set_server=latin5;
|
|
|
|
|
set @@max_join_size=1000;
|
|
|
|
|
select @@character_set_server;
|
|
|
|
|
@@character_set_server
|
|
|
|
|
latin5
|
|
|
|
|
select @@character_set_server;
|
|
|
|
|
@@character_set_server
|
|
|
|
|
latin1
|
|
|
|
|
set @@character_set_server=latin5;
|
|
|
|
|
select @@character_set_server;
|
|
|
|
|
@@character_set_server
|
|
|
|
|
latin5
|
|
|
|
|
select @@character_set_server;
|
|
|
|
|
@@character_set_server
|
|
|
|
|
latin5
|
|
|
|
|
set one_shot max_join_size=10;
|
2004-10-20 03:04:37 +02:00
|
|
|
|
ERROR HY000: The 'SET ONE_SHOT' syntax is reserved for purposes internal to the MySQL server
|
2004-06-03 23:17:18 +02:00
|
|
|
|
set character_set_client=9999999;
|
|
|
|
|
ERROR 42000: Unknown character set: '9999999'
|
|
|
|
|
set collation_server=9999998;
|
|
|
|
|
ERROR HY000: Unknown collation: '9999998'
|
|
|
|
|
use test;
|
|
|
|
|
CREATE TABLE t1 (c1 VARBINARY(255), c2 VARBINARY(255));
|
|
|
|
|
SET CHARACTER_SET_CLIENT=koi8r,
|
|
|
|
|
CHARACTER_SET_CONNECTION=cp1251,
|
|
|
|
|
CHARACTER_SET_RESULTS=koi8r;
|
|
|
|
|
INSERT INTO t1 (c1, c2) VALUES ('<27><>, <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>','<27><>, <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
|
|
select hex(c1), hex(c2) from t1;
|
|
|
|
|
hex(c1) hex(c2)
|
|
|
|
|
CDF32C20E7E020F0FBE1E0EBEAF3 CDF32C20E7E020F0FBE1E0EBEAF3
|
|
|
|
|
select hex(c1), hex(c2) from t1;
|
|
|
|
|
hex(c1) hex(c2)
|
|
|
|
|
CDF32C20E7E020F0FBE1E0EBEAF3 CDF32C20E7E020F0FBE1E0EBEAF3
|
2004-09-23 12:16:56 +02:00
|
|
|
|
stop slave;
|
|
|
|
|
delete from t1;
|
2004-11-03 11:39:38 +01:00
|
|
|
|
change master to master_log_pos=6763;
|
|
|
|
|
start slave until master_log_file='master-bin.000001', master_log_pos=6921;
|
2004-09-23 12:16:56 +02:00
|
|
|
|
start slave;
|
|
|
|
|
select hex(c1), hex(c2) from t1;
|
|
|
|
|
hex(c1) hex(c2)
|
|
|
|
|
CDF32C20E7E020F0FBE1E0EBEAF3 CDF32C20E7E020F0FBE1E0EBEAF3
|
2004-06-03 23:17:18 +02:00
|
|
|
|
drop table t1;
|