-
Notifications
You must be signed in to change notification settings - Fork 95
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Removed: support for lesser then php7 - Added: strong and string types - Changed: ConfigFactory removed and method make form array moved to Config - Changed: MariaDbGtidLogDTO replaced getSequenceNumber with getMariaDbGtid - Fixed: Insert NULL in a boolean column returns no rows - Fixed: float problem about time field type - Fixed: column order - Changed: getFields and getMasterStatus returns no VO - Changed: Column to ColumnDTO and added ColumnDTOCollection - Changed: replaced getFields with getColumnDTOCollection in TableMap - Added: more compatibility for mysql 5.5, 5.6, 5.7, maria 10 and 8.0 - Removed: makeConfigFromArray
- Loading branch information
Showing
87 changed files
with
2,265 additions
and
3,920 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,59 +1,54 @@ | ||
dist: trusty | ||
dist: xenial | ||
|
||
language: php | ||
|
||
php: | ||
- 5.6 | ||
- 7.0 | ||
- 7.1 | ||
- 7.2 | ||
env: | ||
- DB=mysql57 | ||
- DB=mysql56 | ||
- DB=mariadb | ||
|
||
cache: | ||
apt: true | ||
cache: | ||
bundler: true | ||
directories: | ||
- $HOME/.composer/cache | ||
|
||
sudo: required | ||
|
||
before_script: | ||
- "sudo /etc/init.d/mysql stop || true" | ||
- "sudo apt-get remove mysql* -y --purge" | ||
- "if [ $DB = 'mysql57' ]; then echo deb http://repo.mysql.com/apt/ubuntu/ trusty mysql-5.7 | sudo tee /etc/apt/sources.list.d/mysql.list; sudo apt-get update; sudo apt-get install mysql-server -y --allow-unauthenticated; fi" | ||
- "if [ $DB = 'mysql56' ]; then echo deb http://repo.mysql.com/apt/ubuntu/ trusty mysql-5.6 | sudo tee /etc/apt/sources.list.d/mysql.list; sudo apt-get update; sudo apt-get install mysql-server -y --allow-unauthenticated; fi" | ||
- "if [ $DB = 'mariadb' ]; then sudo rm -rf /var/lib/mysql /etc/mysql; echo deb http://ftp.hosteurope.de/mirror/mariadb.org/repo/10.3/ubuntu trusty main | sudo tee /etc/apt/sources.list.d/mysql.list; sudo apt-get update; sudo apt-get install mariadb-server-10.3 -y --allow-unauthenticated; fi" | ||
- "sudo mysql_upgrade --force" | ||
|
||
# Config | ||
- "echo '[mysqld]' | sudo tee /etc/mysql/conf.d/replication.cnf" | ||
- "echo 'log-bin=mysql-bin' | sudo tee -a /etc/mysql/conf.d/replication.cnf" | ||
- "echo 'server-id=1' | sudo tee -a /etc/mysql/conf.d/replication.cnf" | ||
- "echo 'binlog-format= row' | sudo tee -a /etc/mysql/conf.d/replication.cnf" | ||
- "echo 'max_allowed_packet= 64M' | sudo tee -a /etc/mysql/conf.d/replication.cnf" | ||
- "echo 'innodb_log_file_size= 250M' | sudo tee -a /etc/mysql/conf.d/replication.cnf" | ||
- "cat /etc/mysql/conf.d/replication.cnf" | ||
|
||
# Enable GTID (only for mysql 5.*) | ||
- "if [ $DB != 'mariadb' ]; then echo '[mysqld]' | sudo tee /etc/mysql/conf.d/gtid.cnf; echo 'gtid_mode=ON' | sudo tee -a /etc/mysql/conf.d/gtid.cnf; echo 'enforce_gtid_consistency' | sudo tee -a /etc/mysql/conf.d/gtid.cnf; echo 'binlog_format=ROW' | sudo tee -a /etc/mysql/conf.d/gtid.cnf; echo 'log_slave_updates' | sudo tee -a /etc/mysql/conf.d/gtid.cnf; cat /etc/mysql/conf.d/gtid.cnf; fi" | ||
services: | ||
- docker | ||
|
||
matrix: | ||
include: | ||
- env: | ||
- DB=mariadb:5.5 | ||
php: "7.1" | ||
- env: | ||
- DB=mysql:5.5 | ||
php: "7.1" | ||
- env: | ||
- DB=mysql:5.6 | ||
php: "7.1" | ||
- env: | ||
- DB=mysql:5.7 | ||
php: "7.1" | ||
- env: | ||
- DB=mysql:8.0 | ||
- TEST_AUTH=yes | ||
php: "7.1" | ||
- env: | ||
- DB=mariadb:5.5 | ||
php: "7.2" | ||
- env: | ||
- DB=mysql:5.5 | ||
php: "7.2" | ||
- env: | ||
- DB=mysql:5.6 | ||
php: "7.2" | ||
- env: | ||
- DB=mysql:5.7 | ||
php: "7.2" | ||
- env: | ||
- DB=mysql:8.0 | ||
- TEST_AUTH=yes | ||
php: "7.2" | ||
|
||
# Start mysql (avoid errors to have logs)/var/lib/mysql | ||
- "sudo /etc/init.d/mysql restart || true" | ||
- "sudo tail -1000 /var/log/syslog" | ||
|
||
- "mysql --version" | ||
- "mysql -u root -e 'SELECT VERSION();'" | ||
- "mysql -u root -e \"GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost';\"" | ||
- "mysql_tzinfo_to_sql /usr/share/zoneinfo/ | mysql -u root mysql" | ||
|
||
- if [ $DB = 'mysql56' ]; then echo "USE mysql;\nUPDATE user SET password=PASSWORD('root') WHERE user='root';\nFLUSH PRIVILEGES;\n" | mysql -u root; fi | ||
- if [ $DB = 'mysql57' ]; then echo "USE mysql;\nUPDATE user SET authentication_string=PASSWORD('root') WHERE user='root';\nFLUSH PRIVILEGES;\n" | mysql -u root; fi | ||
- if [ $DB = 'mariadb' ]; then echo "USE mysql;\nUPDATE user SET password=PASSWORD('root') WHERE User='root';\nFLUSH PRIVILEGES;\n" | mysql -u root; fi | ||
before_script: | ||
- ./.travis/initializedb.sh | ||
|
||
install: | ||
travis_retry composer install --no-interaction --prefer-source; | ||
|
||
script: vendor/bin/phpunit | ||
travis_retry composer install --no-interaction --prefer-source; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
#!/bin/bash | ||
|
||
set -ex | ||
|
||
if [ $DB == 'mysql:8.0' ]; then | ||
docker run -p 0.0.0.0:3306:3306 -e MYSQL_ROOT_PASSWORD=root -e MYSQL_ROOT_HOST=% --name=mysql -d ${DB} \ | ||
mysqld \ | ||
--datadir=/var/lib/mysql \ | ||
--user=mysql \ | ||
--server-id=1 \ | ||
--log-bin=/var/lib/mysql/mysql-bin.log \ | ||
--binlog-format=row \ | ||
--max_allowed_packet=64M \ | ||
--default_authentication_plugin=mysql_native_password | ||
else | ||
docker run -p 0.0.0.0:3306:3306 -e MYSQL_ROOT_PASSWORD=root -e MYSQL_ROOT_HOST=% --name=mysql -d ${DB} \ | ||
mysqld \ | ||
--datadir=/var/lib/mysql \ | ||
--user=mysql \ | ||
--server-id=1 \ | ||
--log-bin=/var/lib/mysql/mysql-bin.log \ | ||
--binlog-format=row \ | ||
--max_allowed_packet=64M | ||
fi | ||
|
||
mysql() { | ||
docker exec mysql mysql -proot "${@}" | ||
} | ||
while : | ||
do | ||
sleep 3 | ||
mysql --protocol=tcp -e 'select version()' && break | ||
done | ||
|
||
docker logs mysql | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.