Skip to content

Commit 0678c05

Browse files
committed
use an existing table to test insert-ignore
1 parent c803576 commit 0678c05

File tree

6 files changed

+8
-19
lines changed

6 files changed

+8
-19
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ MySQLDump-PHP is the only library that supports:
2727
* dumps events.
2828
* does extended-insert and/or complete-insert.
2929
* supports virtual columns from MySQL 5.7.
30+
* does insert-ignore, like a REPLACE but ignoring errors if a duplicate key exists.
3031

3132
## Important
3233

tests/create_users.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ mysql -u root -e "CREATE DATABASE test009;"
1111
mysql -u root -e "CREATE DATABASE test010;"
1212
mysql -u root -e "CREATE DATABASE test011;"
1313
mysql -u root -e "CREATE DATABASE test012;"
14-
mysql -u root -e "CREATE DATABASE test013;"
1514
mysql -u root -e "GRANT ALL PRIVILEGES ON test001.* TO 'travis'@'%' WITH GRANT OPTION;"
1615
mysql -u root -e "GRANT ALL PRIVILEGES ON test002.* TO 'travis'@'%' WITH GRANT OPTION;"
1716
mysql -u root -e "GRANT ALL PRIVILEGES ON test005.* TO 'travis'@'%' WITH GRANT OPTION;"
@@ -22,7 +21,6 @@ mysql -u root -e "GRANT ALL PRIVILEGES ON test009.* TO 'travis'@'%' WITH GRANT O
2221
mysql -u root -e "GRANT ALL PRIVILEGES ON test010.* TO 'travis'@'%' WITH GRANT OPTION;"
2322
mysql -u root -e "GRANT ALL PRIVILEGES ON test011.* TO 'travis'@'%' WITH GRANT OPTION;"
2423
mysql -u root -e "GRANT ALL PRIVILEGES ON test012.* TO 'travis'@'%' WITH GRANT OPTION;"
25-
mysql -u root -e "GRANT ALL PRIVILEGES ON test013.* TO 'travis'@'%' WITH GRANT OPTION;"
2624
mysql -u root -e "GRANT SUPER,LOCK TABLES ON *.* TO 'travis'@'%';"
2725
mysql -u root -e "GRANT SELECT ON mysql.proc to 'travis'@'%';"
2826
mysql -u root -e "FLUSH PRIVILEGES;"

tests/delete_users.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ mysql -e "DROP DATABASE test009;"
1010
mysql -e "DROP DATABASE test010;"
1111
mysql -e "DROP DATABASE test011;"
1212
mysql -e "DROP DATABASE test012;"
13-
mysql -e "DROP DATABASE test013;"
1413

1514
mysql -e "DROP USER 'travis'";
1615

tests/test.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,10 +135,13 @@
135135

136136
print "starting mysql-php_test013.sql" . PHP_EOL;
137137
$dump = new IMysqldump\Mysqldump(
138-
"mysql:unix_socket=/var/run/mysqld/mysqld.sock;dbname=test013",
138+
"mysql:unix_socket=/var/run/mysqld/mysqld.sock;dbname=test001",
139139
"travis",
140140
"",
141-
array("insert-ignore" => true));
141+
array(
142+
"insert-ignore" => true,
143+
"extended-insert" => false
144+
));
142145
$dump->start("mysqldump-php_test013.sql");
143146

144147
exit(0);

tests/test.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ mysql -utravis < test009.src.sql; ret[((index++))]=$?
3333
mysql -utravis < test010.src.sql; ret[((index++))]=$?
3434
mysql -utravis < test011.src.sql; ret[((index++))]=$?
3535
mysql -utravis < test012.src.sql; ret[((index++))]=$?
36-
mysql -utravis < test013.src.sql; ret[((index++))]=$?
36+
#mysql -utravis < test013.src.sql; ret[((index++))]=$?
3737

3838
checksum_test001 > test001.src.checksum
3939
checksum_test002 > test002.src.checksum
@@ -70,7 +70,7 @@ mysqldump -utravis test012 \
7070
> mysqldump_test012.sql
7171
ret[((index++))]=$?
7272

73-
mysqldump -utravis test013 \
73+
mysqldump -utravis test001 \
7474
--no-autocommit \
7575
--extended-insert=false \
7676
--hex-blob=true \

tests/test013.src.sql

Lines changed: 0 additions & 12 deletions
This file was deleted.

0 commit comments

Comments
 (0)