Skip to content

Commit 3c51385

Browse files
authored
Merge pull request #3 from kobi97/improve/upgrade_php_mysql_replication
Improve/upgrade php mysql replication 5.0.5
2 parents 89ae633 + 0120a27 commit 3c51385

File tree

10 files changed

+136
-119
lines changed

10 files changed

+136
-119
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ before_script:
1919
- docker run -p 13306:3306 --name db-master -e MYSQL_ROOT_PASSWORD=1234 -d db-master
2020
- docker run -p 13307:3306 --name db-slave --link db-master:master -e MYSQL_ROOT_PASSWORD=1234 -d db-slave
2121
- docker run -p 13308:3306 --name db-slave-slave --link db-slave:slave -e MYSQL_ROOT_PASSWORD=1234 -d db-slave-slave
22-
- sleep 20;
22+
- sleep 60;
2323
- docker exec -it db-master bash -c "mysql -uroot -p1234 < temp/my.master.sql"
2424
- sleep 5;
2525
- docker exec -it db-slave bash -c "mysql -uroot -p1234 < temp/my.slave.sql"

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
55
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
66

7+
## [1.1.1] - 2018-11-12
8+
###CHANGED
9+
- upgrade php-mysql-replication v5.0.5
10+
-- fixed support to recive more than 16Mbyte + tests
11+
- change mariadb's confs
12+
713
## [1.1.0] - 2018-08-13
814

915
### CHANGED

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
],
1212
"require": {
1313
"illuminate/support": "^5.4",
14-
"krowinski/php-mysql-replication": "5.0.4",
14+
"krowinski/php-mysql-replication": "5.0.5",
1515
"monolog/monolog": "^1.18.0",
1616
"ridibooks/platform-gnfdb": "^0.1",
1717
"vlucas/phpdotenv": "^2.4",

composer.lock

Lines changed: 111 additions & 106 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

demo/Resources/docker/db-master/my.master.cnf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ skip-external-locking
5353
max_connections = 100
5454
connect_timeout = 5
5555
wait_timeout = 600
56-
max_allowed_packet = 16M
56+
max_allowed_packet = 64M
5757
thread_cache_size = 128
5858
sort_buffer_size = 4M
5959
bulk_insert_buffer_size = 16M
@@ -135,7 +135,7 @@ max_binlog_size = 100M
135135
# Read the manual for more InnoDB related options. There are many!
136136
default_storage_engine = InnoDB
137137
# you can't just change log file size, requires special procedure
138-
#innodb_log_file_size = 50M
138+
innodb_log_file_size = 250M
139139
innodb_buffer_pool_size = 256M
140140
innodb_log_buffer_size = 8M
141141
innodb_file_per_table = 1

demo/Resources/docker/db-slave-slave/my.slave-slave.cnf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ skip-external-locking
5353
max_connections = 100
5454
connect_timeout = 5
5555
wait_timeout = 600
56-
max_allowed_packet = 16M
56+
max_allowed_packet = 64M
5757
thread_cache_size = 128
5858
sort_buffer_size = 4M
5959
bulk_insert_buffer_size = 16M
@@ -136,7 +136,7 @@ log_slave_updates
136136
# Read the manual for more InnoDB related options. There are many!
137137
default_storage_engine = InnoDB
138138
# you can't just change log file size, requires special procedure
139-
#innodb_log_file_size = 50M
139+
innodb_log_file_size = 250M
140140
innodb_buffer_pool_size = 256M
141141
innodb_log_buffer_size = 8M
142142
innodb_file_per_table = 1

demo/Resources/docker/db-slave-slave/sql/my.slave-slave.sql

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ CREATE TABLE IF NOT EXISTS `platform_universal_history_3_column` (
3838
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
3939
`row_id` bigint(20) unsigned NOT NULL COMMENT '수정 row No',
4040
`column` varchar(64) COLLATE utf8_unicode_ci NOT NULL COMMENT '컬럼',
41-
`data_before` text COLLATE utf8_unicode_ci COMMENT '수정 전',
42-
`data_after` text COLLATE utf8_unicode_ci COMMENT '수정 후',
41+
`data_before` longtext COLLATE utf8_unicode_ci COMMENT '수정 전',
42+
`data_after` longtext COLLATE utf8_unicode_ci COMMENT '수정 후',
4343
PRIMARY KEY (`id`),
4444
UNIQUE KEY `row_column` (`row_id`,`column`),
4545
CONSTRAINT `row_id` FOREIGN KEY (`row_id`) REFERENCES `platform_universal_history_3_row` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
@@ -94,8 +94,8 @@ CREATE TABLE IF NOT EXISTS `platform_once_history_3_column` (
9494
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
9595
`row_id` bigint(20) unsigned NOT NULL COMMENT '수정 row No',
9696
`column` varchar(64) COLLATE utf8_unicode_ci NOT NULL COMMENT '컬럼',
97-
`data_before` text COLLATE utf8_unicode_ci COMMENT '수정 전',
98-
`data_after` text COLLATE utf8_unicode_ci COMMENT '수정 후',
97+
`data_before` longtext COLLATE utf8_unicode_ci COMMENT '수정 전',
98+
`data_after` longtext COLLATE utf8_unicode_ci COMMENT '수정 후',
9999
PRIMARY KEY (`id`),
100100
UNIQUE KEY `row_column` (`row_id`,`column`),
101101
CONSTRAINT `once_row_id` FOREIGN KEY (`row_id`) REFERENCES `platform_once_history_3_row` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION

demo/Resources/docker/db-slave/my.slave.cnf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ skip-external-locking
5353
max_connections = 100
5454
connect_timeout = 5
5555
wait_timeout = 600
56-
max_allowed_packet = 16M
56+
max_allowed_packet = 64M
5757
thread_cache_size = 128
5858
sort_buffer_size = 4M
5959
bulk_insert_buffer_size = 16M
@@ -136,7 +136,7 @@ log_slave_updates
136136
# Read the manual for more InnoDB related options. There are many!
137137
default_storage_engine = InnoDB
138138
# you can't just change log file size, requires special procedure
139-
#innodb_log_file_size = 50M
139+
innodb_log_file_size = 250M
140140
innodb_buffer_pool_size = 256M
141141
innodb_log_buffer_size = 8M
142142
innodb_file_per_table = 1

demo/Resources/mariadb/change.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ server-id = 1
33
log_bin = /var/log/mysql/mariadb-bin
44
log_bin_index = /var/log/mysql/mariadb-bin.index
55
binlog-format = row
6+
innodb_log_file_size = 250M
7+
max_allowed_packet = 64M
68

79
my.cnf 변경 -> my.slave.cnf
810
server-id = 2
@@ -14,6 +16,8 @@ relay_log_index = /var/log/mysql/relay-bin.index
1416
relay_log_info_file = /var/log/mysql/relay-bin.info
1517
log_slave_updates
1618
binlog-format = row
19+
innodb_log_file_size = 250M
20+
max_allowed_packet = 64M
1721

1822
my.cnf 변경 -> my.slave-slave.cnf
1923
server-id = 3
@@ -25,3 +29,5 @@ relay_log_index = /var/log/mysql/relay-bin.index
2529
relay_log_info_file = /var/log/mysql/relay-bin.info
2630
log_slave_updates
2731
binlog-format = row
32+
innodb_log_file_size = 250M
33+
max_allowed_packet = 64M

demo/Resources/tools/generate.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
#! /bin/bash
2-
php generate_test_sql.php > docker/db-master/sql/my.master.init_test.sql
2+
php generate_test_sql.php > ../docker/db-master/sql/my.master.init_test.sql

0 commit comments

Comments
 (0)