summaryrefslogtreecommitdiff
path: root/ext/mysqli/tests
diff options
context:
space:
mode:
Diffstat (limited to 'ext/mysqli/tests')
-rw-r--r--ext/mysqli/tests/001.phpt47
-rw-r--r--ext/mysqli/tests/002.phpt63
-rw-r--r--ext/mysqli/tests/003.phpt58
-rw-r--r--ext/mysqli/tests/004.phpt60
-rw-r--r--ext/mysqli/tests/005.phpt40
-rw-r--r--ext/mysqli/tests/006.phpt54
-rw-r--r--ext/mysqli/tests/007.phpt54
-rw-r--r--ext/mysqli/tests/008.phpt54
-rw-r--r--ext/mysqli/tests/009.phpt79
-rw-r--r--ext/mysqli/tests/010.phpt59
-rw-r--r--ext/mysqli/tests/011.phpt57
-rw-r--r--ext/mysqli/tests/012.phpt58
-rw-r--r--ext/mysqli/tests/013.phpt52
-rw-r--r--ext/mysqli/tests/014.phpt69
-rw-r--r--ext/mysqli/tests/015.phpt69
-rw-r--r--ext/mysqli/tests/016.phpt27
-rw-r--r--ext/mysqli/tests/017.phpt35
-rw-r--r--ext/mysqli/tests/018.phpt27
-rw-r--r--ext/mysqli/tests/019.phpt71
-rw-r--r--ext/mysqli/tests/020.phpt67
-rw-r--r--ext/mysqli/tests/021.phpt42
-rw-r--r--ext/mysqli/tests/022.phpt46
-rw-r--r--ext/mysqli/tests/023.phpt65
-rw-r--r--ext/mysqli/tests/024.phpt66
-rw-r--r--ext/mysqli/tests/025.phpt70
-rw-r--r--ext/mysqli/tests/026.phpt49
-rw-r--r--ext/mysqli/tests/027.phpt20
-rw-r--r--ext/mysqli/tests/028.phpt19
-rw-r--r--ext/mysqli/tests/029.phpt25
-rw-r--r--ext/mysqli/tests/030.phpt25
-rw-r--r--ext/mysqli/tests/031.phpt25
-rw-r--r--ext/mysqli/tests/032.phpt25
-rw-r--r--ext/mysqli/tests/033.phpt20
-rw-r--r--ext/mysqli/tests/034.phpt20
-rw-r--r--ext/mysqli/tests/035.phpt19
-rw-r--r--ext/mysqli/tests/036.phpt51
-rw-r--r--ext/mysqli/tests/037.phpt36
-rw-r--r--ext/mysqli/tests/038.phpt33
-rw-r--r--ext/mysqli/tests/039.phpt26
-rw-r--r--ext/mysqli/tests/040.phpt33
-rw-r--r--ext/mysqli/tests/041.phpt22
-rw-r--r--ext/mysqli/tests/042.phpt62
-rw-r--r--ext/mysqli/tests/043.phpt42
-rw-r--r--ext/mysqli/tests/044.phpt21
-rw-r--r--ext/mysqli/tests/045.phpt46
-rw-r--r--ext/mysqli/tests/046.phpt33
-rw-r--r--ext/mysqli/tests/047.phpt196
-rw-r--r--ext/mysqli/tests/048.phpt62
-rw-r--r--ext/mysqli/tests/049.phpt26
-rw-r--r--ext/mysqli/tests/050.phpt21
-rw-r--r--ext/mysqli/tests/051.phpt22
-rw-r--r--ext/mysqli/tests/052.phpt22
-rw-r--r--ext/mysqli/tests/053.phpt20
-rw-r--r--ext/mysqli/tests/054.phpt20
-rw-r--r--ext/mysqli/tests/055.phpt19
-rw-r--r--ext/mysqli/tests/056.phpt21
-rw-r--r--ext/mysqli/tests/057.phpt54
-rw-r--r--ext/mysqli/tests/058.phpt57
-rw-r--r--ext/mysqli/tests/059.phpt41
-rw-r--r--ext/mysqli/tests/060.phpt60
-rw-r--r--ext/mysqli/tests/061.phpt44
-rw-r--r--ext/mysqli/tests/062.phpt25
-rw-r--r--ext/mysqli/tests/063.phpt21
-rw-r--r--ext/mysqli/tests/064.phpt21
-rw-r--r--ext/mysqli/tests/065.phpt41
-rw-r--r--ext/mysqli/tests/066.phpt28
-rw-r--r--ext/mysqli/tests/067.phpt51
-rw-r--r--ext/mysqli/tests/068.phpt33
-rw-r--r--ext/mysqli/tests/071.phpt36
-rw-r--r--ext/mysqli/tests/072.phpt27
-rw-r--r--ext/mysqli/tests/073.phpt23
-rw-r--r--ext/mysqli/tests/bug28817.phpt39
-rw-r--r--ext/mysqli/tests/bug29311.phpt48
-rw-r--r--ext/mysqli/tests/bug30967.phpt23
-rw-r--r--ext/mysqli/tests/bug31141.phpt28
-rw-r--r--ext/mysqli/tests/bug31668.phpt56
-rw-r--r--ext/mysqli/tests/bug32405.phpt39
-rw-r--r--ext/mysqli/tests/bug33090.phpt21
-rw-r--r--ext/mysqli/tests/bug33263.phpt32
-rw-r--r--ext/mysqli/tests/bug33491.phpt26
-rw-r--r--ext/mysqli/tests/bug34785.phpt47
-rw-r--r--ext/mysqli/tests/bug34810.phpt39
-rw-r--r--ext/mysqli/tests/bug35103.phpt68
-rw-r--r--ext/mysqli/tests/bug35517.phpt29
-rw-r--r--ext/mysqli/tests/bug35759.phpt44
-rw-r--r--ext/mysqli/tests/bug36420.phpt25
-rw-r--r--ext/mysqli/tests/bug36745.phpt23
-rw-r--r--ext/mysqli/tests/bug36802.phpt46
-rw-r--r--ext/mysqli/tests/bug36949.phpt50
-rw-r--r--ext/mysqli/tests/bug37090.phpt37
-rw-r--r--ext/mysqli/tests/bug38003.phpt20
-rw-r--r--ext/mysqli/tests/connect.inc25
-rw-r--r--ext/mysqli/tests/skipif.inc10
-rw-r--r--ext/mysqli/tests/skipifemb.inc5
-rw-r--r--ext/mysqli/tests/skipifnotemb.inc5
95 files changed, 0 insertions, 3817 deletions
diff --git a/ext/mysqli/tests/001.phpt b/ext/mysqli/tests/001.phpt
deleted file mode 100644
index 3f2f3c2d31..0000000000
--- a/ext/mysqli/tests/001.phpt
+++ /dev/null
@@ -1,47 +0,0 @@
---TEST--
-mysqli connect
---SKIPIF--
-<?php require_once('skipif.inc'); ?>
-<?php require_once('skipifemb.inc'); ?>
---FILE--
-<?php
- include "connect.inc";
-
- $dbname = "test";
- $test = "";
-
- /*** test mysqli_connect localhost:port ***/
- $link = mysqli_connect($host, $user, $passwd, "", 3306);
- $test .= ($link) ? "1" : "0";
- mysqli_close($link);
-
- /*** test mysqli_real_connect ***/
- $link = mysqli_init();
- $test.= (mysqli_real_connect($link, $host, $user, $passwd))
- ? "1" : "0";
- mysqli_close($link);
-
- /*** test mysqli_real_connect with db ***/
- $link = mysqli_init();
- $test .= (mysqli_real_connect($link, $host, $user, $passwd, $dbname))
- ? "1" : "0";
- mysqli_close($link);
-
- /*** test mysqli_real_connect with port ***/
- $link = mysqli_init();
- $test .= (mysqli_real_connect($link, $host, $user, $passwd, $dbname, 3306))
- ? "1":"0";
- mysqli_close($link);
-
- /*** test mysqli_real_connect compressed ***/
- $link = mysqli_init();
- $test .= (mysqli_real_connect($link, $host, $user, $passwd, $dbname, 0, NULL, MYSQLI_CLIENT_COMPRESS))
- ? "1" : "0";
- mysqli_close($link);
-
- /* todo ssl connections */
-
- var_dump($test);
-?>
---EXPECT--
-string(5) "11111"
diff --git a/ext/mysqli/tests/002.phpt b/ext/mysqli/tests/002.phpt
deleted file mode 100644
index 301af98939..0000000000
--- a/ext/mysqli/tests/002.phpt
+++ /dev/null
@@ -1,63 +0,0 @@
---TEST--
-mysqli bind_result 1
---SKIPIF--
-<?php require_once('skipif.inc'); ?>
---FILE--
-<?php
- include "connect.inc";
-
- /*** test mysqli_connect 127.0.0.1 ***/
- $link = mysqli_connect($host, $user, $passwd);
- $link->query("CREATE SCHEMA test");
-
- mysqli_select_db($link, "test");
- $rc = mysqli_query($link,"DROP TABLE IF EXISTS test_fetch_null");
-
- $rc = mysqli_query($link,"CREATE TABLE test_fetch_null(col1 tinyint, col2 smallint,
- col3 int, col4 bigint,
- col5 float, col6 double,
- col7 date, col8 time,
- col9 varbinary(10),
- col10 varchar(50),
- col11 char(20))");
-
- $rc = mysqli_query($link,"INSERT INTO test_fetch_null(col1,col10, col11) VALUES(1,'foo1', 1000),(2,'foo2', 88),(3,'foo3', 389789)");
-
- $stmt = mysqli_prepare($link, "SELECT col1, col2, col3, col4, col5, col6, col7, col8, col9, col10, col11 from test_fetch_null");
- mysqli_bind_result($stmt, $c1, $c2, $c3, $c4, $c5, $c6, $c7, $c8, $c9, $c10, $c11);
- mysqli_execute($stmt);
-
- mysqli_fetch($stmt);
-
- $test = array($c1,$c2,$c3,$c4,$c5,$c6,$c7,$c8,$c9,$c10,$c11);
-
- var_dump($test);
-
- mysqli_stmt_close($stmt);
- mysqli_close($link);
-?>
---EXPECT--
-array(11) {
- [0]=>
- int(1)
- [1]=>
- NULL
- [2]=>
- NULL
- [3]=>
- NULL
- [4]=>
- NULL
- [5]=>
- NULL
- [6]=>
- NULL
- [7]=>
- NULL
- [8]=>
- NULL
- [9]=>
- string(4) "foo1"
- [10]=>
- string(4) "1000"
-}
diff --git a/ext/mysqli/tests/003.phpt b/ext/mysqli/tests/003.phpt
deleted file mode 100644
index 28aedb032c..0000000000
--- a/ext/mysqli/tests/003.phpt
+++ /dev/null
@@ -1,58 +0,0 @@
---TEST--
-mysqli connect
---SKIPIF--
-<?php require_once('skipif.inc'); ?>
---FILE--
-<?php
- include "connect.inc";
-
- /*** test mysqli_connect 127.0.0.1 ***/
- $link = mysqli_connect($host, $user, $passwd, "test");
-
- mysqli_query($link, "SET sql_mode=''");
-
- mysqli_query($link,"DROP TABLE IF EXISTS test_bind_result");
- mysqli_query($link,"CREATE TABLE test_bind_result(c1 date, c2 time,
- c3 timestamp(14),
- c4 year,
- c5 datetime,
- c6 timestamp(4),
- c7 timestamp(6))");
-
- mysqli_query($link,"INSERT INTO test_bind_result VALUES('2002-01-02',
- '12:49:00',
- '2002-01-02 17:46:59',
- 2010,
- '2010-07-10',
- '2020','1999-12-29')");
-
-
- $stmt = mysqli_prepare($link, "SELECT * FROM test_bind_result");
- mysqli_bind_result($stmt, $c1, $c2, $c3, $c4, $c5, $c6, $c7);
- mysqli_execute($stmt);
- mysqli_fetch($stmt);
-
- $test = array($c1,$c2,$c3,$c4,$c5,$c6,$c7);
-
- var_dump($test);
-
- mysqli_stmt_close($stmt);
- mysqli_close($link);
-?>
---EXPECT--
-array(7) {
- [0]=>
- string(10) "2002-01-02"
- [1]=>
- string(8) "12:49:00"
- [2]=>
- string(19) "2002-01-02 17:46:59"
- [3]=>
- int(2010)
- [4]=>
- string(19) "2010-07-10 00:00:00"
- [5]=>
- string(19) "0000-00-00 00:00:00"
- [6]=>
- string(19) "1999-12-29 00:00:00"
-}
diff --git a/ext/mysqli/tests/004.phpt b/ext/mysqli/tests/004.phpt
deleted file mode 100644
index fafc30ba0d..0000000000
--- a/ext/mysqli/tests/004.phpt
+++ /dev/null
@@ -1,60 +0,0 @@
---TEST--
-mysqli fetch char/text
---SKIPIF--
-<?php require_once('skipif.inc'); ?>
---FILE--
-<?php
- include ("connect.inc");
-
- /*** test mysqli_connect 127.0.0.1 ***/
- $link = mysqli_connect($host, $user, $passwd);
-
- mysqli_select_db($link, "test");
-
- mysqli_query($link,"DROP TABLE IF EXISTS test_bind_fetch");
- mysqli_query($link,"CREATE TABLE test_bind_fetch(c1 char(10), c2 text)");
-
- mysqli_query($link, "INSERT INTO test_bind_fetch VALUES ('1234567890', 'this is a test0')");
- mysqli_query($link, "INSERT INTO test_bind_fetch VALUES ('1234567891', 'this is a test1')");
- mysqli_query($link, "INSERT INTO test_bind_fetch VALUES ('1234567892', 'this is a test2')");
- mysqli_query($link, "INSERT INTO test_bind_fetch VALUES ('1234567893', 'this is a test3')");
-
- $stmt = mysqli_prepare($link, "SELECT * FROM test_bind_fetch ORDER BY c1");
- mysqli_bind_result($stmt, $c1, $c2);
- mysqli_execute($stmt);
- $i=4;
- while ($i--) {
- mysqli_fetch($stmt);
- $test = array($c1,$c2);
- var_dump($test);
- }
-
-
- mysqli_stmt_close($stmt);
- mysqli_close($link);
-?>
---EXPECT--
-array(2) {
- [0]=>
- string(10) "1234567890"
- [1]=>
- string(15) "this is a test0"
-}
-array(2) {
- [0]=>
- string(10) "1234567891"
- [1]=>
- string(15) "this is a test1"
-}
-array(2) {
- [0]=>
- string(10) "1234567892"
- [1]=>
- string(15) "this is a test2"
-}
-array(2) {
- [0]=>
- string(10) "1234567893"
- [1]=>
- string(15) "this is a test3"
-}
diff --git a/ext/mysqli/tests/005.phpt b/ext/mysqli/tests/005.phpt
deleted file mode 100644
index a9f75cfd7e..0000000000
--- a/ext/mysqli/tests/005.phpt
+++ /dev/null
@@ -1,40 +0,0 @@
---TEST--
-mysqli fetch char/text long
---SKIPIF--
-<?php require_once('skipif.inc'); ?>
---FILE--
-<?php
- include "connect.inc";
-
- /*** test mysqli_connect 127.0.0.1 ***/
- $link = mysqli_connect($host, $user, $passwd);
-
- mysqli_select_db($link, "test");
-
- mysqli_query($link,"DROP TABLE IF EXISTS test_bind_fetch");
- mysqli_query($link,"CREATE TABLE test_bind_fetch(c1 char(10), c2 text)");
-
- $a = str_repeat("A1", 32000);
-
- mysqli_query($link, "INSERT INTO test_bind_fetch VALUES ('1234567890', '$a')");
-
- $stmt = mysqli_prepare($link, "SELECT * FROM test_bind_fetch");
- mysqli_bind_result($stmt, $c1, $c2);
- mysqli_execute($stmt);
- mysqli_fetch($stmt);
-
- $test[] = $c1;
- $test[] = ($a == $c2) ? "32K String ok" : "32K String failed";
-
- var_dump($test);
-
- mysqli_stmt_close($stmt);
- mysqli_close($link);
-?>
---EXPECT--
-array(2) {
- [0]=>
- string(10) "1234567890"
- [1]=>
- string(13) "32K String ok"
-}
diff --git a/ext/mysqli/tests/006.phpt b/ext/mysqli/tests/006.phpt
deleted file mode 100644
index a53ad7a547..0000000000
--- a/ext/mysqli/tests/006.phpt
+++ /dev/null
@@ -1,54 +0,0 @@
---TEST--
-mysqli fetch long values
---SKIPIF--
-<?php require_once('skipif.inc'); ?>
---FILE--
-<?php
- include "connect.inc";
-
- /*** test mysqli_connect 127.0.0.1 ***/
- $link = mysqli_connect($host, $user, $passwd);
-
- mysqli_select_db($link, "test");
- mysqli_query($link, "SET sql_mode=''");
-
- mysqli_query($link,"DROP TABLE IF EXISTS test_bind_fetch");
- mysqli_query($link,"CREATE TABLE test_bind_fetch(c1 int unsigned,
- c2 int unsigned,
- c3 int,
- c4 int,
- c5 int,
- c6 int unsigned,
- c7 int)");
-
- mysqli_query($link, "INSERT INTO test_bind_fetch VALUES (-23,35999,NULL,-500,-9999999,-0,0)");
-
- $stmt = mysqli_prepare($link, "SELECT * FROM test_bind_fetch");
- mysqli_bind_result($stmt, $c1, $c2, $c3, $c4, $c5, $c6, $c7);
- mysqli_execute($stmt);
- mysqli_fetch($stmt);
-
- $test = array($c1,$c2,$c3,$c4,$c5,$c6,$c7);
-
- var_dump($test);
-
- mysqli_stmt_close($stmt);
- mysqli_close($link);
-?>
---EXPECT--
-array(7) {
- [0]=>
- int(0)
- [1]=>
- int(35999)
- [2]=>
- NULL
- [3]=>
- int(-500)
- [4]=>
- int(-9999999)
- [5]=>
- int(0)
- [6]=>
- int(0)
-}
diff --git a/ext/mysqli/tests/007.phpt b/ext/mysqli/tests/007.phpt
deleted file mode 100644
index cb32033cca..0000000000
--- a/ext/mysqli/tests/007.phpt
+++ /dev/null
@@ -1,54 +0,0 @@
---TEST--
-mysqli fetch short values
---SKIPIF--
-<?php require_once('skipif.inc'); ?>
---FILE--
-<?php
- include "connect.inc";
-
- /*** test mysqli_connect 127.0.0.1 ***/
- $link = mysqli_connect($host, $user, $passwd);
-
- mysqli_select_db($link, "test");
- mysqli_query($link, "SET sql_mode=''");
-
- mysqli_query($link,"DROP TABLE IF EXISTS test_bind_fetch");
- mysqli_query($link,"CREATE TABLE test_bind_fetch(c1 smallint unsigned,
- c2 smallint unsigned,
- c3 smallint,
- c4 smallint,
- c5 smallint,
- c6 smallint unsigned,
- c7 smallint)");
-
- mysqli_query($link, "INSERT INTO test_bind_fetch VALUES (-23,35999,NULL,-500,-9999999,+30,0)");
-
- $stmt = mysqli_prepare($link, "SELECT * FROM test_bind_fetch");
- mysqli_bind_result($stmt, $c1, $c2, $c3, $c4, $c5, $c6, $c7);
- mysqli_execute($stmt);
- mysqli_fetch($stmt);
-
- $test = array($c1,$c2,$c3,$c4,$c5,$c6,$c7);
-
- var_dump($test);
-
- mysqli_stmt_close($stmt);
- mysqli_close($link);
-?>
---EXPECT--
-array(7) {
- [0]=>
- int(0)
- [1]=>
- int(35999)
- [2]=>
- NULL
- [3]=>
- int(-500)
- [4]=>
- int(-32768)
- [5]=>
- int(30)
- [6]=>
- int(0)
-}
diff --git a/ext/mysqli/tests/008.phpt b/ext/mysqli/tests/008.phpt
deleted file mode 100644
index 9fc01b8adf..0000000000
--- a/ext/mysqli/tests/008.phpt
+++ /dev/null
@@ -1,54 +0,0 @@
---TEST--
-mysqli fetch tinyint values
---SKIPIF--
-<?php require_once('skipif.inc'); ?>
---FILE--
-<?php
- include "connect.inc";
-
- /*** test mysqli_connect 127.0.0.1 ***/
- $link = mysqli_connect($host, $user, $passwd);
-
- mysqli_select_db($link, "test");
- mysqli_query($link, "SET sql_mode=''");
-
- mysqli_query($link,"DROP TABLE IF EXISTS test_bind_fetch");
- mysqli_query($link,"CREATE TABLE test_bind_fetch(c1 tinyint,
- c2 tinyint unsigned,
- c3 tinyint not NULL,
- c4 tinyint,
- c5 tinyint,
- c6 tinyint unsigned,
- c7 tinyint)");
-
- mysqli_query($link, "INSERT INTO test_bind_fetch VALUES (-23,300,0,-100,-127,+30,0)");
-
- $stmt = mysqli_prepare($link, "SELECT * FROM test_bind_fetch");
- mysqli_bind_result($stmt, $c1, $c2, $c3, $c4, $c5, $c6, $c7);
- mysqli_execute($stmt);
- mysqli_fetch($stmt);
-
- $test = array($c1,$c2,$c3,$c4,$c5,$c6,$c7);
-
- var_dump($test);
-
- mysqli_stmt_close($stmt);
- mysqli_close($link);
-?>
---EXPECT--
-array(7) {
- [0]=>
- int(-23)
- [1]=>
- int(255)
- [2]=>
- int(0)
- [3]=>
- int(-100)
- [4]=>
- int(-127)
- [5]=>
- int(30)
- [6]=>
- int(0)
-}
diff --git a/ext/mysqli/tests/009.phpt b/ext/mysqli/tests/009.phpt
deleted file mode 100644
index 32ed3c18f0..0000000000
--- a/ext/mysqli/tests/009.phpt
+++ /dev/null
@@ -1,79 +0,0 @@
---TEST--
-mysqli fetch bigint values (ok to fail with 4.1.x)
---SKIPIF--
-<?php
- if (PHP_INT_SIZE == 8) {
- echo 'skip test valid only for 32bit systems';
- exit;
- }
- require_once('skipif.inc');
-?>
---FILE--
-<?php
- include "connect.inc";
-
- /*** test mysqli_connect 127.0.0.1 ***/
- $link = mysqli_connect($host, $user, $passwd);
-
- mysqli_select_db($link, "test");
- mysqli_query($link, "SET sql_mode=''");
-
- mysqli_query($link,"DROP TABLE IF EXISTS test_bind_fetch");
- mysqli_query($link,"CREATE TABLE test_bind_fetch(c1 bigint default 5,
- c2 bigint,
- c3 bigint not NULL,
- c4 bigint unsigned,
- c5 bigint unsigned,
- c6 bigint unsigned,
- c7 bigint unsigned)");
-
- mysqli_query($link, "INSERT INTO test_bind_fetch (c2,c3,c4,c5,c6,c7) VALUES (-23,4.0,33333333333333,0,-333333333333,99.9)");
-
- $stmt = mysqli_prepare($link, "SELECT * FROM test_bind_fetch");
- mysqli_bind_result($stmt, $c1, $c2, $c3, $c4, $c5, $c6, $c7);
- mysqli_execute($stmt);
- $rc = mysqli_fetch($stmt);
-
- $test = array($c1,$c2,$c3,$c4,$c5,$c6,$c7);
-
- var_dump($test);
-
- mysqli_stmt_close($stmt);
-
- mysqli_query($link,"DROP TABLE IF EXISTS test_bind_fetch_uint");
- mysqli_query($link,"CREATE TABLE test_bind_fetch_uint(c1 integer unsigned, c2 integer unsigned)");
-
- mysqli_query($link, "INSERT INTO test_bind_fetch_uint (c1,c2) VALUES (20123456, 3123456789)");
-
- $stmt = mysqli_prepare($link, "SELECT * FROM test_bind_fetch_uint");
- mysqli_bind_result($stmt, $c1, $c2);
- mysqli_execute($stmt);
- $rc = mysqli_fetch($stmt);
-
- echo $c1, "\n", $c2, "\n";
-
- mysqli_stmt_close($stmt);
-
-
- mysqli_close($link);
-?>
-
---EXPECT--
-array(7) {
- [0]=>
- int(5)
- [1]=>
- int(-23)
- [2]=>
- int(4)
- [3]=>
- string(14) "33333333333333"
- [4]=>
- int(0)
- [5]=>
- int(0)
- [6]=>
- int(100)
-}
-20123456
-3123456789
diff --git a/ext/mysqli/tests/010.phpt b/ext/mysqli/tests/010.phpt
deleted file mode 100644
index 6b79d62f42..0000000000
--- a/ext/mysqli/tests/010.phpt
+++ /dev/null
@@ -1,59 +0,0 @@
---TEST--
-mysqli fetch float values
---INI--
-precision=12
---SKIPIF--
-<?php require_once('skipif.inc'); ?>
---FILE--
-<?php
- include "connect.inc";
-
- /*** test mysqli_connect 127.0.0.1 ***/
- $link = mysqli_connect($host, $user, $passwd);
-
- mysqli_select_db($link, "test");
- mysqli_query($link, "SET sql_mode=''");
-
- mysqli_query($link,"DROP TABLE IF EXISTS test_bind_fetch");
-
- mysqli_query($link,"CREATE TABLE test_bind_fetch(c1 float(3),
- c2 float,
- c3 float unsigned,
- c4 float,
- c5 float,
- c6 float,
- c7 float(10) unsigned)");
-
-
- mysqli_query($link, "INSERT INTO test_bind_fetch (c1,c2,c3,c4,c5,c6,c7) VALUES (3.1415926535,-0.000001, -5, 999999999999,
- sin(0.6), 1.00000000000001, 888888888888888)");
-
- $stmt = mysqli_prepare($link, "SELECT * FROM test_bind_fetch");
- mysqli_bind_result($stmt, $c1, $c2, $c3, $c4, $c5, $c6, $c7);
- mysqli_execute($stmt);
- mysqli_fetch($stmt);
-
- $test = array($c1,$c2,$c3,$c4,$c5,$c6,$c7);
-
- var_dump($test);
-
- mysqli_stmt_close($stmt);
- mysqli_close($link);
-?>
---EXPECT--
-array(7) {
- [0]=>
- float(3.14159274101)
- [1]=>
- float(-9.99999997475E-7)
- [2]=>
- float(0)
- [3]=>
- float(999999995904)
- [4]=>
- float(0.564642488956)
- [5]=>
- float(1)
- [6]=>
- float(888888914608000)
-}
diff --git a/ext/mysqli/tests/011.phpt b/ext/mysqli/tests/011.phpt
deleted file mode 100644
index 77a157f564..0000000000
--- a/ext/mysqli/tests/011.phpt
+++ /dev/null
@@ -1,57 +0,0 @@
---TEST--
-mysqli fetch mixed values
---INI--
-precision=12
---SKIPIF--
-<?php require_once('skipif.inc'); ?>
---FILE--
-<?php
- include "connect.inc";
-
- /*** test mysqli_connect 127.0.0.1 ***/
- $link = mysqli_connect($host, $user, $passwd);
-
- mysqli_select_db($link, "test");
-
- mysqli_query($link,"DROP TABLE IF EXISTS test_bind_result");
-
- mysqli_query($link,"CREATE TABLE test_bind_result(c1 tinyint, c2 smallint,
- c3 int, c4 bigint,
- c5 float, c6 double,
- c7 varbinary(10),
- c8 varchar(50))");
-
- mysqli_query($link,"INSERT INTO test_bind_result VALUES(19,2999,3999,4999999,
- 2345.6,5678.89563,
- 'foobar','mysql rulez')");
- $stmt = mysqli_prepare($link, "SELECT * FROM test_bind_result");
- mysqli_bind_result($stmt, $c1, $c2, $c3, $c4, $c5, $c6, $c7, $c8);
- mysqli_execute($stmt);
- mysqli_fetch($stmt);
-
- $test = array($c1,$c2,$c3,$c4,$c5,$c6,$c7,$c8);
-
- var_dump($test);
-
- mysqli_stmt_close($stmt);
- mysqli_close($link);
-?>
---EXPECT--
-array(8) {
- [0]=>
- int(19)
- [1]=>
- int(2999)
- [2]=>
- int(3999)
- [3]=>
- int(4999999)
- [4]=>
- float(2345.60009766)
- [5]=>
- float(5678.89563)
- [6]=>
- string(6) "foobar"
- [7]=>
- string(11) "mysql rulez"
-}
diff --git a/ext/mysqli/tests/012.phpt b/ext/mysqli/tests/012.phpt
deleted file mode 100644
index 9c52f9c3e4..0000000000
--- a/ext/mysqli/tests/012.phpt
+++ /dev/null
@@ -1,58 +0,0 @@
---TEST--
-mysqli fetch mixed values 2
---INI--
-precision=12
---SKIPIF--
-<?php require_once('skipif.inc'); ?>
---FILE--
-<?php
- include "connect.inc";
-
- /*** test mysqli_connect 127.0.0.1 ***/
- $link = mysqli_connect($host, $user, $passwd);
-
- mysqli_select_db($link, "test");
-
- mysqli_query($link,"DROP TABLE IF EXISTS test_bind_result");
-
- mysqli_query($link,"CREATE TABLE test_bind_result(c1 tinyint, c2 smallint,
- c3 int, c4 bigint,
- c5 float, c6 double,
- c7 varbinary(10),
- c8 varchar(10))");
-
- mysqli_query($link,"INSERT INTO test_bind_result VALUES(120,2999,3999,54,
- 2.6,58.89,
- '206','6.7')");
-
- $stmt = mysqli_prepare($link, "SELECT * FROM test_bind_result");
- mysqli_bind_result($stmt, $c1, $c2, $c3, $c4, $c5, $c6, $c7, $c8);
- mysqli_execute($stmt);
- mysqli_fetch($stmt);
-
- $test = array($c1,$c2,$c3,$c4,$c5,$c6,$c7,$c8);
-
- var_dump($test);
-
- mysqli_stmt_close($stmt);
- mysqli_close($link);
-?>
---EXPECT--
-array(8) {
- [0]=>
- int(120)
- [1]=>
- int(2999)
- [2]=>
- int(3999)
- [3]=>
- int(54)
- [4]=>
- float(2.59999990463)
- [5]=>
- float(58.89)
- [6]=>
- string(3) "206"
- [7]=>
- string(3) "6.7"
-}
diff --git a/ext/mysqli/tests/013.phpt b/ext/mysqli/tests/013.phpt
deleted file mode 100644
index 60caff5b8a..0000000000
--- a/ext/mysqli/tests/013.phpt
+++ /dev/null
@@ -1,52 +0,0 @@
---TEST--
-mysqli fetch mixed / mysql_query (may fail when using 4.1 library with 5.x server)
---SKIPIF--
-<?php require_once('skipif.inc'); ?>
---FILE--
-<?php
- include "connect.inc";
-
- /*** test mysqli_connect 127.0.0.1 ***/
- $link = mysqli_connect($host, $user, $passwd);
-
- mysqli_select_db($link, "test");
-
- mysqli_query($link,"DROP TABLE IF EXISTS test_bind_result");
-
- mysqli_query($link,"CREATE TABLE test_bind_result(c1 tinyint, c2 smallint,
- c3 int, c4 bigint,
- c5 decimal(4,2), c6 double,
- c7 varbinary(10),
- c8 varchar(10))");
-
- mysqli_query($link,"INSERT INTO test_bind_result VALUES(120,2999,3999,54,
- 2.6,58.89,
- '206','6.7')");
- $stmt = mysqli_prepare($link, "SELECT * FROM test_bind_result");
-
- $c = array(0,0,0,0,0,0,0,0);
- $b_res= mysqli_bind_result($stmt, $c[0], $c[1], $c[2], $c[3], $c[4], $c[5], $c[6], $c[7]);
- mysqli_execute($stmt);
- mysqli_fetch($stmt);
- mysqli_fetch($stmt);
- mysqli_stmt_close($stmt);
-
- $result = mysqli_query($link, "select * from test_bind_result");
- $d = mysqli_fetch_row($result);
- mysqli_free_result($result);
-
- $test = "";
- for ($i=0; $i < count($c); $i++)
- $test .= ($c[0] == $d[0]) ? "1" : "0";
- if ($test == "11111111")
- echo "ok";
- else if ($b_res == FALSE && mysqli_get_client_version() > 40100 && mysqli_get_client_version() < 50000 &&
- mysqli_get_server_version($link) > 50000)
- echo "error (4.1 library with 5.x server)";
- else
- echo "error";
-
- mysqli_close($link);
-?>
---EXPECTF--
-ok
diff --git a/ext/mysqli/tests/014.phpt b/ext/mysqli/tests/014.phpt
deleted file mode 100644
index d6591fcab4..0000000000
--- a/ext/mysqli/tests/014.phpt
+++ /dev/null
@@ -1,69 +0,0 @@
---TEST--
-mysqli autocommit/commit/rollback
---SKIPIF--
-<?php
- require_once('skipif.inc');
- include "connect.inc";
- $link = mysqli_connect($host, $user, $passwd);
- $result = mysqli_query($link, "SHOW VARIABLES LIKE 'have_innodb'");
- $row = mysqli_fetch_row($result);
- mysqli_free_result($result);
- mysqli_close($link);
- if ($row[1] == "DISABLED" || $row[1] == "NO") {
- printf ("skip innodb support is not installed or enabled.");
- exit;
- }
-?>
---FILE--
-<?php
- include "connect.inc";
- $link = mysqli_connect($host, $user, $passwd);
-
- mysqli_select_db($link, "test");
-
- mysqli_autocommit($link, TRUE);
-
- mysqli_query($link,"DROP TABLE IF EXISTS ac_01");
-
- mysqli_query($link,"CREATE TABLE ac_01(a int, b varchar(10)) type=InnoDB");
-
- mysqli_query($link, "INSERT INTO ac_01 VALUES (1, 'foobar')");
- mysqli_autocommit($link, FALSE);
- mysqli_query($link, "DELETE FROM ac_01");
- mysqli_query($link, "INSERT INTO ac_01 VALUES (2, 'egon')");
-
- mysqli_rollback($link);
-
- $result = mysqli_query($link, "SELECT * FROM ac_01");
- printf("Num_of_rows=%d\n", mysqli_num_rows($result));
- $row = mysqli_fetch_row($result);
- mysqli_free_result($result);
-
- var_dump($row);
-
- mysqli_query($link, "DELETE FROM ac_01");
- mysqli_query($link, "INSERT INTO ac_01 VALUES (2, 'egon')");
- mysqli_commit($link);
-
- $result = mysqli_query($link, "SELECT * FROM ac_01");
- $row = mysqli_fetch_row($result);
- mysqli_free_result($result);
-
- var_dump($row);
-
- mysqli_close($link);
-?>
---EXPECT--
-Num_of_rows=1
-array(2) {
- [0]=>
- string(1) "1"
- [1]=>
- string(6) "foobar"
-}
-array(2) {
- [0]=>
- string(1) "2"
- [1]=>
- string(4) "egon"
-}
diff --git a/ext/mysqli/tests/015.phpt b/ext/mysqli/tests/015.phpt
deleted file mode 100644
index 7620f3c435..0000000000
--- a/ext/mysqli/tests/015.phpt
+++ /dev/null
@@ -1,69 +0,0 @@
---TEST--
-mysqli autocommit/commit/rollback with myisam
---SKIPIF--
-<?php
- require_once('skipif.inc');
- include "connect.inc";
- $link = mysqli_connect($host, $user, $passwd);
- $result = mysqli_query($link, "SHOW VARIABLES LIKE 'have_innodb'");
- $row = mysqli_fetch_row($result);
- mysqli_free_result($result);
- mysqli_close($link);
-
- if ($row[1] == "NO") {
- printf ("skip innodb support not installed.");
- }
-?>
---FILE--
-<?php
- include "connect.inc";
-
- $link = mysqli_connect($host, $user, $passwd);
-
- mysqli_select_db($link, "test");
-
- mysqli_autocommit($link, TRUE);
-
- mysqli_query($link,"DROP TABLE IF EXISTS ac_01");
-
- mysqli_query($link,"CREATE TABLE ac_01(a int, b varchar(10))");
-
- mysqli_query($link, "INSERT INTO ac_01 VALUES (1, 'foobar')");
- mysqli_autocommit($link, FALSE);
-
- mysqli_query($link, "DELETE FROM ac_01");
- mysqli_query($link, "INSERT INTO ac_01 VALUES (2, 'egon')");
-
- mysqli_rollback($link);
-
- $result = mysqli_query($link, "SELECT * FROM ac_01");
- $row = mysqli_fetch_row($result);
- mysqli_free_result($result);
-
- var_dump($row);
-
- mysqli_query($link, "DELETE FROM ac_01");
- mysqli_query($link, "INSERT INTO ac_01 VALUES (2, 'egon')");
- mysqli_commit($link);
-
- $result = mysqli_query($link, "SELECT * FROM ac_01");
- $row = mysqli_fetch_row($result);
- mysqli_free_result($result);
-
- var_dump($row);
-
- mysqli_close($link);
-?>
---EXPECT--
-array(2) {
- [0]=>
- string(1) "2"
- [1]=>
- string(4) "egon"
-}
-array(2) {
- [0]=>
- string(1) "2"
- [1]=>
- string(4) "egon"
-}
diff --git a/ext/mysqli/tests/016.phpt b/ext/mysqli/tests/016.phpt
deleted file mode 100644
index c61da29ec1..0000000000
--- a/ext/mysqli/tests/016.phpt
+++ /dev/null
@@ -1,27 +0,0 @@
---TEST--
-mysqli fetch user variable
---SKIPIF--
-<?php require_once('skipif.inc'); ?>
---FILE--
-<?php
- include "connect.inc";
-
- /*** test mysqli_connect 127.0.0.1 ***/
- $link = mysqli_connect($host, $user, $passwd);
-
- mysqli_select_db($link, "test");
-
- mysqli_query($link, "SET @dummy='foobar'");
-
- $stmt = mysqli_prepare($link, "SELECT @dummy");
- mysqli_bind_result($stmt, $dummy);
- mysqli_execute($stmt);
- mysqli_fetch($stmt);
-
- var_dump($dummy);
-
- mysqli_stmt_close($stmt);
- mysqli_close($link);
-?>
---EXPECT--
-string(6) "foobar"
diff --git a/ext/mysqli/tests/017.phpt b/ext/mysqli/tests/017.phpt
deleted file mode 100644
index 866a118a86..0000000000
--- a/ext/mysqli/tests/017.phpt
+++ /dev/null
@@ -1,35 +0,0 @@
---TEST--
-mysqli fetch functions
---SKIPIF--
-<?php require_once('skipif.inc'); ?>
-<?php require_once('skipifemb.inc'); ?>
---FILE--
-<?php
- include "connect.inc";
-
- /*** test mysqli_connect 127.0.0.1 ***/
- $link = mysqli_connect($host, $user, $passwd);
-
- mysqli_select_db($link, "test");
-
- $stmt = mysqli_prepare($link, "SELECT md5('bar'), database(), 'foo'");
- mysqli_bind_result($stmt, $c0, $c1, $c2);
- mysqli_execute($stmt);
-
- mysqli_fetch($stmt);
- mysqli_stmt_close($stmt);
-
- $test = array($c0, $c1, $c2);
-
- var_dump($test);
- mysqli_close($link);
-?>
---EXPECT--
-array(3) {
- [0]=>
- string(32) "37b51d194a7513e45b56f6524f2d51f2"
- [1]=>
- string(4) "test"
- [2]=>
- string(3) "foo"
-}
diff --git a/ext/mysqli/tests/018.phpt b/ext/mysqli/tests/018.phpt
deleted file mode 100644
index 4ba199d866..0000000000
--- a/ext/mysqli/tests/018.phpt
+++ /dev/null
@@ -1,27 +0,0 @@
---TEST--
-mysqli fetch system variables
---SKIPIF--
-<?php require_once('skipif.inc'); ?>
---FILE--
-<?php
- include "connect.inc";
-
- /*** test mysqli_connect 127.0.0.1 ***/
- $link = mysqli_connect($host, $user, $passwd);
-
- mysqli_select_db($link, "test");
-
- mysqli_query($link, "SET AUTOCOMMIT=0");
-
- $stmt = mysqli_prepare($link, "SELECT @@autocommit");
- mysqli_bind_result($stmt, $c0);
- mysqli_execute($stmt);
-
- mysqli_fetch($stmt);
-
- var_dump($c0);
-
- mysqli_close($link);
-?>
---EXPECT--
-int(0)
diff --git a/ext/mysqli/tests/019.phpt b/ext/mysqli/tests/019.phpt
deleted file mode 100644
index 173c404909..0000000000
--- a/ext/mysqli/tests/019.phpt
+++ /dev/null
@@ -1,71 +0,0 @@
---TEST--
-mysqli fetch (bind_param + bind_result)
---SKIPIF--
-<?php require_once('skipif.inc'); ?>
---FILE--
-<?php
- include "connect.inc";
-
- /*** test mysqli_connect 127.0.0.1 ***/
- $link = mysqli_connect($host, $user, $passwd);
-
- mysqli_select_db($link, "test");
- $rc = mysqli_query($link,"DROP TABLE IF EXISTS insert_read");
-
- $rc = mysqli_query($link,"CREATE TABLE insert_read(col1 tinyint, col2 smallint,
- col3 int, col4 bigint,
- col5 float, col6 double,
- col7 date, col8 time,
- col9 varbinary(10),
- col10 varchar(50),
- col11 char(20))");
-
- $stmt= mysqli_prepare($link,"INSERT INTO insert_read(col1,col10, col11, col6) VALUES(?,?,?,?)");
- mysqli_bind_param($stmt, "issd", $c1, $c2, $c3, $c4);
-
- $c1 = 1;
- $c2 = "foo";
- $c3 = "foobar";
- $c4 = 3.14;
-
- mysqli_execute($stmt);
- mysqli_stmt_close($stmt);
-
- $stmt = mysqli_prepare($link, "SELECT col1, col2, col3, col4, col5, col6, col7, col8, col9, col10, col11 from insert_read");
- mysqli_bind_result($stmt, $c1, $c2, $c3, $c4, $c5, $c6, $c7, $c8, $c9, $c10, $c11);
- mysqli_execute($stmt);
-
- mysqli_fetch($stmt);
-
- $test = array($c1,$c2,$c3,$c4,$c5,$c6,$c7,$c8,$c9,$c10,$c11);
-
- var_dump($test);
-
- mysqli_stmt_close($stmt);
- mysqli_close($link);
-?>
---EXPECT--
-array(11) {
- [0]=>
- int(1)
- [1]=>
- NULL
- [2]=>
- NULL
- [3]=>
- NULL
- [4]=>
- NULL
- [5]=>
- float(3.14)
- [6]=>
- NULL
- [7]=>
- NULL
- [8]=>
- NULL
- [9]=>
- string(3) "foo"
- [10]=>
- string(6) "foobar"
-}
diff --git a/ext/mysqli/tests/020.phpt b/ext/mysqli/tests/020.phpt
deleted file mode 100644
index 4ae140f620..0000000000
--- a/ext/mysqli/tests/020.phpt
+++ /dev/null
@@ -1,67 +0,0 @@
---TEST--
-mysqli bind_param/bind_result date
---SKIPIF--
-<?php require_once('skipif.inc'); ?>
---FILE--
-<?php
- include "connect.inc";
-
- /*** test mysqli_connect 127.0.0.1 ***/
- $link = mysqli_connect($host, $user, $passwd);
-
- mysqli_select_db($link, "test");
- mysqli_query($link, "SET sql_mode=''");
-
- mysqli_query($link,"DROP TABLE IF EXISTS test_bind_result");
- mysqli_query($link,"CREATE TABLE test_bind_result(c1 date, c2 time,
- c3 timestamp(14),
- c4 year,
- c5 datetime,
- c6 timestamp(4),
- c7 timestamp(6))");
-
- $stmt = mysqli_prepare($link, "INSERT INTO test_bind_result VALUES (?,?,?,?,?,?,?)");
- mysqli_bind_param($stmt, "sssssss", $d1, $d2, $d3, $d4, $d5, $d6, $d7);
-
- $d1 = '2002-01-02';
- $d2 = '12:49:00';
- $d3 = '2002-01-02 17:46:59';
- $d4 = 2010;
- $d5 ='2010-07-10';
- $d6 = '2020';
- $d7 = '1999-12-29';
-
- mysqli_execute($stmt);
- mysqli_stmt_close($stmt);
-
- $stmt = mysqli_prepare($link, "SELECT * FROM test_bind_result");
-
- mysqli_bind_result($stmt,$c1, $c2, $c3, $c4, $c5, $c6, $c7);
-
- mysqli_execute($stmt);
- mysqli_fetch($stmt);
-
- $test = array($c1,$c2,$c3,$c4,$c5,$c6,$c7);
-
- var_dump($test);
-
- mysqli_stmt_close($stmt);
- mysqli_close($link);
-?>
---EXPECT--
-array(7) {
- [0]=>
- string(10) "2002-01-02"
- [1]=>
- string(8) "12:49:00"
- [2]=>
- string(19) "2002-01-02 17:46:59"
- [3]=>
- int(2010)
- [4]=>
- string(19) "2010-07-10 00:00:00"
- [5]=>
- string(19) "0000-00-00 00:00:00"
- [6]=>
- string(19) "1999-12-29 00:00:00"
-}
diff --git a/ext/mysqli/tests/021.phpt b/ext/mysqli/tests/021.phpt
deleted file mode 100644
index 6f5bad3205..0000000000
--- a/ext/mysqli/tests/021.phpt
+++ /dev/null
@@ -1,42 +0,0 @@
---TEST--
-mysqli bind_param+bind_result char/text
---SKIPIF--
-<?php require_once('skipif.inc'); ?>
---FILE--
-<?php
- include "connect.inc";
-
- /*** test mysqli_connect 127.0.0.1 ***/
- $link = mysqli_connect($host, $user, $passwd);
-
- mysqli_select_db($link, "test");
-
- mysqli_query($link,"DROP TABLE IF EXISTS test_bind_fetch");
- mysqli_query($link,"CREATE TABLE test_bind_fetch(c1 char(10), c2 text)");
-
- $stmt = mysqli_prepare($link, "INSERT INTO test_bind_fetch VALUES (?,?)");
- mysqli_bind_param($stmt, "ss", $q1, $q2);
- $q1 = "1234567890";
- $q2 = "this is a test";
- mysqli_execute($stmt);
- mysqli_stmt_close($stmt);
-
- $stmt = mysqli_prepare($link, "SELECT * FROM test_bind_fetch");
- mysqli_bind_result($stmt, $c1, $c2);
- mysqli_execute($stmt);
- mysqli_fetch($stmt);
-
- $test = array($c1,$c2);
-
- var_dump($test);
-
- mysqli_stmt_close($stmt);
- mysqli_close($link);
-?>
---EXPECT--
-array(2) {
- [0]=>
- string(10) "1234567890"
- [1]=>
- string(14) "this is a test"
-}
diff --git a/ext/mysqli/tests/022.phpt b/ext/mysqli/tests/022.phpt
deleted file mode 100644
index cce8ed8eb6..0000000000
--- a/ext/mysqli/tests/022.phpt
+++ /dev/null
@@ -1,46 +0,0 @@
---TEST--
-mysqli bind_param/bind_result char/text long
---SKIPIF--
-<?php require_once('skipif.inc'); ?>
---FILE--
-<?php
- include "connect.inc";
-
- /*** test mysqli_connect 127.0.0.1 ***/
- $link = mysqli_connect($host, $user, $passwd);
-
- mysqli_select_db($link, "test");
-
- mysqli_query($link,"DROP TABLE IF EXISTS test_bind_fetch");
- mysqli_query($link,"CREATE TABLE test_bind_fetch(c1 char(10), c2 text)");
-
-
- $stmt = mysqli_prepare($link, "INSERT INTO test_bind_fetch VALUES (?,?)");
- mysqli_bind_param($stmt, "ss", $a1, $a2);
-
- $a1 = "1234567890";
- $a2 = str_repeat("A1", 32000);
-
- mysqli_execute($stmt);
- mysqli_stmt_close($stmt);
-
- $stmt = mysqli_prepare($link, "SELECT * FROM test_bind_fetch");
- mysqli_bind_result($stmt, $c1, $c2);
- mysqli_execute($stmt);
- mysqli_fetch($stmt);
-
- $test[] = $c1;
- $test[] = ($a2 == $c2) ? "32K String ok" : "32K String failed";
-
- var_dump($test);
-
- mysqli_stmt_close($stmt);
- mysqli_close($link);
-?>
---EXPECT--
-array(2) {
- [0]=>
- string(10) "1234567890"
- [1]=>
- string(13) "32K String ok"
-}
diff --git a/ext/mysqli/tests/023.phpt b/ext/mysqli/tests/023.phpt
deleted file mode 100644
index 24a717a6eb..0000000000
--- a/ext/mysqli/tests/023.phpt
+++ /dev/null
@@ -1,65 +0,0 @@
---TEST--
-mysqli bind_param/bind_prepare fetch long values
---SKIPIF--
-<?php require_once('skipif.inc'); ?>
---FILE--
-<?php
- include "connect.inc";
-
- /*** test mysqli_connect 127.0.0.1 ***/
- $link = mysqli_connect($host, $user, $passwd);
-
- mysqli_select_db($link, "test");
- mysqli_query($link, "SET sql_mode=''");
-
- mysqli_query($link,"DROP TABLE IF EXISTS test_bind_fetch");
- mysqli_query($link,"CREATE TABLE test_bind_fetch(c1 int unsigned,
- c2 int unsigned,
- c3 int,
- c4 int,
- c5 int,
- c6 int unsigned,
- c7 int)");
-
- $stmt = mysqli_prepare($link, "INSERT INTO test_bind_fetch VALUES (?,?,?,?,?,?,?)");
- mysqli_bind_param($stmt, "iiiiiii", $c1,$c2,$c3,$c4,$c5,$c6,$c7);
- $c1 = -23;
- $c2 = 35999;
- $c3 = NULL;
- $c4 = -500;
- $c5 = -9999999;
- $c6 = -0;
- $c7 = 0;
-
- mysqli_execute($stmt);
- mysqli_stmt_close($stmt);
-
- $stmt = mysqli_prepare($link, "SELECT * FROM test_bind_fetch");
- mysqli_bind_result($stmt, $c1, $c2, $c3, $c4, $c5, $c6, $c7);
- mysqli_execute($stmt);
- mysqli_fetch($stmt);
-
- $test = array($c1,$c2,$c3,$c4,$c5,$c6,$c7);
-
- var_dump($test);
-
- mysqli_stmt_close($stmt);
- mysqli_close($link);
-?>
---EXPECT--
-array(7) {
- [0]=>
- int(0)
- [1]=>
- int(35999)
- [2]=>
- NULL
- [3]=>
- int(-500)
- [4]=>
- int(-9999999)
- [5]=>
- int(0)
- [6]=>
- int(0)
-}
diff --git a/ext/mysqli/tests/024.phpt b/ext/mysqli/tests/024.phpt
deleted file mode 100644
index f0d0a6407a..0000000000
--- a/ext/mysqli/tests/024.phpt
+++ /dev/null
@@ -1,66 +0,0 @@
---TEST--
-mysqli bind_param/bind_result short values
---SKIPIF--
-<?php require_once('skipif.inc'); ?>
---FILE--
-<?php
- include "connect.inc";
-
- /*** test mysqli_connect 127.0.0.1 ***/
- $link = mysqli_connect($host, $user, $passwd);
-
- mysqli_select_db($link, "test");
- mysqli_query($link, "SET sql_mode=''");
-
- mysqli_query($link,"DROP TABLE IF EXISTS test_bind_fetch");
- mysqli_query($link,"CREATE TABLE test_bind_fetch(c1 smallint unsigned,
- c2 smallint unsigned,
- c3 smallint,
- c4 smallint,
- c5 smallint,
- c6 smallint unsigned,
- c7 smallint)");
-
- $stmt = mysqli_prepare($link, "INSERT INTO test_bind_fetch VALUES (?,?,?,?,?,?,?)");
- mysqli_bind_param($stmt, "iiiiiii", $c1,$c2,$c3,$c4,$c5,$c6,$c7);
-
- $c1 = -23;
- $c2 = 35999;
- $c3 = NULL;
- $c4 = -500;
- $c5 = -9999999;
- $c6 = -0;
- $c7 = 0;
-
- mysqli_execute($stmt);
- mysqli_stmt_close($stmt);
-
- $stmt = mysqli_prepare($link, "SELECT * FROM test_bind_fetch");
- mysqli_bind_result($stmt, $c1, $c2, $c3, $c4, $c5, $c6, $c7);
- mysqli_execute($stmt);
- mysqli_fetch($stmt);
-
- $test = array($c1,$c2,$c3,$c4,$c5,$c6,$c7);
-
- var_dump($test);
-
- mysqli_stmt_close($stmt);
- mysqli_close($link);
-?>
---EXPECT--
-array(7) {
- [0]=>
- int(0)
- [1]=>
- int(35999)
- [2]=>
- NULL
- [3]=>
- int(-500)
- [4]=>
- int(-32768)
- [5]=>
- int(0)
- [6]=>
- int(0)
-}
diff --git a/ext/mysqli/tests/025.phpt b/ext/mysqli/tests/025.phpt
deleted file mode 100644
index f3338cf467..0000000000
--- a/ext/mysqli/tests/025.phpt
+++ /dev/null
@@ -1,70 +0,0 @@
---TEST--
-mysqli bind_param/bind_result tinyint values
---SKIPIF--
-<?php require_once('skipif.inc'); ?>
---FILE--
-<?php
- include "connect.inc";
-
- /*** test mysqli_connect 127.0.0.1 ***/
- $link = mysqli_connect($host, $user, $passwd);
-
- mysqli_select_db($link, "test");
- mysqli_query($link, "SET sql_mode=''");
-
- mysqli_query($link,"DROP TABLE IF EXISTS test_bind_fetch");
- mysqli_query($link,"CREATE TABLE test_bind_fetch(c1 tinyint,
- c2 tinyint unsigned,
- c3 tinyint not NULL,
- c4 tinyint,
- c5 tinyint,
- c6 tinyint unsigned,
- c7 tinyint)");
-
- $stmt = mysqli_prepare ($link, "INSERT INTO test_bind_fetch VALUES(?,?,?,?,?,?,?)");
- mysqli_bind_param($stmt, "iiiiiii", $c1,$c2,$c3,$c4,$c5,$c6,$c7);
-
- $c1 = -23;
- $c2 = 300;
- $c3 = 0;
- $c4 = -100;
- $c5 = -127;
- $c6 = 30;
- $c7 = 0;
-
- mysqli_execute($stmt);
- mysqli_stmt_close($stmt);
-
- mysqli_query($link, "INSERT INTO test_bind_fetch VALUES (-23,300,0,-100,-127,+30,0)");
-
- $c1 = $c2 = $c3 = $c4 = $c5 = $c6 = $c7 = NULL;
-
- $stmt = mysqli_prepare($link, "SELECT * FROM test_bind_fetch");
- mysqli_bind_result($stmt, $c1, $c2, $c3, $c4, $c5, $c6, $c7);
- mysqli_execute($stmt);
- mysqli_fetch($stmt);
-
- $test = array($c1,$c2,$c3,$c4,$c5,$c6,$c7);
-
- var_dump($test);
-
- mysqli_stmt_close($stmt);
- mysqli_close($link);
-?>
---EXPECT--
-array(7) {
- [0]=>
- int(-23)
- [1]=>
- int(255)
- [2]=>
- int(0)
- [3]=>
- int(-100)
- [4]=>
- int(-127)
- [5]=>
- int(30)
- [6]=>
- int(0)
-}
diff --git a/ext/mysqli/tests/026.phpt b/ext/mysqli/tests/026.phpt
deleted file mode 100644
index d38e3c1807..0000000000
--- a/ext/mysqli/tests/026.phpt
+++ /dev/null
@@ -1,49 +0,0 @@
---TEST--
-mysqli bind_param/bind_result with send_long_data
---SKIPIF--
-<?php require_once('skipif.inc'); ?>
---FILE--
-<?php
- include "connect.inc";
-
- /*** test mysqli_connect 127.0.0.1 ***/
- $link = mysqli_connect($host, $user, $passwd);
-
- mysqli_select_db($link, "test");
- mysqli_query($link, "SET sql_mode=''");
-
- mysqli_query($link,"DROP TABLE IF EXISTS test_bind_fetch");
- mysqli_query($link,"CREATE TABLE test_bind_fetch(c1 varchar(10), c2 text)");
-
- $stmt = mysqli_prepare ($link, "INSERT INTO test_bind_fetch VALUES (?,?)");
- mysqli_bind_param($stmt, "sb", $c1, $c2);
-
- $c1 = "Hello World";
-
- mysqli_send_long_data($stmt, 1, "This is the first sentence.");
- mysqli_send_long_data($stmt, 1, " And this is the second sentence.");
- mysqli_send_long_data($stmt, 1, " And finally this is the last sentence.");
-
- mysqli_execute($stmt);
- mysqli_stmt_close($stmt);
-
- $stmt = mysqli_prepare($link, "SELECT * FROM test_bind_fetch");
- mysqli_bind_result($stmt, $d1, $d2);
- mysqli_execute($stmt);
- mysqli_fetch($stmt);
-
- $test = array($d1,$d2);
-
- var_dump($test);
-
- mysqli_stmt_close($stmt);
-
- mysqli_close($link);
-?>
---EXPECT--
-array(2) {
- [0]=>
- string(10) "Hello Worl"
- [1]=>
- string(99) "This is the first sentence. And this is the second sentence. And finally this is the last sentence."
-}
diff --git a/ext/mysqli/tests/027.phpt b/ext/mysqli/tests/027.phpt
deleted file mode 100644
index 9f8eadf9dd..0000000000
--- a/ext/mysqli/tests/027.phpt
+++ /dev/null
@@ -1,20 +0,0 @@
---TEST--
-function test: mysqli_stat
---SKIPIF--
-<?php require_once('skipif.inc'); ?>
---FILE--
-<?php
- include "connect.inc";
-
- /*** test mysqli_connect 127.0.0.1 ***/
- $link = mysqli_connect($host, $user, $passwd);
-
- $status = mysqli_stat($link);
-
-
- var_dump(strlen($status) > 0);
-
- mysqli_close($link);
-?>
---EXPECT--
-bool(true)
diff --git a/ext/mysqli/tests/028.phpt b/ext/mysqli/tests/028.phpt
deleted file mode 100644
index 0e897d86f8..0000000000
--- a/ext/mysqli/tests/028.phpt
+++ /dev/null
@@ -1,19 +0,0 @@
---TEST--
-function test: mysqli_character_set_name
---SKIPIF--
-<?php require_once('skipif.inc'); ?>
---FILE--
-<?php
- include "connect.inc";
-
- /*** test mysqli_connect 127.0.0.1 ***/
- $link = mysqli_connect($host, $user, $passwd);
-
- $cset = substr(mysqli_character_set_name($link),0,6);
-
- var_dump($cset);
-
- mysqli_close($link);
-?>
---EXPECTF--
-string(%d) "%s"
diff --git a/ext/mysqli/tests/029.phpt b/ext/mysqli/tests/029.phpt
deleted file mode 100644
index 318e6aeb9e..0000000000
--- a/ext/mysqli/tests/029.phpt
+++ /dev/null
@@ -1,25 +0,0 @@
---TEST--
-function test: mysqli_affected_rows
---SKIPIF--
-<?php require_once('skipif.inc'); ?>
---FILE--
-<?php
- include "connect.inc";
-
- /*** test mysqli_connect 127.0.0.1 ***/
- $link = mysqli_connect($host, $user, $passwd);
-
- mysqli_select_db($link, "test");
-
- mysqli_query($link, "drop table if exists general_test");
- mysqli_query($link, "create table general_test (a int)");
- mysqli_query($link, "insert into general_test values (1),(2),(3)");
-
- $afc = mysqli_affected_rows($link);
-
- var_dump($afc);
-
- mysqli_close($link);
-?>
---EXPECT--
-int(3)
diff --git a/ext/mysqli/tests/030.phpt b/ext/mysqli/tests/030.phpt
deleted file mode 100644
index a3946c3715..0000000000
--- a/ext/mysqli/tests/030.phpt
+++ /dev/null
@@ -1,25 +0,0 @@
---TEST--
-function test: mysqli_errno
---SKIPIF--
-<?php require_once('skipif.inc'); ?>
---FILE--
-<?php
- include "connect.inc";
-
- /*** test mysqli_connect 127.0.0.1 ***/
- $link = mysqli_connect($host, $user, $passwd);
- $errno = mysqli_errno($link);
- var_dump($errno);
-
- mysqli_select_db($link, "test");
-
- mysqli_query($link, "select * from non_exisiting_table");
- $errno = mysqli_errno($link);
-
- var_dump($errno);
-
- mysqli_close($link);
-?>
---EXPECT--
-int(0)
-int(1146)
diff --git a/ext/mysqli/tests/031.phpt b/ext/mysqli/tests/031.phpt
deleted file mode 100644
index 743b4b2d0f..0000000000
--- a/ext/mysqli/tests/031.phpt
+++ /dev/null
@@ -1,25 +0,0 @@
---TEST--
-function test: mysqli_error
---SKIPIF--
-<?php require_once('skipif.inc'); ?>
---FILE--
-<?php
- include "connect.inc";
-
- /*** test mysqli_connect 127.0.0.1 ***/
- $link = mysqli_connect($host, $user, $passwd);
- $error = mysqli_error($link);
- var_dump($error);
-
- mysqli_select_db($link, "test");
-
- mysqli_query($link, "select * from non_exisiting_table");
- $error = mysqli_error($link);
-
- var_dump($error);
-
- mysqli_close($link);
-?>
---EXPECT--
-string(0) ""
-string(46) "Table 'test.non_exisiting_table' doesn't exist"
diff --git a/ext/mysqli/tests/032.phpt b/ext/mysqli/tests/032.phpt
deleted file mode 100644
index 18bd756a23..0000000000
--- a/ext/mysqli/tests/032.phpt
+++ /dev/null
@@ -1,25 +0,0 @@
---TEST--
-function test: mysqli_info
---SKIPIF--
-<?php require_once('skipif.inc'); ?>
---FILE--
-<?php
- include "connect.inc";
-
- /*** test mysqli_connect 127.0.0.1 ***/
- $link = mysqli_connect($host, $user, $passwd);
-
- mysqli_select_db($link, "test");
-
- mysqli_query($link, "drop table if exists general_test");
- mysqli_query($link, "create table general_test (a int)");
- mysqli_query($link, "insert into general_test values (1),(2),(3)");
-
- $afc = mysqli_info($link);
-
- var_dump($afc);
-
- mysqli_close($link);
-?>
---EXPECT--
-string(38) "Records: 3 Duplicates: 0 Warnings: 0"
diff --git a/ext/mysqli/tests/033.phpt b/ext/mysqli/tests/033.phpt
deleted file mode 100644
index de401f49de..0000000000
--- a/ext/mysqli/tests/033.phpt
+++ /dev/null
@@ -1,20 +0,0 @@
---TEST--
-function test: mysqli_get_host_info
---SKIPIF--
-<?php require_once('skipif.inc'); ?>
-<?php require_once('skipifemb.inc'); ?>
---FILE--
-<?php
- include "connect.inc";
-
- /*** test mysqli_connect 127.0.0.1 ***/
- $link = mysqli_connect($host, $user, $passwd);
-
- $hinfo = mysqli_get_host_info($link);
-
- var_dump(str_replace('/','', $hinfo));
-
- mysqli_close($link);
-?>
---EXPECTF--
-string(%d) "%s via %s"
diff --git a/ext/mysqli/tests/034.phpt b/ext/mysqli/tests/034.phpt
deleted file mode 100644
index 468861c3c2..0000000000
--- a/ext/mysqli/tests/034.phpt
+++ /dev/null
@@ -1,20 +0,0 @@
---TEST--
-function test: mysqli_get_proto_info
---SKIPIF--
-<?php require_once('skipif.inc'); ?>
-<?php require_once('skipifemb.inc'); ?>
---FILE--
-<?php
- include "connect.inc";
-
- /*** test mysqli_connect 127.0.0.1 ***/
- $link = mysqli_connect($host, $user, $passwd);
-
- $pinfo = mysqli_get_proto_info($link);
-
- var_dump($pinfo);
-
- mysqli_close($link);
-?>
---EXPECT--
-int(10)
diff --git a/ext/mysqli/tests/035.phpt b/ext/mysqli/tests/035.phpt
deleted file mode 100644
index ea31222ec7..0000000000
--- a/ext/mysqli/tests/035.phpt
+++ /dev/null
@@ -1,19 +0,0 @@
---TEST--
-function test: mysqli_get_server_info
---SKIPIF--
-<?php require_once('skipif.inc'); ?>
---FILE--
-<?php
- include "connect.inc";
-
- /*** test mysqli_connect 127.0.0.1 ***/
- $link = mysqli_connect($host, $user, $passwd);
-
- $sinfo = substr(mysqli_get_server_info($link),0,1);
-
- var_dump(strlen($sinfo));
-
- mysqli_close($link);
-?>
---EXPECT--
-int(1)
diff --git a/ext/mysqli/tests/036.phpt b/ext/mysqli/tests/036.phpt
deleted file mode 100644
index 057795bb4c..0000000000
--- a/ext/mysqli/tests/036.phpt
+++ /dev/null
@@ -1,51 +0,0 @@
---TEST--
-function test: mysqli_insert_id()
---SKIPIF--
-<?php
- if (PHP_INT_SIZE == 8) {
- echo 'skip test valid only for 32bit systems';
- exit;
- }
- require_once('skipif.inc');
-?>
---FILE--
-<?php
-
- include "connect.inc";
-
- /*** test mysqli_connect 127.0.0.1 ***/
- $link = mysqli_connect($host, $user, $passwd);
-
- mysqli_select_db($link, "test");
-
- mysqli_query($link, "DROP TABLE IF EXISTS t036");
-
- mysqli_query($link, "CREATE TABLE t036 (a bigint not null auto_increment primary key, b varchar(10))");
-
-
- mysqli_query($link, "INSERT INTO t036 (b) VALUES ('foo1')");
- $test[] = mysqli_insert_id($link);
-
- /* we have to insert more values, cause lexer sets auto_increment to max_int
- see mysql bug #54. So we don't check for the value, only for type (which must
- be type string)
- */
-
- mysqli_query($link, "ALTER TABLE t036 AUTO_INCREMENT=9999999999999998");
- mysqli_query($link, "INSERT INTO t036 (b) VALUES ('foo2')");
- mysqli_query($link, "INSERT INTO t036 (b) VALUES ('foo3')");
- mysqli_query($link, "INSERT INTO t036 (b) VALUES ('foo4')");
- $x = mysqli_insert_id($link);
- $test[] = is_string($x);
-
- var_dump($test);
-
- mysqli_close($link);
-?>
---EXPECT--
-array(2) {
- [0]=>
- int(1)
- [1]=>
- bool(true)
-}
diff --git a/ext/mysqli/tests/037.phpt b/ext/mysqli/tests/037.phpt
deleted file mode 100644
index c9089c19be..0000000000
--- a/ext/mysqli/tests/037.phpt
+++ /dev/null
@@ -1,36 +0,0 @@
---TEST--
-function test: mysqli_field_count()
---SKIPIF--
-<?php require_once('skipif.inc'); ?>
---FILE--
-<?php
-
- include "connect.inc";
-
- /*** test mysqli_connect 127.0.0.1 ***/
- $link = mysqli_connect($host, $user, $passwd);
-
- mysqli_select_db($link, "test");
-
- mysqli_query($link, "DROP TABLE IF EXISTS test_result");
-
- mysqli_query($link, "CREATE TABLE test_result (a int, b varchar(10))");
-
- mysqli_query($link, "INSERT INTO test_result VALUES (1, 'foo')");
- $ir[] = mysqli_field_count($link);
-
- mysqli_real_query($link, "SELECT * FROM test_result");
- $ir[] = mysqli_field_count($link);
-
-
- var_dump($ir);
-
- mysqli_close($link);
-?>
---EXPECT--
-array(2) {
- [0]=>
- int(0)
- [1]=>
- int(2)
-}
diff --git a/ext/mysqli/tests/038.phpt b/ext/mysqli/tests/038.phpt
deleted file mode 100644
index ecd4f908f1..0000000000
--- a/ext/mysqli/tests/038.phpt
+++ /dev/null
@@ -1,33 +0,0 @@
---TEST--
-function test: mysqli_num_fields()
---SKIPIF--
-<?php require_once('skipif.inc'); ?>
---FILE--
-<?php
-
- include "connect.inc";
-
- /*** test mysqli_connect 127.0.0.1 ***/
- $link = mysqli_connect($host, $user, $passwd);
-
- mysqli_select_db($link, "test");
-
- mysqli_query($link, "DROP TABLE IF EXISTS test_result");
-
- mysqli_query($link, "CREATE TABLE test_result (a int, b varchar(10))");
-
- mysqli_query($link, "INSERT INTO test_result VALUES (1, 'foo')");
-
- mysqli_real_query($link, "SELECT * FROM test_result");
- if (mysqli_field_count($link)) {
- $result = mysqli_store_result($link);
- $num = mysqli_num_fields($result);
- mysqli_free_result($result);
- }
-
- var_dump($num);
-
- mysqli_close($link);
-?>
---EXPECT--
-int(2)
diff --git a/ext/mysqli/tests/039.phpt b/ext/mysqli/tests/039.phpt
deleted file mode 100644
index 1d5ab99106..0000000000
--- a/ext/mysqli/tests/039.phpt
+++ /dev/null
@@ -1,26 +0,0 @@
---TEST--
-function test: mysqli_num_fields() 2
---SKIPIF--
-<?php require_once('skipif.inc'); ?>
---FILE--
-<?php
-
- include "connect.inc";
-
- /*** test mysqli_connect 127.0.0.1 ***/
- $link = mysqli_connect($host, $user, $passwd);
-
- mysqli_real_query($link, "SHOW VARIABLES");
-
- if (mysqli_field_count($link)) {
- $result = mysqli_store_result($link);
- $num = mysqli_num_fields($result);
- mysqli_free_result($result);
- }
-
- var_dump($num);
-
- mysqli_close($link);
-?>
---EXPECT--
-int(2)
diff --git a/ext/mysqli/tests/040.phpt b/ext/mysqli/tests/040.phpt
deleted file mode 100644
index 79bfe0d5fb..0000000000
--- a/ext/mysqli/tests/040.phpt
+++ /dev/null
@@ -1,33 +0,0 @@
---TEST--
-function test: mysqli_num_rows()
---SKIPIF--
-<?php require_once('skipif.inc'); ?>
---FILE--
-<?php
-
- include "connect.inc";
-
- /*** test mysqli_connect 127.0.0.1 ***/
- $link = mysqli_connect($host, $user, $passwd);
-
- mysqli_select_db($link, "test");
-
- mysqli_query($link, "DROP TABLE IF EXISTS test_result");
-
- mysqli_query($link, "CREATE TABLE test_result (a int, b varchar(10))");
-
- mysqli_query($link, "INSERT INTO test_result VALUES (1, 'foo')");
-
- mysqli_real_query($link, "SELECT * FROM test_result");
- if (mysqli_field_count($link)) {
- $result = mysqli_store_result($link);
- $num = mysqli_num_rows($result);
- mysqli_free_result($result);
- }
-
- var_dump($num);
-
- mysqli_close($link);
-?>
---EXPECT--
-int(1)
diff --git a/ext/mysqli/tests/041.phpt b/ext/mysqli/tests/041.phpt
deleted file mode 100644
index 90bed1ad49..0000000000
--- a/ext/mysqli/tests/041.phpt
+++ /dev/null
@@ -1,22 +0,0 @@
---TEST--
-function test: mysqli_warning_count()
---SKIPIF--
-<?php require_once('skipif.inc'); ?>
---FILE--
-<?php
-
- include "connect.inc";
-
- /*** test mysqli_connect 127.0.0.1 ***/
- $link = mysqli_connect($host, $user, $passwd);
- mysqli_select_db($link, "test");
-
- mysqli_query($link, "DROP TABLE IF EXISTS test_warnings");
- mysqli_query($link, "DROP TABLE IF EXISTS test_warnings");
-
- var_dump(mysqli_warning_count($link));
-
- mysqli_close($link);
-?>
---EXPECT--
-int(1)
diff --git a/ext/mysqli/tests/042.phpt b/ext/mysqli/tests/042.phpt
deleted file mode 100644
index 719e24925d..0000000000
--- a/ext/mysqli/tests/042.phpt
+++ /dev/null
@@ -1,62 +0,0 @@
---TEST--
-mysqli_fetch_object
---SKIPIF--
-<?php require_once('skipif.inc'); ?>
---FILE--
-<?php
- include "connect.inc";
-
- /*** test mysqli_connect 127.0.0.1 ***/
- $link = mysqli_connect($host, $user, $passwd);
-
- mysqli_select_db($link, "test");
- mysqli_query($link, "SET sql_mode=''");
-
- mysqli_query($link,"DROP TABLE IF EXISTS test_bind_fetch");
- mysqli_query($link,"CREATE TABLE test_bind_fetch(c1 smallint unsigned,
- c2 smallint unsigned,
- c3 smallint,
- c4 smallint,
- c5 smallint,
- c6 smallint unsigned,
- c7 smallint)");
-
- $stmt = mysqli_prepare($link, "INSERT INTO test_bind_fetch VALUES (?,?,?,?,?,?,?)");
- mysqli_bind_param($stmt, "iiiiiii", $c1,$c2,$c3,$c4,$c5,$c6,$c7);
-
- $c1 = -23;
- $c2 = 35999;
- $c3 = NULL;
- $c4 = -500;
- $c5 = -9999999;
- $c6 = -0;
- $c7 = 0;
-
- mysqli_execute($stmt);
- mysqli_stmt_close($stmt);
-
- $result = mysqli_query($link, "SELECT * FROM test_bind_fetch");
- $test = mysqli_fetch_object($result);
- mysqli_free_result($result);
-
- var_dump($test);
-
- mysqli_close($link);
-?>
---EXPECTF--
-object(stdClass)#%d (7) {
- ["c1"]=>
- string(1) "0"
- ["c2"]=>
- string(5) "35999"
- ["c3"]=>
- NULL
- ["c4"]=>
- string(4) "-500"
- ["c5"]=>
- string(6) "-32768"
- ["c6"]=>
- string(1) "0"
- ["c7"]=>
- string(1) "0"
-}
diff --git a/ext/mysqli/tests/043.phpt b/ext/mysqli/tests/043.phpt
deleted file mode 100644
index fb0284e06a..0000000000
--- a/ext/mysqli/tests/043.phpt
+++ /dev/null
@@ -1,42 +0,0 @@
---TEST--
-mysqli_bind_param (UPDATE)
---SKIPIF--
-<?php require_once('skipif.inc'); ?>
---FILE--
-<?php
- include "connect.inc";
-
- /*** test mysqli_connect 127.0.0.1 ***/
- $link = mysqli_connect($host, $user, $passwd);
-
- mysqli_select_db($link, "test");
-
- mysqli_query($link,"DROP TABLE IF EXISTS test_update");
- mysqli_query($link,"CREATE TABLE test_update(a varchar(10),
- b int)");
-
- mysqli_query($link, "INSERT INTO test_update VALUES ('foo', 2)");
-
- $stmt = mysqli_prepare($link, "UPDATE test_update SET a=?,b=? WHERE b=?");
- mysqli_bind_param($stmt, "sii", $c1, $c2, $c3);
-
- $c1 = "Rasmus";
- $c2 = 1;
- $c3 = 2;
-
- mysqli_execute($stmt);
- mysqli_stmt_close($stmt);
-
- $result = mysqli_query($link, "SELECT concat(a, ' is No. ', b) FROM test_update");
- $test = mysqli_fetch_row($result);
- mysqli_free_result($result);
-
- var_dump($test);
-
- mysqli_close($link);
-?>
---EXPECT--
-array(1) {
- [0]=>
- string(15) "Rasmus is No. 1"
-}
diff --git a/ext/mysqli/tests/044.phpt b/ext/mysqli/tests/044.phpt
deleted file mode 100644
index 28e73a7e09..0000000000
--- a/ext/mysqli/tests/044.phpt
+++ /dev/null
@@ -1,21 +0,0 @@
---TEST--
-mysqli_get_server_version
---SKIPIF--
-<?php require_once('skipif.inc'); ?>
---FILE--
-<?php
- include "connect.inc";
-
- /*** test mysqli_connect 127.0.0.1 ***/
- $link = mysqli_connect($host, $user, $passwd);
-
- $i = mysqli_get_server_version($link);
-
- $test = $i / $i;
-
- var_dump($test);
-
- mysqli_close($link);
-?>
---EXPECT--
-int(1)
diff --git a/ext/mysqli/tests/045.phpt b/ext/mysqli/tests/045.phpt
deleted file mode 100644
index dd491a6977..0000000000
--- a/ext/mysqli/tests/045.phpt
+++ /dev/null
@@ -1,46 +0,0 @@
---TEST--
-mysqli_bind_result (SHOW)
---SKIPIF--
-<?php
- require_once('skipif.inc');
- require_once('skipifemb.inc');
-
- include "connect.inc";
- $link = mysqli_connect($host, $user, $passwd);
-
-
- $stmt = mysqli_prepare($link, "SHOW VARIABLES LIKE 'port'");
- mysqli_execute($stmt);
-
- if (!$stmt->field_count) {
- printf("skip SHOW command is not supported in prepared statements.");
- }
- $stmt->close();
- mysqli_close($link);
-?>
---FILE--
-<?php
- include "connect.inc";
-
- /*** test mysqli_connect 127.0.0.1 ***/
- $link = mysqli_connect($host, $user, $passwd);
-
- $stmt = mysqli_prepare($link, "SHOW VARIABLES LIKE 'port'");
- mysqli_execute($stmt);
-
- mysqli_bind_result($stmt, $c1, $c2);
- mysqli_fetch($stmt);
- mysqli_stmt_close($stmt);
- $test = array ($c1,$c2);
-
- var_dump($test);
-
- mysqli_close($link);
-?>
---EXPECT--
-array(2) {
- [0]=>
- string(4) "port"
- [1]=>
- string(4) "3306"
-}
diff --git a/ext/mysqli/tests/046.phpt b/ext/mysqli/tests/046.phpt
deleted file mode 100644
index e88348bfa9..0000000000
--- a/ext/mysqli/tests/046.phpt
+++ /dev/null
@@ -1,33 +0,0 @@
---TEST--
-mysqli_stmt_affected_rows (delete)
---SKIPIF--
-<?php require_once('skipif.inc'); ?>
---FILE--
-<?php
- include "connect.inc";
-
- /*** test mysqli_connect 127.0.0.1 ***/
- $link = mysqli_connect($host, $user, $passwd);
-
- mysqli_select_db($link, "test");
-
- mysqli_query($link, "DROP TABLE IF EXISTS test_affected");
- mysqli_query($link, "CREATE TABLE test_affected (foo int)");
-
- mysqli_query($link, "INSERT INTO test_affected VALUES (1),(2),(3),(4),(5)");
-
- $stmt = mysqli_prepare($link, "DELETE FROM test_affected WHERE foo=?");
- mysqli_bind_param($stmt, "i", $c1);
-
- $c1 = 2;
-
- mysqli_execute($stmt);
- $x = mysqli_stmt_affected_rows($stmt);
-
- mysqli_stmt_close($stmt);
- var_dump($x==1);
-
- mysqli_close($link);
-?>
---EXPECT--
-bool(true)
diff --git a/ext/mysqli/tests/047.phpt b/ext/mysqli/tests/047.phpt
deleted file mode 100644
index 4b5df98676..0000000000
--- a/ext/mysqli/tests/047.phpt
+++ /dev/null
@@ -1,196 +0,0 @@
---TEST--
-mysqli_get_metadata
---SKIPIF--
-<?php require_once('skipif.inc'); ?>
---FILE--
-<?php
- include "connect.inc";
-
- /*** test mysqli_connect 127.0.0.1 ***/
- $link = mysqli_connect($host, $user, $passwd);
-
- 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) character set latin1)");
-
- mysqli_query($link, "INSERT INTO test_affected VALUES (1, 'Zak'),(2, 'Greant')");
-
- $stmt = mysqli_prepare($link, "SELECT * FROM test_affected");
- mysqli_execute($stmt);
- $result = mysqli_get_metadata($stmt);
-
- echo "\n=== fetch_fields ===\n";
- var_dump(mysqli_fetch_fields($result));
-
- echo "\n=== fetch_field_direct ===\n";
- var_dump(mysqli_fetch_field_direct($result, 0));
- var_dump(mysqli_fetch_field_direct($result, 1));
-
- echo "\n=== fetch_field ===\n";
- while ($field = mysqli_fetch_field($result)) {
- var_dump($field);
- }
-
- print_r(mysqli_fetch_lengths($result));
-
- mysqli_free_result($result);
-
-
- mysqli_stmt_close($stmt);
- mysqli_close($link);
-?>
---EXPECTF--
-=== fetch_fields ===
-array(2) {
- [0]=>
- object(stdClass)#5 (11) {
- ["name"]=>
- string(3) "foo"
- ["orgname"]=>
- string(3) "foo"
- ["table"]=>
- string(13) "test_affected"
- ["orgtable"]=>
- string(13) "test_affected"
- ["def"]=>
- string(0) ""
- ["max_length"]=>
- int(0)
- ["length"]=>
- int(11)
- ["charsetnr"]=>
- int(63)
- ["flags"]=>
- int(32768)
- ["type"]=>
- int(3)
- ["decimals"]=>
- int(0)
- }
- [1]=>
- object(stdClass)#6 (11) {
- ["name"]=>
- string(3) "bar"
- ["orgname"]=>
- string(3) "bar"
- ["table"]=>
- string(13) "test_affected"
- ["orgtable"]=>
- string(13) "test_affected"
- ["def"]=>
- string(0) ""
- ["max_length"]=>
- int(0)
- ["length"]=>
- int(10)
- ["charsetnr"]=>
- int(8)
- ["flags"]=>
- int(0)
- ["type"]=>
- int(253)
- ["decimals"]=>
- int(0)
- }
-}
-
-=== fetch_field_direct ===
-object(stdClass)#6 (11) {
- ["name"]=>
- string(3) "foo"
- ["orgname"]=>
- string(3) "foo"
- ["table"]=>
- string(13) "test_affected"
- ["orgtable"]=>
- string(13) "test_affected"
- ["def"]=>
- string(0) ""
- ["max_length"]=>
- int(0)
- ["length"]=>
- int(11)
- ["charsetnr"]=>
- int(63)
- ["flags"]=>
- int(32768)
- ["type"]=>
- int(3)
- ["decimals"]=>
- int(0)
-}
-object(stdClass)#6 (11) {
- ["name"]=>
- string(3) "bar"
- ["orgname"]=>
- string(3) "bar"
- ["table"]=>
- string(13) "test_affected"
- ["orgtable"]=>
- string(13) "test_affected"
- ["def"]=>
- string(0) ""
- ["max_length"]=>
- int(0)
- ["length"]=>
- int(10)
- ["charsetnr"]=>
- int(8)
- ["flags"]=>
- int(0)
- ["type"]=>
- int(253)
- ["decimals"]=>
- int(0)
-}
-
-=== fetch_field ===
-object(stdClass)#6 (11) {
- ["name"]=>
- string(3) "foo"
- ["orgname"]=>
- string(3) "foo"
- ["table"]=>
- string(13) "test_affected"
- ["orgtable"]=>
- string(13) "test_affected"
- ["def"]=>
- string(0) ""
- ["max_length"]=>
- int(0)
- ["length"]=>
- int(11)
- ["charsetnr"]=>
- int(63)
- ["flags"]=>
- int(32768)
- ["type"]=>
- int(3)
- ["decimals"]=>
- int(0)
-}
-object(stdClass)#5 (11) {
- ["name"]=>
- string(3) "bar"
- ["orgname"]=>
- string(3) "bar"
- ["table"]=>
- string(13) "test_affected"
- ["orgtable"]=>
- string(13) "test_affected"
- ["def"]=>
- string(0) ""
- ["max_length"]=>
- int(0)
- ["length"]=>
- int(10)
- ["charsetnr"]=>
- int(8)
- ["flags"]=>
- int(0)
- ["type"]=>
- int(253)
- ["decimals"]=>
- int(0)
-} \ No newline at end of file
diff --git a/ext/mysqli/tests/048.phpt b/ext/mysqli/tests/048.phpt
deleted file mode 100644
index 1cf5b67894..0000000000
--- a/ext/mysqli/tests/048.phpt
+++ /dev/null
@@ -1,62 +0,0 @@
---TEST--
-mysqli bind_result (OO-Style)
---SKIPIF--
-<?php require_once('skipif.inc'); ?>
---FILE--
-<?php
- include "connect.inc";
-
- /*** test mysqli_connect 127.0.0.1 ***/
- $mysql = mysqli_connect($host, $user, $passwd);
-
- $mysql->select_db("test");
- $mysql->query("DROP TABLE IF EXISTS test_fetch_null");
-
- $mysql->query("CREATE TABLE test_fetch_null(col1 tinyint, col2 smallint,
- col3 int, col4 bigint,
- col5 float, col6 double,
- col7 date, col8 time,
- col9 varbinary(10),
- col10 varchar(50),
- col11 char(20))");
-
- $mysql->query("INSERT INTO test_fetch_null(col1,col10, col11) VALUES(1,'foo1', 1000),(2,'foo2', 88),(3,'foo3', 389789)");
-
- $stmt = $mysql->prepare("SELECT col1, col2, col3, col4, col5, col6, col7, col8, col9, col10, col11 from test_fetch_null");
- $stmt->bind_result($c1, $c2, $c3, $c4, $c5, $c6, $c7, $c8, $c9, $c10, $c11);
- $stmt->execute();
-
- $stmt->fetch();
-
- $test = array($c1,$c2,$c3,$c4,$c5,$c6,$c7,$c8,$c9,$c10,$c11);
-
- var_dump($test);
-
- $stmt->close();
- $mysql->close();
-?>
---EXPECT--
-array(11) {
- [0]=>
- int(1)
- [1]=>
- NULL
- [2]=>
- NULL
- [3]=>
- NULL
- [4]=>
- NULL
- [5]=>
- NULL
- [6]=>
- NULL
- [7]=>
- NULL
- [8]=>
- NULL
- [9]=>
- string(4) "foo1"
- [10]=>
- string(4) "1000"
-}
diff --git a/ext/mysqli/tests/049.phpt b/ext/mysqli/tests/049.phpt
deleted file mode 100644
index 4bb5bfef45..0000000000
--- a/ext/mysqli/tests/049.phpt
+++ /dev/null
@@ -1,26 +0,0 @@
---TEST--
-mysql_fetch_row (OO-Style)
---SKIPIF--
-<?php require_once('skipif.inc'); ?>
-<?php require_once('skipifemb.inc'); ?>
---FILE--
-<?php
- include "connect.inc";
-
- /*** test mysqli_connect 127.0.0.1 ***/
- $mysql = mysqli_connect($host, $user, $passwd);
-
- $mysql->select_db("test");
- $result = $mysql->query("SELECT DATABASE()");
- $row = $result->fetch_row();
- $result->close();
-
- var_dump($row);
-
- $mysql->close();
-?>
---EXPECT--
-array(1) {
- [0]=>
- string(4) "test"
-}
diff --git a/ext/mysqli/tests/050.phpt b/ext/mysqli/tests/050.phpt
deleted file mode 100644
index 5f923ccf34..0000000000
--- a/ext/mysqli/tests/050.phpt
+++ /dev/null
@@ -1,21 +0,0 @@
---TEST--
-non freed statement test
---SKIPIF--
-<?php require_once('skipif.inc'); ?>
---FILE--
-<?php
- include "connect.inc";
-
- /************************
- * non freed stamement
- ************************/
- $link = mysqli_connect($host, $user, $passwd);
-
- $stmt = mysqli_prepare($link, "SELECT CURRENT_USER()");
- mysqli_execute($stmt);
-
- mysqli_close($link);
- printf("Ok\n");
-?>
---EXPECT--
-Ok
diff --git a/ext/mysqli/tests/051.phpt b/ext/mysqli/tests/051.phpt
deleted file mode 100644
index ef378757f1..0000000000
--- a/ext/mysqli/tests/051.phpt
+++ /dev/null
@@ -1,22 +0,0 @@
---TEST--
-free statement after close
---SKIPIF--
-<?php require_once('skipif.inc'); ?>
---FILE--
-<?php
- include "connect.inc";
-
- /************************
- * free statement after close
- ************************/
- $link = mysqli_connect($host, $user, $passwd);
-
- $stmt1 = mysqli_prepare($link, "SELECT CURRENT_USER()");
- mysqli_execute($stmt1);
-
- mysqli_close($link);
- @mysqli_stmt_close($stmt1);
- printf("Ok\n");
-?>
---EXPECT--
-Ok
diff --git a/ext/mysqli/tests/052.phpt b/ext/mysqli/tests/052.phpt
deleted file mode 100644
index 3fa5dc8f17..0000000000
--- a/ext/mysqli/tests/052.phpt
+++ /dev/null
@@ -1,22 +0,0 @@
---TEST--
-call statement after close
---SKIPIF--
-<?php require_once('skipif.inc'); ?>
---FILE--
-<?php
- include "connect.inc";
-
- /************************
- * statement call after close
- ************************/
- $link = mysqli_connect($host, $user, $passwd);
-
- $stmt2 = mysqli_prepare($link, "SELECT CURRENT_USER()");
-
- mysqli_close($link);
- @mysqli_execute($stmt2);
- @mysqli_stmt_close($stmt2);
- printf("Ok\n");
-?>
---EXPECT--
-Ok
diff --git a/ext/mysqli/tests/053.phpt b/ext/mysqli/tests/053.phpt
deleted file mode 100644
index 99148c7e80..0000000000
--- a/ext/mysqli/tests/053.phpt
+++ /dev/null
@@ -1,20 +0,0 @@
---TEST--
-not freed resultset
---SKIPIF--
-<?php require_once('skipif.inc'); ?>
---FILE--
-<?php
- include "connect.inc";
-
- /************************
- * non freed resultset
- ************************/
- $link = mysqli_connect($host, $user, $passwd);
-
- $result = mysqli_query($link, "SELECT CURRENT_USER()");
- mysqli_close($link);
- printf("Ok\n");
-
-?>
---EXPECT--
-Ok
diff --git a/ext/mysqli/tests/054.phpt b/ext/mysqli/tests/054.phpt
deleted file mode 100644
index 727b87ef8e..0000000000
--- a/ext/mysqli/tests/054.phpt
+++ /dev/null
@@ -1,20 +0,0 @@
---TEST--
-free resultset after close
---SKIPIF--
-<?php require_once('skipif.inc'); ?>
---FILE--
-<?php
- include "connect.inc";
-
- /************************
- * free resultset after close
- ************************/
- $link = mysqli_connect($host, $user, $passwd);
-
- $result1 = mysqli_query($link, "SELECT CURRENT_USER()");
- mysqli_close($link);
- mysqli_free_result($result1);
- printf("Ok\n");
-?>
---EXPECT--
-Ok
diff --git a/ext/mysqli/tests/055.phpt b/ext/mysqli/tests/055.phpt
deleted file mode 100644
index e650dbcecd..0000000000
--- a/ext/mysqli/tests/055.phpt
+++ /dev/null
@@ -1,19 +0,0 @@
---TEST--
-free nothing
---SKIPIF--
-<?php require_once('skipif.inc'); ?>
---FILE--
-<?php
- include "connect.inc";
-
- /************************
- * don't free anything
- ************************/
- $link = mysqli_connect($host, $user, $passwd);
-
- $result2 = mysqli_query($link, "SELECT CURRENT_USER()");
- $stmt2 = mysqli_prepare($link, "SELECT CURRENT_USER()");
- printf("Ok\n");
-?>
---EXPECT--
-Ok
diff --git a/ext/mysqli/tests/056.phpt b/ext/mysqli/tests/056.phpt
deleted file mode 100644
index cc5c32fc60..0000000000
--- a/ext/mysqli/tests/056.phpt
+++ /dev/null
@@ -1,21 +0,0 @@
---TEST--
-extend mysqli
---SKIPIF--
-<?php require_once('skipif.inc'); ?>
---FILE--
-<?php
- include "connect.inc";
-
- class foobar extends mysqli {
- function test () {
- return ("I like MySQL 4.1");
- }
- }
-
- $foo = new foobar();
- $foo->connect($host, $user, $passwd);
- $foo->close();
- printf("%s\n", $foo->test());
-?>
---EXPECT--
-I like MySQL 4.1
diff --git a/ext/mysqli/tests/057.phpt b/ext/mysqli/tests/057.phpt
deleted file mode 100644
index a987c72381..0000000000
--- a/ext/mysqli/tests/057.phpt
+++ /dev/null
@@ -1,54 +0,0 @@
---TEST--
-mysqli_get_metadata
---SKIPIF--
-<?php require_once('skipif.inc'); ?>
---FILE--
-<?php
- include "connect.inc";
-
- /*** test mysqli_connect 127.0.0.1 ***/
- $link = mysqli_connect($host, $user, $passwd);
-
- mysqli_select_db($link, "test");
-
- mysqli_query($link,"DROP TABLE IF EXISTS test_store_result");
- mysqli_query($link,"CREATE TABLE test_store_result (a int)");
-
- mysqli_query($link, "INSERT INTO test_store_result VALUES (1),(2),(3)");
-
- $stmt = mysqli_prepare($link, "SELECT * FROM test_store_result");
- mysqli_execute($stmt);
-
- /* this should produce an out of sync error */
- if ($result = mysqli_query($link, "SELECT * FROM test_store_result")) {
- mysqli_free_result($result);
- printf ("Query ok\n");
- }
- mysqli_stmt_close($stmt);
-
- $stmt = mysqli_prepare($link, "SELECT * FROM test_store_result");
- mysqli_execute($stmt);
- $result1 = mysqli_get_metadata($stmt);
- mysqli_stmt_store_result($stmt);
-
- printf ("Rows: %d\n", mysqli_stmt_affected_rows($stmt));
-
- /* this should show an error, cause results are not buffered */
- if ($result = mysqli_query($link, "SELECT * FROM test_store_result")) {
- $row = mysqli_fetch_row($result);
- mysqli_free_result($result);
- }
-
-
- var_dump($row);
-
- mysqli_free_result($result1);
- mysqli_stmt_close($stmt);
- mysqli_close($link);
-?>
---EXPECT--
-Rows: 3
-array(1) {
- [0]=>
- string(1) "1"
-}
diff --git a/ext/mysqli/tests/058.phpt b/ext/mysqli/tests/058.phpt
deleted file mode 100644
index 7554d08f68..0000000000
--- a/ext/mysqli/tests/058.phpt
+++ /dev/null
@@ -1,57 +0,0 @@
---TEST--
-multiple binds
---SKIPIF--
-<?php require_once('skipif.inc'); ?>
---FILE--
-<?php
- include "connect.inc";
-
- /*** test mysqli_connect 127.0.0.1 ***/
- $link = mysqli_connect($host, $user, $passwd);
-
- mysqli_select_db($link, "test");
-
- mysqli_query($link,"DROP TABLE IF EXISTS mbind");
- mysqli_query($link,"CREATE TABLE mbind (a int, b varchar(10))");
-
- $stmt = mysqli_prepare($link, "INSERT INTO mbind VALUES (?,?)");
-
- mysqli_bind_param($stmt, "is", $a, $b);
-
- $a = 1;
- $b = "foo";
-
- mysqli_execute($stmt);
-
- mysqli_bind_param($stmt, "is", $c, $d);
-
- $c = 2;
- $d = "bar";
-
- mysqli_execute($stmt);
- mysqli_stmt_close($stmt);
-
- $stmt = mysqli_prepare($link, "SELECT * FROM mbind");
- mysqli_execute($stmt);
-
- mysqli_bind_result($stmt, $e, $f);
- mysqli_fetch($stmt);
-
- mysqli_bind_result($stmt, $g, $h);
- mysqli_fetch($stmt);
-
- var_dump((array($e,$f,$g,$h)));
-
- mysqli_close($link);
-?>
---EXPECT--
-array(4) {
- [0]=>
- int(1)
- [1]=>
- string(3) "foo"
- [2]=>
- int(2)
- [3]=>
- string(3) "bar"
-}
diff --git a/ext/mysqli/tests/059.phpt b/ext/mysqli/tests/059.phpt
deleted file mode 100644
index 0bc8a62bbf..0000000000
--- a/ext/mysqli/tests/059.phpt
+++ /dev/null
@@ -1,41 +0,0 @@
---TEST--
-sqlmode + bind
---SKIPIF--
-<?php require_once('skipif.inc'); ?>
---FILE--
-<?php
- include "connect.inc";
-
- /*** test mysqli_connect 127.0.0.1 ***/
- $link = mysqli_connect($host, $user, $passwd);
-
- mysqli_select_db($link, "test");
-
- mysqli_query($link, "SET SQL_MODE='PIPES_AS_CONCAT'");
-
- mysqli_query($link,"DROP TABLE IF EXISTS mbind");
- mysqli_query($link,"CREATE TABLE mbind (b varchar(25))");
-
- $stmt = mysqli_prepare($link, "INSERT INTO mbind VALUES (?||?)");
-
- mysqli_bind_param($stmt, "ss", $a, $b);
-
- $a = "foo";
- $b = "bar";
-
- mysqli_execute($stmt);
-
- mysqli_stmt_close($stmt);
-
- $stmt = mysqli_prepare($link, "SELECT * FROM mbind");
- mysqli_execute($stmt);
-
- mysqli_bind_result($stmt, $e);
- mysqli_fetch($stmt);
-
- var_dump($e);
-
- mysqli_close($link);
-?>
---EXPECT--
-string(6) "foobar"
diff --git a/ext/mysqli/tests/060.phpt b/ext/mysqli/tests/060.phpt
deleted file mode 100644
index ba6c231c57..0000000000
--- a/ext/mysqli/tests/060.phpt
+++ /dev/null
@@ -1,60 +0,0 @@
---TEST--
-mysqli_fetch_object with classes
---SKIPIF--
-<?php require_once('skipif.inc'); ?>
---FILE--
-<?php
- include "connect.inc";
-
- class test_class {
- function __construct($arg1, $arg2) {
- echo __METHOD__ . "($arg1,$arg2)\n";
- }
- }
-
- /*** test mysqli_connect 127.0.0.1 ***/
- $link = mysqli_connect($host, $user, $passwd);
-
- mysqli_select_db($link, "test");
- mysqli_query($link, "SET sql_mode=''");
-
- mysqli_query($link,"DROP TABLE IF EXISTS test_fetch");
- mysqli_query($link,"CREATE TABLE test_fetch(c1 smallint unsigned,
- c2 smallint unsigned,
- c3 smallint,
- c4 smallint,
- c5 smallint,
- c6 smallint unsigned,
- c7 smallint)");
-
- mysqli_query($link, "INSERT INTO test_fetch VALUES ( -23, 35999, NULL, -500, -9999999, -0, 0)");
-
- $result = mysqli_query($link, "SELECT * FROM test_bind_fetch");
- $test = mysqli_fetch_object($result, 'test_class', array(1, 2));
- mysqli_free_result($result);
-
- var_dump($test);
-
- mysqli_close($link);
-
- echo "Done\n";
-?>
---EXPECTF--
-test_class::__construct(1,2)
-object(test_class)#%d (7) {
- ["c1"]=>
- string(1) "0"
- ["c2"]=>
- string(5) "35999"
- ["c3"]=>
- NULL
- ["c4"]=>
- string(4) "-500"
- ["c5"]=>
- string(6) "-32768"
- ["c6"]=>
- string(1) "0"
- ["c7"]=>
- string(1) "0"
-}
-Done
diff --git a/ext/mysqli/tests/061.phpt b/ext/mysqli/tests/061.phpt
deleted file mode 100644
index c7a217f274..0000000000
--- a/ext/mysqli/tests/061.phpt
+++ /dev/null
@@ -1,44 +0,0 @@
---TEST--
-local infile handler
---SKIPIF--
-<?php require_once('skipif.inc'); ?>
-<?php require_once('skipifemb.inc'); ?>
---FILE--
-<?php
- include "connect.inc";
-
- function my_read($fp, &$buffer, $buflen, &$error) {
- $buffer = strrev(fread($fp, $buflen));
- return(strlen($buffer));
- }
-
- /*** test mysqli_connect 127.0.0.1 ***/
- $link = mysqli_connect($host, $user, $passwd, "test");
-
- /* create temporary file */
- $filename = dirname(__FILE__) . "061.csv";
- $fp = fopen($filename, "w");
- fwrite($fp, "foo;bar");
- fclose($fp);
-
- mysqli_query($link,"DROP TABLE IF EXISTS t_061");
- mysqli_query($link,"CREATE TABLE t_061 (c1 varchar(10), c2 varchar(10))");
-
- mysqli_query($link, "LOAD DATA LOCAL INFILE '{$filename}' INTO TABLE t_061 FIELDS TERMINATED BY ';'");
-
- mysqli_set_local_infile_handler($link, "my_read");
- mysqli_query($link, "LOAD DATA LOCAL INFILE '{$filename}' INTO TABLE t_061 FIELDS TERMINATED BY ';'");
-
- if ($result = mysqli_query($link, "SELECT c1,c2 FROM t_061")) {
- while (($row = mysqli_fetch_row($result))) {
- printf("%s-%s\n", $row[0], $row[1]);
- }
- mysqli_free_result($result);
- }
-
- mysqli_close($link);
- unlink($filename);
-?>
---EXPECT--
-foo-bar
-rab-oof
diff --git a/ext/mysqli/tests/062.phpt b/ext/mysqli/tests/062.phpt
deleted file mode 100644
index 962abce162..0000000000
--- a/ext/mysqli/tests/062.phpt
+++ /dev/null
@@ -1,25 +0,0 @@
---TEST--
-resultset constructor
---SKIPIF--
-<?php require_once('skipif.inc'); ?>
---FILE--
-<?php
- include "connect.inc";
-
- $mysql = new mysqli($host, $user, $passwd);
-
- $mysql->real_query("SELECT 'foo' FROM DUAL");
-
- $myresult = new mysqli_result($mysql);
-
- $row = $myresult->fetch_row();
- $myresult->close();
- $mysql->close();
-
- var_dump($row);
-?>
---EXPECT--
-array(1) {
- [0]=>
- string(3) "foo"
-}
diff --git a/ext/mysqli/tests/063.phpt b/ext/mysqli/tests/063.phpt
deleted file mode 100644
index 9dd01629aa..0000000000
--- a/ext/mysqli/tests/063.phpt
+++ /dev/null
@@ -1,21 +0,0 @@
---TEST--
-resultset constructor
---SKIPIF--
-<?php require_once('skipif.inc'); ?>
---FILE--
-<?php
- include "connect.inc";
-
- $mysql = new mysqli($host, $user, $passwd);
-
- $stmt = new mysqli_stmt($mysql, "SELECT 'foo' FROM DUAL");
- $stmt->execute();
- $stmt->bind_result($foo);
- $stmt->fetch();
- $stmt->close();
- $mysql->close();
-
- var_dump($foo);
-?>
---EXPECT--
-string(3) "foo"
diff --git a/ext/mysqli/tests/064.phpt b/ext/mysqli/tests/064.phpt
deleted file mode 100644
index e6df1e4505..0000000000
--- a/ext/mysqli/tests/064.phpt
+++ /dev/null
@@ -1,21 +0,0 @@
---TEST--
-NULL binding
---SKIPIF--
-<?php require_once('skipif.inc'); ?>
---FILE--
-<?php
- include "connect.inc";
-
- $mysql = new mysqli($host, $user, $passwd);
-
- $stmt = new mysqli_stmt($mysql, "SELECT NULL FROM DUAL");
- $stmt->execute();
- $stmt->bind_result($foo);
- $stmt->fetch();
- $stmt->close();
- $mysql->close();
-
- var_dump($foo);
-?>
---EXPECT--
-NULL
diff --git a/ext/mysqli/tests/065.phpt b/ext/mysqli/tests/065.phpt
deleted file mode 100644
index 09ee886ec5..0000000000
--- a/ext/mysqli/tests/065.phpt
+++ /dev/null
@@ -1,41 +0,0 @@
---TEST--
-set character set
---SKIPIF--
-<?php
-require_once('skipif.inc');
-if (!function_exists('mysqli_set_charset')) {
- die('skip mysqli_set_charset() not available');
-}
-?>
---FILE--
-<?php
- include "connect.inc";
-
- $mysql = new mysqli($host, $user, $passwd);
- mysqli_query($mysql, "SET sql_mode=''");
-
- $esc_str = chr(0xbf) . chr(0x5c);
-
- if ($mysql->set_charset("latin1")) {
- /* 5C should be escaped */
- $len[0] = strlen($mysql->real_escape_string($esc_str));
- $charset[0] = $mysql->client_encoding();
- }
-
- if ($mysql->set_charset("gbk")) {
- /* nothing should be escaped, it's a valid gbk character */
- $len[1] = strlen($mysql->real_escape_string($esc_str));
- $charset[1] = $mysql->client_encoding();
- }
-
- $mysql->close();
- var_dump($len[0]);
- var_dump($len[1]);
- var_dump($charset[0]);
- var_dump($charset[1]);
-?>
---EXPECT--
-int(3)
-int(2)
-string(6) "latin1"
-string(3) "gbk"
diff --git a/ext/mysqli/tests/066.phpt b/ext/mysqli/tests/066.phpt
deleted file mode 100644
index 01434f8d3f..0000000000
--- a/ext/mysqli/tests/066.phpt
+++ /dev/null
@@ -1,28 +0,0 @@
---TEST--
-function test: mysqli_warning object
---SKIPIF--
-<?php require_once('skipif.inc'); ?>
---FILE--
-<?php
-
- include "connect.inc";
-
- /*** test mysqli_connect 127.0.0.1 ***/
- $mysql = new mysqli($host, $user, $passwd, "test");
-
- $mysql->query("DROP TABLE IF EXISTS test_warnings");
-
- $mysql->query("CREATE TABLE test_warnings (a int not null)");
-
- $mysql->query("INSERT INTO test_warnings VALUES (1),(2),(NULL)");
-
- if (($warning = new mysqli_warning($mysql))) {
- do {
- printf("Warning\n");
- } while ($warning->next());
- }
-
- $mysql->close();
-?>
---EXPECT--
-Warning
diff --git a/ext/mysqli/tests/067.phpt b/ext/mysqli/tests/067.phpt
deleted file mode 100644
index d58d24cfee..0000000000
--- a/ext/mysqli/tests/067.phpt
+++ /dev/null
@@ -1,51 +0,0 @@
---TEST--
-function test: nested selects (cursors)
---SKIPIF--
-<?php
- require_once('skipif.inc');
- /* skip cursor test for versions < 50004 */
- if (mysqli_get_client_version() < 50009) {
- die("skip Client library doesn't support cursors");
- }
-?>
---FILE--
-<?php
-
- function open_cursor($mysql, $query) {
- $stmt = $mysql->prepare($query);
- $stmt->attr_set(MYSQLI_STMT_ATTR_CURSOR_TYPE, MYSQLI_CURSOR_TYPE_READ_ONLY);
- return $stmt;
- }
-
- include "connect.inc";
- $a = array();
-
- /*** test mysqli_connect 127.0.0.1 ***/
- $mysql = new mysqli($host, $user, $passwd, "test");
-
- for ($i=0;$i < 3; $i++) {
- $mysql->query("DROP TABLE IF EXISTS cursor$i");
- $mysql->query("CREATE TABLE cursor$i (a int not null)");
- $mysql->query("INSERT INTO cursor$i VALUES (1),(2),(3),(4),(5),(6)");
- $stmt[$i] = open_cursor($mysql, "SELECT a FROM cursor$i");
- $stmt[$i]->execute();
- $stmt[$i]->bind_result($a[$i]);
- }
-
-
- $cnt = 0;
- while ($stmt[0]->fetch()) {
- $stmt[1]->fetch();
- $stmt[2]->fetch();
- $cnt += $a[0] + $a[1] + $a[2];
- }
-
- for ($i=0; $i < 3; $i++) {
- $stmt[$i]->close();
- }
-
- $mysql->close();
- var_dump($cnt);
-?>
---EXPECT--
-int(63)
diff --git a/ext/mysqli/tests/068.phpt b/ext/mysqli/tests/068.phpt
deleted file mode 100644
index ab407c1ad8..0000000000
--- a/ext/mysqli/tests/068.phpt
+++ /dev/null
@@ -1,33 +0,0 @@
---TEST--
-mysqli_autocommit() tests
---SKIPIF--
-<?php
- require_once('skipif.inc');
-?>
---FILE--
-<?php
-
-include "connect.inc";
-
-$mysqli = new mysqli($host, $user, $passwd, "test");
-
-var_dump($mysqli->autocommit(false));
-$result = $mysqli->query("SELECT @@autocommit");
-var_dump($result->fetch_row());
-
-var_dump($mysqli->autocommit(true));
-$result = $mysqli->query("SELECT @@autocommit");
-var_dump($result->fetch_row());
-
-?>
---EXPECT--
-bool(true)
-array(1) {
- [0]=>
- string(1) "0"
-}
-bool(true)
-array(1) {
- [0]=>
- string(1) "1"
-}
diff --git a/ext/mysqli/tests/071.phpt b/ext/mysqli/tests/071.phpt
deleted file mode 100644
index 75ff3e850d..0000000000
--- a/ext/mysqli/tests/071.phpt
+++ /dev/null
@@ -1,36 +0,0 @@
---TEST--
-mysqli thread_id & kill
---SKIPIF--
-<?php require_once('skipif.inc'); ?>
-<?php require_once('skipifemb.inc'); ?>
---FILE--
-<?php
- include "connect.inc";
-
- $mysql = new mysqli($host, $user, $passwd, "test");
-
- var_dump($mysql->ping());
-
- var_dump($mysql->kill($mysql->thread_id));
-
- var_dump($mysql->ping());
-
- $mysql->close();
-
- $mysql = new mysqli($host, $user, $passwd, "test");
-
- var_dump(mysqli_ping($mysql));
-
- var_dump(mysqli_kill($mysql, mysqli_thread_id($mysql)));
-
- var_dump(mysqli_ping($mysql));
-
- $mysql->close();
-?>
---EXPECT--
-bool(true)
-bool(true)
-bool(false)
-bool(true)
-bool(true)
-bool(false)
diff --git a/ext/mysqli/tests/072.phpt b/ext/mysqli/tests/072.phpt
deleted file mode 100644
index 8c85175ea2..0000000000
--- a/ext/mysqli/tests/072.phpt
+++ /dev/null
@@ -1,27 +0,0 @@
---TEST--
-mysqli warning_count, get_warnings
---SKIPIF--
-<?php require_once('skipif.inc'); ?>
-<?php die('skip mysqli_warning class not functional yet?'); ?>
---FILE--
-<?php
- include "connect.inc";
-
- $mysql = new mysqli($host, $user, $passwd, "test");
-
- $mysql->query("DROP TABLE IF EXISTS not_exists");
-
- var_dump($mysql->warning_count);
-
- $w = $mysql->get_warnings();
-
- var_dump($w->errno);
- var_dump($w->message);
-# var_dump($w->sqlstate);
-
- $mysql->close();
-?>
---EXPECT--
-1
-1051
-Unknown table 'not_exists' \ No newline at end of file
diff --git a/ext/mysqli/tests/073.phpt b/ext/mysqli/tests/073.phpt
deleted file mode 100644
index 5a017a2cb4..0000000000
--- a/ext/mysqli/tests/073.phpt
+++ /dev/null
@@ -1,23 +0,0 @@
---TEST--
-mysqli_driver properties
---SKIPIF--
-<?php require_once('skipif.inc'); ?>
---FILE--
-<?php
- include "connect.inc";
-
- var_dump( $driver->embedded);
- var_dump( $driver->client_version);
- var_dump( $driver->client_info);
- var_dump( $driver->driver_version);
- var_dump( $driver->reconnect);
- var_dump( $driver->report_mode);
-
-?>
---EXPECTF--
-bool(%s)
-int(%d)
-string(%d) "%s"
-int(%d)
-bool(%s)
-int(%d)
diff --git a/ext/mysqli/tests/bug28817.phpt b/ext/mysqli/tests/bug28817.phpt
deleted file mode 100644
index 0cc8b13612..0000000000
--- a/ext/mysqli/tests/bug28817.phpt
+++ /dev/null
@@ -1,39 +0,0 @@
---TEST--
-Bug #28817 testcase (properties)
---SKIPIF--
-<?php require_once('skipif.inc'); ?>
---FILE--
-<?php
- include "connect.inc";
-
- class my_mysql extends mysqli {
- public $p_test;
-
- function __construct() {
- $this->p_test[] = "foo";
- $this->p_test[] = "bar";
- }
- }
-
-
- $mysql = new my_mysql();
-
- var_dump($mysql->p_test);
- @var_dump($mysql->errno);
-
- $mysql->connect($host, $user, $passwd);
- $mysql->select_db("nonexistingdb");
-
- var_dump($mysql->errno > 0);
-
- $mysql->close();
-?>
---EXPECTF--
-array(2) {
- [0]=>
- string(3) "foo"
- [1]=>
- string(3) "bar"
-}
-NULL
-bool(true)
diff --git a/ext/mysqli/tests/bug29311.phpt b/ext/mysqli/tests/bug29311.phpt
deleted file mode 100644
index b50de178b2..0000000000
--- a/ext/mysqli/tests/bug29311.phpt
+++ /dev/null
@@ -1,48 +0,0 @@
---TEST--
-constructor test
---SKIPIF--
-<?php require_once('skipif.inc'); ?>
---FILE--
-<?php
- include "connect.inc";
-
- /* class 1 calls parent constructor */
- class mysql1 extends mysqli {
- function __construct() {
- global $host, $user, $passwd;
- parent::__construct($host, $user, $passwd, "test");
- }
- }
-
- /* class 2 has an own constructor */
- class mysql2 extends mysqli {
-
- function __construct() {
- global $host, $user, $passwd;
- $this->connect($host, $user, $passwd, "test");
- }
- }
-
- /* class 3 has no constructor */
- class mysql3 extends mysqli {
-
- }
-
- $foo[0] = new mysql1();
- $foo[1] = new mysql2();
- $foo[2] = new mysql3($host, $user, $passwd, "test");
-
-
- for ($i=0; $i < 3; $i++) {
- if (($result = $foo[$i]->query("SELECT DATABASE()"))) {
- $row = $result->fetch_row();
- printf("%d: %s\n", $i, $row[0]);
- $result->close();
- }
- $foo[$i]->close();
- }
-?>
---EXPECTF--
-0: test
-1: test
-2: test
diff --git a/ext/mysqli/tests/bug30967.phpt b/ext/mysqli/tests/bug30967.phpt
deleted file mode 100644
index 0a82d0d43c..0000000000
--- a/ext/mysqli/tests/bug30967.phpt
+++ /dev/null
@@ -1,23 +0,0 @@
---TEST--
-Bug #30967 testcase (properties)
---SKIPIF--
-<?php require_once('skipif.inc'); ?>
---FILE--
-<?php
- include "connect.inc";
-
- class mysql1 extends mysqli {
- }
-
- class mysql2 extends mysql1 {
- }
-
- $mysql = new mysql2($host, $user, $passwd, "test");
-
- $mysql->query("THIS DOES NOT WORK");
- printf("%d\n", $mysql->errno);
-
- $mysql->close();
-?>
---EXPECTF--
-1064
diff --git a/ext/mysqli/tests/bug31141.phpt b/ext/mysqli/tests/bug31141.phpt
deleted file mode 100644
index acad79f1f9..0000000000
--- a/ext/mysqli/tests/bug31141.phpt
+++ /dev/null
@@ -1,28 +0,0 @@
---TEST--
-Bug #31141 testcase (properties)
---SKIPIF--
-<?php require_once('skipif.inc'); ?>
---FILE--
-<?php
-class Test extends mysqli
-{
- public $test = array();
-
- function foo()
- {
- $ar_test = array("foo", "bar");
- $this->test = &$ar_test;
- }
-}
-
-$my_test = new Test;
-$my_test->foo();
-var_dump($my_test->test);
-?>
---EXPECTF--
-array(2) {
- [0]=>
- string(3) "foo"
- [1]=>
- string(3) "bar"
-}
diff --git a/ext/mysqli/tests/bug31668.phpt b/ext/mysqli/tests/bug31668.phpt
deleted file mode 100644
index b813096a2a..0000000000
--- a/ext/mysqli/tests/bug31668.phpt
+++ /dev/null
@@ -1,56 +0,0 @@
---TEST--
-Bug #31668 multi_query works exactly every other time (multi_query was global, now per connection)
---SKIPIF--
-<?php require_once('skipif.inc'); ?>
---FILE--
-<?php
- include "connect.inc";
-
- $mysql = new mysqli($host, $user, $passwd, "test");
- $mysql->multi_query('SELECT 1;SELECT 2');
- do {
- $res = $mysql->store_result();
- if ($mysql->errno == 0) {
- while ($arr = $res->fetch_assoc()) {
- var_dump($arr);
- }
- $res->free();
- }
- } while ($mysql->next_result());
- var_dump($mysql->error, __LINE__);
- $mysql->close();
-
- $mysql = new mysqli($host, $user, $passwd, "test");
- $mysql->multi_query('SELECT 1;SELECT 2');
- do {
- $res = $mysql->store_result();
- if ($mysql->errno == 0) {
- while ($arr = $res->fetch_assoc()) {
- var_dump($arr);
- }
- $res->free();
- }
- } while ($mysql->next_result());
- var_dump($mysql->error, __LINE__);
-?>
---EXPECTF--
-array(1) {
- [1]=>
- string(1) "1"
-}
-array(1) {
- [2]=>
- string(1) "2"
-}
-string(0) ""
-int(%d)
-array(1) {
- [1]=>
- string(1) "1"
-}
-array(1) {
- [2]=>
- string(1) "2"
-}
-string(0) ""
-int(%d)
diff --git a/ext/mysqli/tests/bug32405.phpt b/ext/mysqli/tests/bug32405.phpt
deleted file mode 100644
index f805dc7982..0000000000
--- a/ext/mysqli/tests/bug32405.phpt
+++ /dev/null
@@ -1,39 +0,0 @@
---TEST--
-Bug #32405
---SKIPIF--
-<?php require_once('skipif.inc'); ?>
---FILE--
-<?php
- include ("connect.inc");
-
- /*** test mysqli_connect 127.0.0.1 ***/
- $link = mysqli_connect($host, $user, $passwd);
- mysqli_select_db($link, "test");
- mysqli_query($link, "SET sql_mode=''");
-
- /* two fields are needed. the problem does not occur with 1 field only selected. */
- $link->query("CREATE TABLE test_users(user_id int(10) unsigned NOT NULL auto_increment, login varchar(50) default '', PRIMARY KEY (user_id))");
- $link->query('INSERT INTO test_users VALUES (NULL, "user1"), (NULL, "user2"), (NULL, "user3"), (NULL, "user4")');
-
-
- if ($stmt = $link->prepare("SELECT SQL_NO_CACHE user_id, login FROM test_users")) {
- $stmt->execute();
- $stmt->bind_result($col1, $col2);
- while ($stmt->fetch()) {
- var_dump($col1, $col2);
- }
- $stmt->close();
- }
-
- mysqli_query($link,"DROP TABLE test_users");
- mysqli_close($link);
-?>
---EXPECT--
-int(1)
-string(5) "user1"
-int(2)
-string(5) "user2"
-int(3)
-string(5) "user3"
-int(4)
-string(5) "user4"
diff --git a/ext/mysqli/tests/bug33090.phpt b/ext/mysqli/tests/bug33090.phpt
deleted file mode 100644
index 5c1cba961e..0000000000
--- a/ext/mysqli/tests/bug33090.phpt
+++ /dev/null
@@ -1,21 +0,0 @@
---TEST--
-Bug #33090
---SKIPIF--
-<?php require_once('skipif.inc'); ?>
---FILE--
-<?php
- include ("connect.inc");
-
- /*** test mysqli_connect 127.0.0.1 ***/
- $link = mysqli_connect($host, $user, $passwd);
- mysqli_select_db($link, "test");
-
- if (!($link->prepare("this makes no sense"))) {
- printf("%d\n", $link->errno);
- printf("%s\n", $link->sqlstate);
- }
- $link->close();
-?>
---EXPECT--
-1064
-42000
diff --git a/ext/mysqli/tests/bug33263.phpt b/ext/mysqli/tests/bug33263.phpt
deleted file mode 100644
index 8ccb1e7e53..0000000000
--- a/ext/mysqli/tests/bug33263.phpt
+++ /dev/null
@@ -1,32 +0,0 @@
---TEST--
-bug #33263 (mysqli_real_connect in __construct)
---SKIPIF--
-<?php require_once('skipif.inc'); ?>
-<?php require_once('skipifemb.inc'); ?>
---FILE--
-<?php
-
- include "connect.inc";
-
- class test extends mysqli
- {
- public function __construct($host, $user, $passwd, $db) {
- parent::init();
- parent::real_connect($host, $user, $passwd, $db);
- }
- }
-
- $mysql = new test($host, $user, $passwd, "test");
-
- $stmt = $mysql->prepare("SELECT DATABASE()");
- $stmt->execute();
- $stmt->bind_result($db);
- $stmt->fetch();
- $stmt->close();
-
- var_dump($db);
-
- $mysql->close();
-?>
---EXPECT--
-string(4) "test"
diff --git a/ext/mysqli/tests/bug33491.phpt b/ext/mysqli/tests/bug33491.phpt
deleted file mode 100644
index 067e489aae..0000000000
--- a/ext/mysqli/tests/bug33491.phpt
+++ /dev/null
@@ -1,26 +0,0 @@
---TEST--
-Bug #33491 (extended mysqli class crashes when result is not object)
---INI--
-error_reporting=4095
---SKIPIF--
-<?php require_once('skipif.inc'); ?>
---FILE--
-<?php
-
-class DB extends mysqli
-{
- public function query_single($query) {
- $result = parent::query($query);
- $result->fetch_row(); // <- Here be crash
- }
-}
-
-require_once dirname(__FILE__)."/connect.inc";
-
-// Segfault when using the DB class which extends mysqli
-$DB = new DB($host, $user, $passwd, '');
-$DB->query_single('SELECT DATE()');
-
-?>
---EXPECTF--
-Fatal error: Call to a member function fetch_row() on a non-object in %sbug33491.php on line %d
diff --git a/ext/mysqli/tests/bug34785.phpt b/ext/mysqli/tests/bug34785.phpt
deleted file mode 100644
index a2b9f22881..0000000000
--- a/ext/mysqli/tests/bug34785.phpt
+++ /dev/null
@@ -1,47 +0,0 @@
---TEST--
-Bug #32405
---SKIPIF--
-<?php require_once('skipif.inc'); ?>
---FILE--
-<?php
- include ("connect.inc");
-
- class my_stmt extends mysqli_stmt
- {
- public function __construct($link, $query) {
- parent::__construct($link, $query);
- }
- }
-
- class my_result extends mysqli_result
- {
- public function __construct($link, $query) {
- parent::__construct($link, $query);
- }
- }
-
- /*** test mysqli_connect 127.0.0.1 ***/
- $link = mysqli_connect($host, $user, $passwd);
- mysqli_query($link, "SET sql_mode=''");
-
- $stmt = new my_stmt($link, "SELECT 'foo' FROM DUAL");
-
- $stmt->execute();
- $stmt->bind_result($var);
- $stmt->fetch();
-
- $stmt->close();
- var_dump($var);
-
- mysqli_real_query($link, "SELECT 'bar' FROM DUAL");
- $result = new my_result($link, MYSQLI_STORE_RESULT);
- $row = $result->fetch_row();
- $result->close();
-
- var_dump($row[0]);
-
- mysqli_close($link);
-?>
---EXPECT--
-string(3) "foo"
-string(3) "bar"
diff --git a/ext/mysqli/tests/bug34810.phpt b/ext/mysqli/tests/bug34810.phpt
deleted file mode 100644
index 0b8a799a84..0000000000
--- a/ext/mysqli/tests/bug34810.phpt
+++ /dev/null
@@ -1,39 +0,0 @@
---TEST--
-bug #34810 (mysqli::init() and others use wrong $this pointer without checks)
---SKIPIF--
-<?php require_once('skipif.inc'); ?>
---FILE--
-<?php
-
-class DbConnection {
- public function connect() {
- include "connect.inc";
-
- $link = mysqli_connect($host, $user, $passwd);
- var_dump($link);
-
- $link = mysqli_init();
- var_dump($link);
-
- $mysql = new mysqli($host, $user, $passwd, "test");
- $mysql->query("DROP TABLE IF EXISTS test_warnings");
- $mysql->query("CREATE TABLE test_warnings (a int not null)");
- $mysql->query("SET sql_mode=''");
- $mysql->query("INSERT INTO test_warnings VALUES (1),(2),(NULL)");
- var_dump(mysqli_warning::__construct($mysql));
- }
-}
-
-$db = new DbConnection();
-$db->connect();
-
-echo "Done\n";
-?>
---EXPECTF--
-object(mysqli)#%d (0) {
-}
-object(mysqli)#%d (0) {
-}
-object(mysqli_warning)#%d (0) {
-}
-Done
diff --git a/ext/mysqli/tests/bug35103.phpt b/ext/mysqli/tests/bug35103.phpt
deleted file mode 100644
index b6118b9b2b..0000000000
--- a/ext/mysqli/tests/bug35103.phpt
+++ /dev/null
@@ -1,68 +0,0 @@
---TEST--
-bug #35103 Bad handling of unsigned bigint
---SKIPIF--
-<?php require_once('skipif.inc'); ?>
---FILE--
-<?php
-
-$drop = <<<EOSQL
-DROP TABLE test_bint;
-DROP TABLE test_buint;
-EOSQL;
- include "connect.inc";
-
- $mysql = new mysqli($host, $user, $passwd, "test");
- $mysql->query("DROP TABLE IF EXISTS test_bint");
- $mysql->query("CREATE TABLE test_bint (a bigint(20) default NULL) ENGINE=MYISAM");
- $mysql->query("INSERT INTO test_bint VALUES (9223372036854775807),(-9223372036854775808),(-2147483648),(-2147483649),(-2147483647),(2147483647),(2147483648),(2147483649)");
-
- $mysql->query("DROP TABLE IF EXISTS test_buint");
- $mysql->query("CREATE TABLE test_buint (a bigint(20) unsigned default NULL)");
- $mysql->query("INSERT INTO test_buint VALUES (18446744073709551615),(9223372036854775807),(9223372036854775808),(2147483647),(2147483649),(4294967295)");
-
- $stmt = $mysql->prepare("SELECT a FROM test_bint ORDER BY a");
- $stmt->bind_result($v);
- $stmt->execute();
- $i=0;
- echo "BIG INT SIGNED, TEST\n";
- while ($i++ < 8) {
- $stmt->fetch();
- echo $v, "\n";
- }
- $stmt->close();
-
- echo str_repeat("-", 20), "\n";
-
- $stmt = $mysql->prepare("SELECT a FROM test_buint ORDER BY a");
- $stmt->bind_result($v2);
- $stmt->execute();
- $j=0;
- echo "BIG INT UNSIGNED TEST\n";
- while ($j++ < 6) {
- $stmt->fetch();
- echo $v2, "\n";
- }
- $stmt->close();
-
- $mysql->multi_query($drop);
-
- $mysql->close();
-?>
---EXPECT--
-BIG INT SIGNED, TEST
--9223372036854775808
--2147483649
--2147483648
--2147483647
-2147483647
-2147483648
-2147483649
-9223372036854775807
---------------------
-BIG INT UNSIGNED TEST
-2147483647
-2147483649
-4294967295
-9223372036854775807
-9223372036854775808
-18446744073709551615
diff --git a/ext/mysqli/tests/bug35517.phpt b/ext/mysqli/tests/bug35517.phpt
deleted file mode 100644
index eb1b543463..0000000000
--- a/ext/mysqli/tests/bug35517.phpt
+++ /dev/null
@@ -1,29 +0,0 @@
---TEST--
-Bug #35517 mysqli_stmt_fetch returns NULL
---SKIPIF--
-<?php require_once('skipif.inc'); ?>
---FILE--
-<?php
- include "connect.inc";
-
- $mysql = new mysqli($host, $user, $passwd, "test");
-
- $mysql->query("CREATE TABLE temp (id INT UNSIGNED NOT NULL)");
- $mysql->query("INSERT INTO temp (id) VALUES (3000000897),(3800001532),(3900002281),(3100059612)");
-
- $stmt = $mysql->prepare("SELECT id FROM temp");
- $stmt->execute();
- $stmt->bind_result($id);
- while ($stmt->fetch()) {
- var_dump($id);
- }
- $stmt->close();
-
- $mysql->query("DROP TABLE temp");
- $mysql->close();
-?>
---EXPECTF--
-string(10) "3000000897"
-string(10) "3800001532"
-string(10) "3900002281"
-string(10) "3100059612"
diff --git a/ext/mysqli/tests/bug35759.phpt b/ext/mysqli/tests/bug35759.phpt
deleted file mode 100644
index 5f67a76247..0000000000
--- a/ext/mysqli/tests/bug35759.phpt
+++ /dev/null
@@ -1,44 +0,0 @@
---TEST--
-bug #35759 : mysqli_stmt_bind_result() makes huge allocation when column empty
---SKIPIF--
-<?php require_once('skipif.inc'); ?>
---FILE--
-<?php
-
-$sql=<<<EOSQL
-CREATE TABLE blobby (
- a1 MEDIUMBLOB NOT NULL,
-
-
-EOSQL;
- include "connect.inc";
- $col_num= 1000;
-
- $mysql = new mysqli($host, $user, $passwd, "test");
- $mysql->query("DROP TABLE IF EXISTS blobby");
- $create = "CREATE TABLE blobby (a0 MEDIUMBLOB NOT NULL DEFAULT ''";
- $i= 0;
- while (++$i < $col_num) {
- $create .= ", a$i MEDIUMBLOB NOT NULL DEFAULT ''";
- }
- $create .= ")";
-
- $mysql->query($create);
- $mysql->query("INSERT INTO blobby (a0) VALUES ('')");
-
- $stmt = $mysql->prepare("SELECT * FROM blobby");
- $stmt->execute();
- $stmt->store_result();
- $params= array_pad(array(), $col_num, "");
- call_user_func_array(array($stmt, "bind_result"), $params);
- $stmt->fetch();
-
- $stmt->close();
-
- $mysql->query("DROP TABLE blobby");
-
- $mysql->close();
- echo "OK\n";
-?>
---EXPECT--
-OK
diff --git a/ext/mysqli/tests/bug36420.phpt b/ext/mysqli/tests/bug36420.phpt
deleted file mode 100644
index d35485e7fd..0000000000
--- a/ext/mysqli/tests/bug36420.phpt
+++ /dev/null
@@ -1,25 +0,0 @@
---TEST--
-bug #36420 (segfault when access result->num_rows after calling result->close())
---SKIPIF--
-<?php require_once('skipif.inc'); ?>
---FILE--
-<?php
-
-include "connect.inc";
-$mysqli = mysqli_connect($host, $user, $passwd);
-
-$result = $mysqli->query('select 1');
-
-$result->close();
-echo $result->num_rows;
-
-$mysqli->close();
-echo $result->num_rows;
-
-echo "Done\n";
-?>
---EXPECTF--
-Warning: main(): Couldn't fetch mysqli_result in %s on line %d
-
-Warning: main(): Couldn't fetch mysqli_result in %s on line %d
-Done
diff --git a/ext/mysqli/tests/bug36745.phpt b/ext/mysqli/tests/bug36745.phpt
deleted file mode 100644
index 868015c450..0000000000
--- a/ext/mysqli/tests/bug36745.phpt
+++ /dev/null
@@ -1,23 +0,0 @@
---TEST--
-bug #36745 : LOAD DATA LOCAL INFILE doesn't return correct error message
---SKIPIF--
-<?php require_once('skipif.inc'); ?>
---FILE--
-<?php
- include ("connect.inc");
-
- /*** test mysqli_connect 127.0.0.1 ***/
- $mysql = mysqli_connect($host, $user, $passwd, "test");
-
- $mysql->query("DROP TABLE IF EXISTS litest");
- $mysql->query("CREATE TABLE litest (a VARCHAR(20))");
-
- $mysql->query("LOAD DATA LOCAL INFILE 'filenotfound' INTO TABLE litest");
- var_dump($mysql->error);
-
- $mysql->close();
- printf("Done");
-?>
---EXPECTF--
-string(%d) "%s"
-Done
diff --git a/ext/mysqli/tests/bug36802.phpt b/ext/mysqli/tests/bug36802.phpt
deleted file mode 100644
index 99f8633301..0000000000
--- a/ext/mysqli/tests/bug36802.phpt
+++ /dev/null
@@ -1,46 +0,0 @@
---TEST--
-bug #36802 : crashes with mysql_init
---SKIPIF--
-<?php require_once('skipif.inc'); ?>
---FILE--
-<?php
-
- class my_mysqli extends mysqli {
- function __construct()
- {
- }
- }
-
- include "connect.inc";
-
-
- $mysql = mysqli_init();
-
- /* following operations should not work */
- if (method_exists($mysql, 'set_charset')) {
- $x[0] = @$mysql->set_charset('utf8');
- } else {
- $x[0] = NULL;
- }
- $x[1] = @$mysql->query("SELECT 'foo' FROM DUAL");
-
- /* following operations should work */
- $x[2] = ($mysql->client_version > 0);
- $x[3] = $mysql->errno;
- $mysql->close();
-
-
-
- var_dump($x);
-?>
---EXPECT--
-array(4) {
- [0]=>
- NULL
- [1]=>
- NULL
- [2]=>
- bool(true)
- [3]=>
- int(0)
-}
diff --git a/ext/mysqli/tests/bug36949.phpt b/ext/mysqli/tests/bug36949.phpt
deleted file mode 100644
index fb57df4864..0000000000
--- a/ext/mysqli/tests/bug36949.phpt
+++ /dev/null
@@ -1,50 +0,0 @@
---TEST--
-bug #36949
---SKIPIF--
-<?php require_once('skipif.inc'); ?>
---FILE--
-<?php
-include "connect.inc";
-
-class A {
-
- private $mysqli;
-
- public function __construct() {
- global $user, $host, $passwd;
- $this->mysqli = new mysqli($host, $user, $passwd);
- $result = $this->mysqli->query("SELECT NOW() AS my_time FROM DUAL");
- $row = $result->fetch_object();
- echo $row->my_time."<br>\n";
- $result->close();
- }
-
- public function __destruct() {
- $this->mysqli->close();
- }
-}
-
-class B {
-
- private $mysqli;
-
- public function __construct() {
- global $user, $host, $passwd;
- $this->mysqli = new mysqli($host, $user, $passwd);
- $result = $this->mysqli->query("SELECT NOW() AS my_time FROM DUAL");
- $row = $result->fetch_object();
- echo $row->my_time."<br>\n";
- $result->close();
- }
-
- public function __destruct() {
- $this->mysqli->close();
- }
-}
-
-$A = new A();
-$B = new B();
-?>
---EXPECTF--
-%d%d%d%d-%d%d-%d%d %d%d:%d%d:%d%d<br>
-%d%d%d%d-%d%d-%d%d %d%d:%d%d:%d%d<br>
diff --git a/ext/mysqli/tests/bug37090.phpt b/ext/mysqli/tests/bug37090.phpt
deleted file mode 100644
index de6043d38a..0000000000
--- a/ext/mysqli/tests/bug37090.phpt
+++ /dev/null
@@ -1,37 +0,0 @@
---TEST--
-bug #37090: mysqli_set_charset return code
---SKIPIF--
-<?php require_once('skipif.inc'); ?>
---FILE--
-<?php
- include "connect.inc";
-
- $mysql = new mysqli($host, $user, $passwd);
-
- $cs = array();
- $cs[] = $mysql->set_charset("latin5");
- $cs[] = $mysql->character_set_name();
-
- $cs[] = $mysql->set_charset("utf8");
- $cs[] = $mysql->character_set_name();
-
- $cs[] = $mysql->set_charset("notdefined");
- $cs[] = $mysql->character_set_name();
-
- var_dump($cs);
-?>
---EXPECT--
-array(6) {
- [0]=>
- bool(true)
- [1]=>
- string(6) "latin5"
- [2]=>
- bool(true)
- [3]=>
- string(4) "utf8"
- [4]=>
- bool(false)
- [5]=>
- string(4) "utf8"
-}
diff --git a/ext/mysqli/tests/bug38003.phpt b/ext/mysqli/tests/bug38003.phpt
deleted file mode 100644
index af71f85f2c..0000000000
--- a/ext/mysqli/tests/bug38003.phpt
+++ /dev/null
@@ -1,20 +0,0 @@
---TEST--
-Bug #38003 (in classes inherited from MySQLi it's possible to call private constructors from invalid context)
---SKIPIF--
-<?php if (!extension_loaded("mysqli")) print "skip"; ?>
---FILE--
-<?php
-
-class DB extends mysqli {
-
- private function __construct($hostname, $username, $password, $database) {
- var_dump("DB::__construct() called");
- }
-}
-
-$DB = new DB();
-
-echo "Done\n";
-?>
---EXPECTF--
-Fatal error: Call to private DB::__construct() from invalid context in %s on line %d
diff --git a/ext/mysqli/tests/connect.inc b/ext/mysqli/tests/connect.inc
deleted file mode 100644
index ea24ff89ae..0000000000
--- a/ext/mysqli/tests/connect.inc
+++ /dev/null
@@ -1,25 +0,0 @@
-<?php
-
- /* default values are localhost, root and empty password
- Change the values if you use another configuration */
- $driver = new mysqli_driver;
-
- if (!$driver->embedded) {
- $host = "localhost";
- $user = "root";
- $passwd = "";
- } else {
- $path = dirname(__FILE__);
- $host = ":embedded";
- $user = $passwd = NULL;
- $args = array(
- "--datadir=$path",
- "--innodb_data_home_dir=$path",
- "--innodb_data_file_path=ibdata1:10M:autoextend",
- "--log-error=$path/testrun.log",
- "--init-connect='CREATE DATABASE IF NOT EXISTS test;'"
- );
- $driver->embedded_server_start(TRUE, $args, NULL);
- }
-
-?>
diff --git a/ext/mysqli/tests/skipif.inc b/ext/mysqli/tests/skipif.inc
deleted file mode 100644
index f471b5e126..0000000000
--- a/ext/mysqli/tests/skipif.inc
+++ /dev/null
@@ -1,10 +0,0 @@
-<?php
-if (!extension_loaded('mysqli')){
- die('skip mysqli extension not available');
-}
-include "connect.inc";
-$driver = new mysqli_driver();
-if (!$driver->embedded && !@mysqli_connect($host, $user, $passwd, "", 3306)) {
- die('skip could not connect to MySQL');
-}
-?>
diff --git a/ext/mysqli/tests/skipifemb.inc b/ext/mysqli/tests/skipifemb.inc
deleted file mode 100644
index 298c7219a6..0000000000
--- a/ext/mysqli/tests/skipifemb.inc
+++ /dev/null
@@ -1,5 +0,0 @@
-<?php
- $driver = new mysqli_driver();
- if ($driver->embedded)
- die("skip test doesn't run with embedded server");
-?>
diff --git a/ext/mysqli/tests/skipifnotemb.inc b/ext/mysqli/tests/skipifnotemb.inc
deleted file mode 100644
index 8639130cbe..0000000000
--- a/ext/mysqli/tests/skipifnotemb.inc
+++ /dev/null
@@ -1,5 +0,0 @@
-<?php
- $driver = new mysqli_driver();
- if (!$driver->embedded)
- die("skip test for with embedded server only");
-?>