mirror of
https://github.com/MariaDB/server.git
synced 2025-12-06 05:42:06 +03:00
MDEV-19964 S3 replication support Added new configure options: s3_slave_ignore_updates "If the slave has shares same S3 storage as the master" s3_replicate_alter_as_create_select "When converting S3 table to local table, log all rows in binary log" This allows on to configure slaves to have the S3 storage shared or independent from the master. Other thing: Added new session variable '@@sql_if_exists' to force IF_EXIST to DDL's.
98 lines
3.3 KiB
Plaintext
98 lines
3.3 KiB
Plaintext
include/master-slave.inc
|
|
[connection master]
|
|
set time_zone='+03:00';
|
|
set timestamp=unix_timestamp('2011-01-01 01:01:01') + 0.123456;
|
|
create table t1 (a timestamp(4) NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, b varchar(100), c datetime(2));
|
|
insert t1 (b,c) values (now(6), now(6));
|
|
insert t1 values ('2010-10-10 10:10:10.101010','2010-10-10 10:10:10.101010','2010-10-10 10:10:10.101010');
|
|
set timestamp=unix_timestamp('2022-02-02 02:02:02') + 0.654321;
|
|
insert t1 (b,c) values (now(), now());
|
|
insert t1 (b,c) values (0,0);
|
|
insert t1 (a,b,c) values (0,0,now(6));
|
|
select * from t1;
|
|
a b c
|
|
2011-01-01 01:01:01.1234 2011-01-01 01:01:01.123456 2011-01-01 01:01:01.12
|
|
2010-10-10 10:10:10.1010 2010-10-10 10:10:10.101010 2010-10-10 10:10:10.10
|
|
2022-02-02 02:02:02.6543 2022-02-02 02:02:02 2022-02-02 02:02:02.00
|
|
2022-02-02 02:02:02.6543 0 0000-00-00 00:00:00.00
|
|
0000-00-00 00:00:00.0000 0 2022-02-02 02:02:02.65
|
|
connection slave;
|
|
connection slave;
|
|
set time_zone='+03:00';
|
|
select * from t1;
|
|
a b c
|
|
2011-01-01 01:01:01.1234 2011-01-01 01:01:01.123456 2011-01-01 01:01:01.12
|
|
2010-10-10 10:10:10.1010 2010-10-10 10:10:10.101010 2010-10-10 10:10:10.10
|
|
2022-02-02 02:02:02.6543 2022-02-02 02:02:02 2022-02-02 02:02:02.00
|
|
2022-02-02 02:02:02.6543 0 0000-00-00 00:00:00.00
|
|
0000-00-00 00:00:00.0000 0 2022-02-02 02:02:02.65
|
|
connection master;
|
|
drop table t1;
|
|
include/rpl_end.inc
|
|
/*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=1*/;
|
|
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
|
|
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
|
|
DELIMITER /*!*/;
|
|
ROLLBACK/*!*/;
|
|
use `test`/*!*/;
|
|
SET TIMESTAMP=1293832861/*!*/;
|
|
SET @@session.pseudo_thread_id=999999999/*!*/;
|
|
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
|
|
SET @@session.sql_mode=1411383296/*!*/;
|
|
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
|
|
/*!\C latin1 *//*!*/;
|
|
SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
|
|
SET @@session.lc_time_names=0/*!*/;
|
|
SET @@session.collation_database=DEFAULT/*!*/;
|
|
create table t1 (a timestamp(4) NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, b varchar(100), c datetime(2))
|
|
/*!*/;
|
|
BEGIN
|
|
/*!*/;
|
|
SET TIMESTAMP=1293832861.123456/*!*/;
|
|
SET @@session.time_zone='+03:00'/*!*/;
|
|
insert t1 (b,c) values (now(6), now(6))
|
|
/*!*/;
|
|
SET TIMESTAMP=1293832861.123456/*!*/;
|
|
COMMIT
|
|
/*!*/;
|
|
BEGIN
|
|
/*!*/;
|
|
SET TIMESTAMP=1293832861/*!*/;
|
|
insert t1 values ('2010-10-10 10:10:10.101010','2010-10-10 10:10:10.101010','2010-10-10 10:10:10.101010')
|
|
/*!*/;
|
|
SET TIMESTAMP=1293832861/*!*/;
|
|
COMMIT
|
|
/*!*/;
|
|
BEGIN
|
|
/*!*/;
|
|
SET TIMESTAMP=1643756522.654321/*!*/;
|
|
insert t1 (b,c) values (now(), now())
|
|
/*!*/;
|
|
SET TIMESTAMP=1643756522.654321/*!*/;
|
|
COMMIT
|
|
/*!*/;
|
|
BEGIN
|
|
/*!*/;
|
|
SET TIMESTAMP=1643756522.654321/*!*/;
|
|
insert t1 (b,c) values (0,0)
|
|
/*!*/;
|
|
SET TIMESTAMP=1643756522.654321/*!*/;
|
|
COMMIT
|
|
/*!*/;
|
|
BEGIN
|
|
/*!*/;
|
|
SET TIMESTAMP=1643756522.654321/*!*/;
|
|
insert t1 (a,b,c) values (0,0,now(6))
|
|
/*!*/;
|
|
SET TIMESTAMP=1643756522.654321/*!*/;
|
|
COMMIT
|
|
/*!*/;
|
|
SET TIMESTAMP=1643756522/*!*/;
|
|
DROP TABLE `t1` /* generated by server */
|
|
/*!*/;
|
|
DELIMITER ;
|
|
# End of log file
|
|
ROLLBACK /* added by mysqlbinlog */;
|
|
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
|
|
/*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=0*/;
|