mirror of
https://github.com/php/php-src.git
synced 2024-12-03 06:44:07 +08:00
fixed testcase 047
fixed windows compile error
This commit is contained in:
parent
7be33a225e
commit
dc63cb7feb
@ -982,6 +982,7 @@ PHP_FUNCTION(mysqli_info)
|
||||
Initialize mysqli and return a resource for use with mysql_real_connect */
|
||||
PHP_FUNCTION(mysqli_init)
|
||||
{
|
||||
MYSQLI_RESOURCE *mysqli_resource;
|
||||
MY_MYSQL *mysql = (MY_MYSQL *)calloc(1, sizeof(MY_MYSQL));
|
||||
|
||||
if (!(mysql->mysql = mysql_init(NULL))) {
|
||||
@ -989,7 +990,7 @@ PHP_FUNCTION(mysqli_init)
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
MYSQLI_RESOURCE *mysqli_resource = (MYSQLI_RESOURCE *)ecalloc (1, sizeof(MYSQLI_RESOURCE));
|
||||
mysqli_resource = (MYSQLI_RESOURCE *)ecalloc (1, sizeof(MYSQLI_RESOURCE));
|
||||
mysqli_resource->ptr = (void *)mysql;
|
||||
MYSQLI_RETURN_RESOURCE(mysqli_resource, mysqli_link_class_entry);
|
||||
}
|
||||
|
@ -12,7 +12,7 @@ mysqli_get_metadata
|
||||
mysqli_select_db($link, "test");
|
||||
|
||||
mysqli_query($link, "DROP TABLE IF EXISTS test_affected");
|
||||
mysqli_query($link, "CREATE TABLE test_affected (foo int, bar varchar(10))");
|
||||
mysqli_query($link, "CREATE TABLE test_affected (foo int, bar varchar(10) character set latin1)");
|
||||
|
||||
mysqli_query($link, "INSERT INTO test_affected VALUES (1, 'Zak'),(2, 'Greant')");
|
||||
|
||||
@ -31,7 +31,7 @@ mysqli_get_metadata
|
||||
--EXPECTF--
|
||||
array(2) {
|
||||
[0]=>
|
||||
object(stdClass)#%d (9) {
|
||||
object(stdClass)#4 (11) {
|
||||
["name"]=>
|
||||
string(3) "foo"
|
||||
["orgname"]=>
|
||||
@ -44,6 +44,10 @@ array(2) {
|
||||
string(0) ""
|
||||
["max_length"]=>
|
||||
int(0)
|
||||
["length"]=>
|
||||
int(11)
|
||||
["charsetnr"]=>
|
||||
int(63)
|
||||
["flags"]=>
|
||||
int(32768)
|
||||
["type"]=>
|
||||
@ -52,7 +56,7 @@ array(2) {
|
||||
int(0)
|
||||
}
|
||||
[1]=>
|
||||
object(stdClass)#%d (9) {
|
||||
object(stdClass)#5 (11) {
|
||||
["name"]=>
|
||||
string(3) "bar"
|
||||
["orgname"]=>
|
||||
@ -65,6 +69,10 @@ array(2) {
|
||||
string(0) ""
|
||||
["max_length"]=>
|
||||
int(0)
|
||||
["length"]=>
|
||||
int(10)
|
||||
["charsetnr"]=>
|
||||
int(8)
|
||||
["flags"]=>
|
||||
int(0)
|
||||
["type"]=>
|
||||
|
Loading…
Reference in New Issue
Block a user