summaryrefslogtreecommitdiff
path: root/ext/pdo_mysql
diff options
context:
space:
mode:
authorDharman <tekiela246@gmail.com>2021-03-05 22:26:55 +0000
committerNikita Popov <nikita.ppv@gmail.com>2021-03-15 11:01:12 +0100
commit8573eb9e5cfc75d4aae290928a6b5b985b15166d (patch)
tree7a4a39d21413fbb72c953eb184b846f7f76b4d69 /ext/pdo_mysql
parent3b9ea4d2893602386a7f900ae2ababfd9c58ce47 (diff)
downloadphp-git-8573eb9e5cfc75d4aae290928a6b5b985b15166d.tar.gz
Add CLEAN sections to mysqli and PDO mysql tests
Closes GH-6756.
Diffstat (limited to 'ext/pdo_mysql')
-rw-r--r--ext/pdo_mysql/tests/bug63185.phpt6
-rw-r--r--ext/pdo_mysql/tests/bug75177.phpt7
-rw-r--r--ext/pdo_mysql/tests/bug76815.phpt7
-rw-r--r--ext/pdo_mysql/tests/bug_41997.phpt6
-rw-r--r--ext/pdo_mysql/tests/pdo_mysql_stmt_variable_columncount.phpt6
5 files changed, 31 insertions, 1 deletions
diff --git a/ext/pdo_mysql/tests/bug63185.phpt b/ext/pdo_mysql/tests/bug63185.phpt
index 4bf6d7e4db..92221942e2 100644
--- a/ext/pdo_mysql/tests/bug63185.phpt
+++ b/ext/pdo_mysql/tests/bug63185.phpt
@@ -42,6 +42,12 @@ try {
var_dump($st->fetchAll());
?>
+--CLEAN--
+<?php
+require_once __DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc';
+$pdo = MySQLPDOTest::factory();
+$pdo->query('DROP PROCEDURE IF EXISTS test_procedure_error_at_second');
+?>
--EXPECTF--
array(1) {
[0]=>
diff --git a/ext/pdo_mysql/tests/bug75177.phpt b/ext/pdo_mysql/tests/bug75177.phpt
index b580c9a929..104734f3ac 100644
--- a/ext/pdo_mysql/tests/bug75177.phpt
+++ b/ext/pdo_mysql/tests/bug75177.phpt
@@ -12,7 +12,7 @@ if (!MySQLPDOTest::isPDOMySQLnd()) die('skip only for mysqlnd');
require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc');
$pdo = MySQLPDOTest::factory();
-$tbl = "tbl_bug75177";
+$tbl = "test";
$pdo->query("DROP TABLE IF EXISTS $tbl");
$pdo->query("CREATE TABLE $tbl (`bit` bit(8)) ENGINE=InnoDB");
$pdo->query("INSERT INTO $tbl (`bit`) VALUES (1)");
@@ -32,6 +32,11 @@ foreach ($ret as $i) {
}
?>
+--CLEAN--
+<?php
+require dirname(__FILE__) . '/mysql_pdo_test.inc';
+MySQLPDOTest::dropTestTable();
+?>
--EXPECT--
int(1)
int(3)
diff --git a/ext/pdo_mysql/tests/bug76815.phpt b/ext/pdo_mysql/tests/bug76815.phpt
index b5c8577b07..4e627e0ff7 100644
--- a/ext/pdo_mysql/tests/bug76815.phpt
+++ b/ext/pdo_mysql/tests/bug76815.phpt
@@ -28,6 +28,13 @@ unset($st);
echo "Ok.\n";
?>
+--CLEAN--
+<?php
+require_once __DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc';
+$pdo = MySQLPDOTest::factory();
+$pdo->query('DROP FUNCTION IF EXISTS tst');
+$pdo->query('DROP PROCEDURE IF EXISTS tst2');
+?>
--EXPECT--
SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column 'tst()' at row 1
Ok.
diff --git a/ext/pdo_mysql/tests/bug_41997.phpt b/ext/pdo_mysql/tests/bug_41997.phpt
index 8d20ed737e..270e65398d 100644
--- a/ext/pdo_mysql/tests/bug_41997.phpt
+++ b/ext/pdo_mysql/tests/bug_41997.phpt
@@ -37,6 +37,12 @@ var_dump($stmt->fetchAll(PDO::FETCH_ASSOC));
var_dump($stmt->errorInfo());
print "done!";
?>
+--CLEAN--
+<?php
+require_once __DIR__ . '/mysql_pdo_test.inc';
+$db = MySQLPDOTest::factory();
+$db->exec("DROP PROCEDURE IF EXISTS p");
+?>
--EXPECT--
array(1) {
[0]=>
diff --git a/ext/pdo_mysql/tests/pdo_mysql_stmt_variable_columncount.phpt b/ext/pdo_mysql/tests/pdo_mysql_stmt_variable_columncount.phpt
index 110710dd11..5e70861816 100644
--- a/ext/pdo_mysql/tests/pdo_mysql_stmt_variable_columncount.phpt
+++ b/ext/pdo_mysql/tests/pdo_mysql_stmt_variable_columncount.phpt
@@ -117,5 +117,11 @@ if ($version < 50000)
print "done!";
?>
+--CLEAN--
+<?php
+require_once __DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc';
+$pdo = MySQLPDOTest::factory();
+$pdo->query('DROP PROCEDURE IF EXISTS p');
+?>
--EXPECT--
done!