Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/roundcube/roundcubemail.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2019-11-11 16:53:41 +0300
committerAleksander Machniak <alec@alec.pl>2019-11-11 16:53:41 +0300
commita80d73602f025009b1a21d0aad521d4ac6e51e51 (patch)
tree04c5127d35b418ca33a545a617d4e58de83aa8cd /tests
parentb8555ce4f33e75301233245b185651c28929d39b (diff)
Fix db_prefix handling in queries with `TRUNCATE TABLE <name>` and `UNIQUE <name>` (#7013)
Diffstat (limited to 'tests')
-rw-r--r--tests/Framework/DB.php9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/Framework/DB.php b/tests/Framework/DB.php
index 2d27a0893..4350675e9 100644
--- a/tests/Framework/DB.php
+++ b/tests/Framework/DB.php
@@ -34,19 +34,28 @@ class Framework_DB extends PHPUnit_Framework_TestCase
"-- test comment",
"ALTER TABLE `xxx` CHANGE test test int;",
"TRUNCATE xxx;",
+ "TRUNCATE TABLE xxx;",
"DROP TABLE `vvv`;",
"CREATE TABLE `i` (test int CONSTRAINT `iii`
FOREIGN KEY (`test`) REFERENCES `xxx`(`test`) ON DELETE CASCADE ON UPDATE CASCADE);",
+ "CREATE TABLE `i` (`test` int, INDEX `testidx` (`test`))",
+ "CREATE TABLE `i` (`test` int, UNIQUE `testidx` (`test`))",
+ "CREATE TABLE `i` (`test` int, UNIQUE INDEX `testidx` (`test`))",
"INSERT INTO xxx test = 1;",
"SELECT test FROM xxx;",
));
+
$output = implode("\n", array(
"CREATE TABLE `prefix_xxx` (test int, INDEX prefix_xxx (test))",
"ALTER TABLE `prefix_xxx` CHANGE test test int",
"TRUNCATE prefix_xxx",
+ "TRUNCATE TABLE prefix_xxx",
"DROP TABLE `prefix_vvv`",
"CREATE TABLE `prefix_i` (test int CONSTRAINT `prefix_iii`
FOREIGN KEY (`test`) REFERENCES `prefix_xxx`(`test`) ON DELETE CASCADE ON UPDATE CASCADE)",
+ "CREATE TABLE `prefix_i` (`test` int, INDEX `prefix_testidx` (`test`))",
+ "CREATE TABLE `prefix_i` (`test` int, UNIQUE `prefix_testidx` (`test`))",
+ "CREATE TABLE `prefix_i` (`test` int, UNIQUE INDEX `prefix_testidx` (`test`))",
"INSERT INTO prefix_xxx test = 1",
"SELECT test FROM prefix_xxx",
));