Closes GH-6756.
?>
--FILE--
<?php
-$table_drop = "DROP TABLE IF EXISTS `bug66124`";
-$table_create = "CREATE TABLE `bug66124` (
+$table_drop = "DROP TABLE IF EXISTS `test`";
+$table_create = "CREATE TABLE `test` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8";
-$table_insert = "INSERT INTO `bug66124` SET `id`=?";
-$table_select = "SELECT * FROM `bug66124`";
-$table_delete = "DELETE FROM `bug66124`";
+$table_insert = "INSERT INTO `test` SET `id`=?";
+$table_select = "SELECT * FROM `test`";
+$table_delete = "DELETE FROM `test`";
$id = '1311200011005001566';
$link->close();
?>
done
+--CLEAN--
+<?php
+require_once "clean_table.inc";
+?>
--EXPECT--
Using 'i':
insert id:1311200011005001566=>1311200011005001566
$mysqli = new mysqli("$host:$port", $user, $passwd, $db);
-$tbl = "test_bug75018";
+$tbl = "test";
$sql = "DROP TABLE IF EXISTS $tbl";
$mysqli->query($sql);
var_dump($row['bit_column_1']);
}
+?>
+--CLEAN--
+<?php
+require_once "clean_table.inc";
?>
--EXPECT--
string(1) "0"
require_once("connect.inc");
$mysqli = new my_mysqli($host, $user, $passwd, $db, $port, $socket);
-$mysqli->query('DROP TABLE IF EXISTS a');
-$mysqli->query('CREATE TABLE a (b int)');
-$mysqli->query('INSERT INTO a VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9)');
+$mysqli->query('DROP TABLE IF EXISTS test');
+$mysqli->query('CREATE TABLE test (b int)');
+$mysqli->query('INSERT INTO test VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9)');
-$mysqli->real_query("SELECT * FROM a");
+$mysqli->real_query("SELECT * FROM test");
$result = $mysqli->store_result(MYSQLI_STORE_RESULT_COPY_DATA);
$field = $result->fetch_field();
var_dump($field->name);
+?>
+--CLEAN--
+<?php
+require_once "clean_table.inc";
?>
--EXPECT--
string(1) "b"
var_dump($row);
}
+?>
+--CLEAN--
+<?php
+require_once 'connect.inc';
+$link = new mysqli($host, $user, $passwd, $db, $port, $socket);
+$link->query('DROP PROCEDURE IF EXISTS testSp');
+$link->close();
?>
--EXPECT--
array(1) {
if (!function_exists('my_mysqli_connect')) {
/**
- * Whenever possible, please use this wrapper to make testing ot MYSQLI_CLIENT_COMPRESS (and potentially SSL) possible
+ * Whenever possible, please use this wrapper to make testing of MYSQLI_CLIENT_COMPRESS (and potentially SSL) possible
*
* @param enable_env_flags Enable setting of connection flags through env(MYSQL_TEST_CONNECT_FLAGS)?
*/
}
/**
- * Whenever possible, please use this wrapper to make testing ot MYSQLI_CLIENT_COMPRESS (and potentially SSL) possible
+ * Whenever possible, please use this wrapper to make testing of MYSQLI_CLIENT_COMPRESS (and potentially SSL) possible
*
* @param enable_env_flags Enable setting of connection flags through env(MYSQL_TEST_CONNECT_FLAGS)
*/
print "done!";
?>
+--CLEAN--
+<?php
+require_once 'connect.inc';
+$link = new mysqli($host, $user, $passwd, $db, $port, $socket);
+$link->query('DROP TABLE test__mysqli_insert_packet_overflow');
+$link->close();
+?>
--EXPECT--
done!
print "done!";
?>
+--CLEAN--
+<?php
+require_once 'connect.inc';
+$link = new mysqli($host, $user, $passwd, $db, $port, $socket);
+$link->query('DROP PROCEDURE IF EXISTS процедурка');
+$link->query('DROP FUNCTION IF EXISTS функцийка');
+$link->close();
+?>
--EXPECTF--
array(1) {
["правилен"]=>
?>
--CLEAN--
<?php
- require_once("connect.inc");
- if (!$link->query('DROP PROCEDURE IF EXISTS p123')) {
- printf("[001] [%d] %s\n", $link->error, $link->errno);
- }
+require_once 'connect.inc';
+$link = new mysqli($host, $user, $passwd, $db, $port, $socket);
+$link->query('DROP PROCEDURE IF EXISTS p123');
+$link->close();
?>
--EXPECT--
string(4) "pre:"
}
$stmt->next_result();
+?>
+--CLEAN--
+<?php
+require_once 'connect.inc';
+$link = new mysqli($host, $user, $passwd, $db, $port, $socket);
+$link->query('DROP PROCEDURE IF EXISTS testPs');
+$link->close();
?>
--EXPECT--
use_result:
}
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) {
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)");
var_dump($i["bit"]);
}
+?>
+--CLEAN--
+<?php
+require dirname(__FILE__) . '/mysql_pdo_test.inc';
+MySQLPDOTest::dropTestTable();
?>
--EXPECT--
int(1)
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
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]=>
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!