Skip to content

Commit 8fedd85

Browse files
1 parent 23cd56b commit 8fedd85

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

ext/pdo_mysql/tests/pdo_mysql_prepare_native.phpt

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -157,10 +157,10 @@ $db = MySQLPDOTest::factory();
157157
if (count(($tmp = $stmt->fetchAll(PDO::FETCH_ASSOC))) != 0)
158158
printf("[019] '1' IS NOT NULL evaluates to true, expecting zero rows, got %d rows\n", $tmp);
159159

160-
prepex(20, $db, 'DROP TABLE IF EXISTS test_prepare_native');
161-
prepex(21, $db, 'CREATE TABLE test_prepare_native(id INT, label CHAR(255)) ENGINE=MyISAM');
162-
// Not every MySQL Server version supports this
163-
if (is_object(prepex(22, $db, 'CREATE FULLTEXT INDEX idx1 ON test_prepare_native(label)', null, null, true))) {
160+
prepex(20, $db, 'DROP TABLE IF EXISTS test_prepare_native');
161+
prepex(21, $db, 'CREATE TABLE test_prepare_native(id INT, label CHAR(255)) ENGINE=MyISAM');
162+
// Not every MySQL Server version supports this
163+
if (is_object(prepex(22, $db, 'CREATE FULLTEXT INDEX idx1 ON test_prepare_native(label)', null, null, true))) {
164164
prepex(23, $db, 'INSERT INTO test_prepare_native(id, label) VALUES (1, :placeholder)',
165165
array(':placeholder' => 'MySQL is the best database in the world!'));
166166
prepex(24, $db, 'INSERT INTO test_prepare_native(id, label) VALUES (2, :placeholder)',
@@ -185,8 +185,7 @@ $db = MySQLPDOTest::factory();
185185
}
186186

187187
$db->exec('DELETE FROM test_prepare_native');
188-
$db->exec("INSERT INTO test_prepare_native(id, label) VALUES (1, 'row1')");
189-
$db->exec("INSERT INTO test_prepare_native(id, label) VALUES (2, 'row2')");
188+
$db->exec("INSERT INTO test_prepare_native(id, label) VALUES (1, 'row1'), (2, 'row2')");
190189

191190
$sql = sprintf("SELECT id, label FROM test_prepare_native WHERE (label LIKE %s) AND (id = :placeholder)",
192191
$db->quote('%ro%'));

0 commit comments

Comments
 (0)