summaryrefslogtreecommitdiff
path: root/ext/pdo_mysql
diff options
context:
space:
mode:
Diffstat (limited to 'ext/pdo_mysql')
-rwxr-xr-xext/pdo_mysql/CREDITS2
-rwxr-xr-xext/pdo_mysql/config.m487
-rw-r--r--ext/pdo_mysql/config.w3215
-rw-r--r--ext/pdo_mysql/get_error_codes.php27
-rwxr-xr-xext/pdo_mysql/mysql_driver.c366
-rwxr-xr-xext/pdo_mysql/mysql_statement.c265
-rw-r--r--ext/pdo_mysql/package.xml49
-rwxr-xr-xext/pdo_mysql/pdo_mysql.c94
-rwxr-xr-xext/pdo_mysql/php_pdo_mysql.h53
-rwxr-xr-xext/pdo_mysql/php_pdo_mysql_int.h70
-rw-r--r--ext/pdo_mysql/php_pdo_mysql_sqlstate.h388
-rwxr-xr-xext/pdo_mysql/tests/connection.inc12
-rwxr-xr-xext/pdo_mysql/tests/pdo_001.phpt41
-rwxr-xr-xext/pdo_mysql/tests/pdo_002.phpt41
-rwxr-xr-xext/pdo_mysql/tests/pdo_003.phpt53
-rwxr-xr-xext/pdo_mysql/tests/pdo_004.phpt41
-rwxr-xr-xext/pdo_mysql/tests/pdo_005.phpt120
-rwxr-xr-xext/pdo_mysql/tests/pdo_006.phpt64
-rwxr-xr-xext/pdo_mysql/tests/pdo_007.phpt52
-rwxr-xr-xext/pdo_mysql/tests/pdo_008.phpt30
-rwxr-xr-xext/pdo_mysql/tests/pdo_009.phpt89
-rwxr-xr-xext/pdo_mysql/tests/pdo_010.phpt76
-rwxr-xr-xext/pdo_mysql/tests/pdo_011.phpt181
-rwxr-xr-xext/pdo_mysql/tests/pdo_012.phpt70
-rwxr-xr-xext/pdo_mysql/tests/pdo_013.phpt58
-rwxr-xr-xext/pdo_mysql/tests/pdo_014.phpt51
-rwxr-xr-xext/pdo_mysql/tests/pdo_015.phpt76
-rwxr-xr-xext/pdo_mysql/tests/pdo_016.phpt117
-rwxr-xr-xext/pdo_mysql/tests/pdo_017.phpt22
-rwxr-xr-xext/pdo_mysql/tests/pdo_018.phpt136
-rwxr-xr-xext/pdo_mysql/tests/pdo_019.phpt52
-rwxr-xr-xext/pdo_mysql/tests/pdo_020.phpt21
-rwxr-xr-xext/pdo_mysql/tests/pdo_023.phpt60
-rwxr-xr-xext/pdo_mysql/tests/pdo_024.phpt21
-rwxr-xr-xext/pdo_mysql/tests/pdo_025.phpt68
-rwxr-xr-xext/pdo_mysql/tests/pdo_026.phpt50
-rwxr-xr-xext/pdo_mysql/tests/prepare.inc16
-rwxr-xr-xext/pdo_mysql/tests/skipif.inc12
38 files changed, 0 insertions, 3046 deletions
diff --git a/ext/pdo_mysql/CREDITS b/ext/pdo_mysql/CREDITS
deleted file mode 100755
index 0735d9a1e8..0000000000
--- a/ext/pdo_mysql/CREDITS
+++ /dev/null
@@ -1,2 +0,0 @@
-mySQL 3.x driver for PDO
-George Schlossnagle
diff --git a/ext/pdo_mysql/config.m4 b/ext/pdo_mysql/config.m4
deleted file mode 100755
index 4462233b2b..0000000000
--- a/ext/pdo_mysql/config.m4
+++ /dev/null
@@ -1,87 +0,0 @@
-dnl
-dnl $Id$
-dnl
-
-if test "$PHP_PDO" != "no"; then
-
-AC_DEFUN([PDO_MYSQL_LIB_CHK], [
- str="$PDO_MYSQL_DIR/$1/libmysqlclient.*"
- for j in `echo $str`; do
- if test -r $j; then
- PDO_MYSQL_LIB_DIR=$MYSQL_DIR/$1
- break 2
- fi
- done
-])
-
-PHP_ARG_WITH(pdo-mysql, for MySQL support for PDO,
-[ --with-pdo-mysql[=DIR] PDO: MySQL support. DIR is the MySQL base directory])
-
-if test "$PHP_PDO_MYSQL" != "no"; then
- AC_DEFINE(HAVE_MYSQL, 1, [Whether you have MySQL])
-
- for i in $PHP_PDO_MYSQL /usr/local /usr ; do
- PDO_MYSQL_DIR=$i
- PDO_MYSQL_CONFIG=$PDO_MYSQL_DIR/bin/mysql_config
- if test -r $i/include/mysql; then
- PDO_MYSQL_INC_DIR=$i/include/mysql
- else
- PDO_MYSQL_INC_DIR=$i/include
- fi
- if test -r $i/lib/mysql; then
- PDO_MYSQL_LIB_DIR=$i/lib/mysql
- else
- PDO_MYSQL_LIB_DIR=$i/lib
- fi
- if test -x $PDO_MYSQL_CONFIG; then
- break
- fi
- done
-
- if test -z "$PDO_MYSQL_DIR"; then
- AC_MSG_ERROR([Cannot find MySQL header files under $PHP_MYSQL.
-Note that the MySQL client library is not bundled anymore!])
- fi
-
- if test -x $PDO_MYSQL_CONFIG; then
- PDO_MYSQL_SOCKET=`$PDO_MYSQL_CONFIG --socket`
- fi
-
- AC_DEFINE_UNQUOTED(PDO_MYSQL_UNIX_ADDR, "$PDO_MYSQL_SOCKET", [ ])
-
- PHP_ADD_LIBRARY_WITH_PATH(mysqlclient, $PDO_MYSQL_LIB_DIR, PDO_MYSQL_SHARED_LIBADD)
- PHP_ADD_INCLUDE($PDO_MYSQL_INC_DIR)
- if test -x $PDO_MYSQL_CONFIG; then
- PDO_MYSQL_LIBS=`$PDO_MYSQL_CONFIG --libs`
- PHP_SUBST_OLD(PDO_MYSQL_LIBS)
- fi
-
- _SAVE_LDFLAGS=$LDFLAGS
- LDFLAGS="$LDFLAGS $PDO_MYSQL_LIBS"
- AC_CHECK_FUNCS([mysql_commit mysql_stmt_prepare])
- LDFLAGS=$_SAVE_LDFLAGS
-
- AC_MSG_CHECKING([for PDO includes])
- if test -f $abs_srcdir/include/php/ext/pdo/php_pdo_driver.h; then
- pdo_inc_path=$abs_srcdir/ext
- elif test -f $abs_srcdir/ext/pdo/php_pdo_driver.h; then
- pdo_inc_path=$abs_srcdir/ext
- elif test -f $prefix/include/php/ext/pdo/php_pdo_driver.h; then
- pdo_inc_path=$prefix/include/php/ext
- else
- AC_MSG_ERROR([Cannot find php_pdo_driver.h.])
- fi
- AC_MSG_RESULT($pdo_inc_path)
-
- PHP_NEW_EXTENSION(pdo_mysql, pdo_mysql.c mysql_driver.c mysql_statement.c, $ext_shared,,-I$pdo_inc_path)
- PHP_ADD_EXTENSION_DEP(pdo_mysql, pdo)
- PDO_MYSQL_MODULE_TYPE=external
- PDO_MYSQL_INCLUDE=-I$PDO_MYSQL_INC_DIR
-
- PHP_SUBST(PDO_MYSQL_SHARED_LIBADD)
- PHP_SUBST_OLD(PDO_MYSQL_MODULE_TYPE)
- PHP_SUBST_OLD(PDO_MYSQL_LIBS)
- PHP_SUBST_OLD(PDO_MYSQL_INCLUDE)
-fi
-
-fi
diff --git a/ext/pdo_mysql/config.w32 b/ext/pdo_mysql/config.w32
deleted file mode 100644
index 24b2f7cf53..0000000000
--- a/ext/pdo_mysql/config.w32
+++ /dev/null
@@ -1,15 +0,0 @@
-// $Id$
-// vim:ft=javascript
-
-ARG_WITH("pdo-mysql", "MySQL support for PDO", "no");
-
-if (PHP_PDO_MYSQL != "no") {
- if (CHECK_LIB("libmysql.lib", "pdo_mysql", PHP_PDO_MYSQL) &&
- CHECK_HEADER_ADD_INCLUDE("mysql.h", "CFLAGS_PDO_MYSQL", PHP_PHP_BUILD + "\\include\\mysql;" + PHP_PDO_MYSQL)) {
- EXTENSION("pdo_mysql", "pdo_mysql.c mysql_driver.c mysql_statement.c");
- ADD_FLAG('CFLAGS_PDO_MYSQL', "/I ..\\pecl");
- } else {
- WARNING("pdo_mysql not enabled; libraries and headers not found");
- }
- ADD_EXTENSION_DEP('pdo_mysql', 'pdo');
-}
diff --git a/ext/pdo_mysql/get_error_codes.php b/ext/pdo_mysql/get_error_codes.php
deleted file mode 100644
index 2785c93b99..0000000000
--- a/ext/pdo_mysql/get_error_codes.php
+++ /dev/null
@@ -1,27 +0,0 @@
-<?php
- $codes = array();
- $maxlen = 0;
-
- while (!feof(STDIN)) {
- $line = fgets(STDIN);
-
- if (ereg('^(ER_.*),[[:space:]]+"(.*)",[[:space:]]+"(.*)"', $line, $matches)) {
- $codes[$matches[1]] = $matches[2];
- $maxlen = max($maxlen, strlen($matches[1]));
- }
- }
-
- if (empty($codes)) {
- fputs(STDERR, "input doesn't look like a MySQL sql_state.h file\n");
- exit(3);
- }
-
- echo "/* DO NOT EDIT THIS FILE!!! It is auto generated by get_error_codes.php */\n";
- foreach ($codes as $code => $state) {
- echo "#ifdef $code\n";
- printf(" case %-{$maxlen}s: return \"%s\";\n", $code, $state);
- echo "#endif\n";
- }
-
-
-?> \ No newline at end of file
diff --git a/ext/pdo_mysql/mysql_driver.c b/ext/pdo_mysql/mysql_driver.c
deleted file mode 100755
index b7647269b9..0000000000
--- a/ext/pdo_mysql/mysql_driver.c
+++ /dev/null
@@ -1,366 +0,0 @@
-/*
- +----------------------------------------------------------------------+
- | PHP Version 5 |
- +----------------------------------------------------------------------+
- | Copyright (c) 1997-2004 The PHP Group |
- +----------------------------------------------------------------------+
- | This source file is subject to version 3.0 of the PHP license, |
- | that is bundled with this package in the file LICENSE, and is |
- | available through the world-wide-web at the following url: |
- | http://www.php.net/license/3_0.txt. |
- | If you did not receive a copy of the PHP license and are unable to |
- | obtain it through the world-wide-web, please send a note to |
- | license@php.net so we can mail you a copy immediately. |
- +----------------------------------------------------------------------+
- | Author: George Schlossnagle <george@omniti.com> |
- +----------------------------------------------------------------------+
-*/
-
-/* $Id$ */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include "php.h"
-#include "php_ini.h"
-#include "ext/standard/info.h"
-#include "pdo/php_pdo.h"
-#include "pdo/php_pdo_driver.h"
-#include "php_pdo_mysql.h"
-#include "php_pdo_mysql_int.h"
-#include <mysqld_error.h>
-#include "zend_exceptions.h"
-
-
-const char *pdo_mysql_get_sqlstate(unsigned int my_errno) {
- switch (my_errno) {
- /* import auto-generated case: code */
-#include "php_pdo_mysql_sqlstate.h"
- default: return "HY000";
- }
-}
-
-int _pdo_mysql_error(pdo_dbh_t *dbh, pdo_stmt_t *stmt, const char *file, int line TSRMLS_DC) /* {{{ */
-{
- pdo_mysql_db_handle *H = (pdo_mysql_db_handle *)dbh->driver_data;
- pdo_error_type *pdo_err;
- pdo_mysql_error_info *einfo;
-
- if (stmt) {
- pdo_mysql_stmt *S = (pdo_mysql_stmt*)stmt->driver_data;
- pdo_err = &stmt->error_code;
- einfo = &S->einfo;
- } else {
- pdo_err = &dbh->error_code;
- einfo = &H->einfo;
- }
-
- einfo->errcode = mysql_errno(H->server);
- einfo->file = file;
- einfo->line = line;
-
- if (einfo->errmsg) {
- pefree(einfo->errmsg, dbh->is_persistent);
- einfo->errmsg = NULL;
- }
-
- if (einfo->errcode) {
- einfo->errmsg = pestrdup(mysql_error(H->server), dbh->is_persistent);
- } else { /* no error */
- strcpy(*pdo_err, PDO_ERR_NONE);
- return 0;
- }
-
- strcpy(*pdo_err, pdo_mysql_get_sqlstate(einfo->errcode));
-
- if (!dbh->methods) {
- zend_throw_exception_ex(php_pdo_get_exception(), 0 TSRMLS_CC, "SQLSTATE[%s] [%d] %s",
- *pdo_err, einfo->errcode, einfo->errmsg);
- }
-
- return einfo->errcode;
-}
-/* }}} */
-
-static int pdo_mysql_fetch_error_func(pdo_dbh_t *dbh, pdo_stmt_t *stmt, zval *info TSRMLS_DC)
-{
- pdo_mysql_db_handle *H = (pdo_mysql_db_handle *)dbh->driver_data;
- pdo_mysql_error_info *einfo = &H->einfo;
-
- if (stmt) {
- pdo_mysql_stmt *S = (pdo_mysql_stmt*)stmt->driver_data;
- einfo = &S->einfo;
- } else {
- einfo = &H->einfo;
- }
-
- if (einfo->errcode) {
- add_next_index_long(info, einfo->errcode);
- add_next_index_string(info, einfo->errmsg, 1);
- }
-
- return 1;
-}
-
-static int mysql_handle_closer(pdo_dbh_t *dbh TSRMLS_DC) /* {{{ */
-{
- pdo_mysql_db_handle *H = (pdo_mysql_db_handle *)dbh->driver_data;
-
- if (H) {
- if (H->server) {
- mysql_close(H->server);
- H->server = NULL;
- }
- if (H->einfo.errmsg) {
- pefree(H->einfo.errmsg, dbh->is_persistent);
- H->einfo.errmsg = NULL;
- }
- pefree(H, dbh->is_persistent);
- dbh->driver_data = NULL;
- }
- return 0;
-}
-/* }}} */
-
-static int mysql_handle_preparer(pdo_dbh_t *dbh, const char *sql, long sql_len, pdo_stmt_t *stmt, zval *driver_options TSRMLS_DC)
-{
- pdo_mysql_db_handle *H = (pdo_mysql_db_handle *)dbh->driver_data;
- pdo_mysql_stmt *S = ecalloc(1, sizeof(pdo_mysql_stmt));
-
- S->H = H;
- S->result = NULL;
-
- stmt->driver_data = S;
- stmt->methods = &mysql_stmt_methods;
- stmt->supports_placeholders = PDO_PLACEHOLDER_NONE;
-
- return 1;
-}
-
-static long mysql_handle_doer(pdo_dbh_t *dbh, const char *sql, long sql_len TSRMLS_DC)
-{
- pdo_mysql_db_handle *H = (pdo_mysql_db_handle *)dbh->driver_data;
-
- if (mysql_real_query(H->server, sql, sql_len)) {
- pdo_mysql_error(dbh);
- return -1;
- } else {
- return mysql_affected_rows(H->server);
- }
-}
-
-static char *pdo_mysql_last_insert_id(pdo_dbh_t *dbh, const char *name, unsigned int *len TSRMLS_DC)
-{
- pdo_mysql_db_handle *H = (pdo_mysql_db_handle *)dbh->driver_data;
- char *id = NULL;
-
- *len = spprintf(&id, 0, "%lld", mysql_insert_id(H->server));
- return id;
-}
-
-static int mysql_handle_quoter(pdo_dbh_t *dbh, const char *unquoted, int unquotedlen, char **quoted, int *quotedlen, enum pdo_param_type paramtype TSRMLS_DC)
-{
- pdo_mysql_db_handle *H = (pdo_mysql_db_handle *)dbh->driver_data;
- *quoted = emalloc(2*unquotedlen + 3);
- (*quoted)[0] = '"';
- *quotedlen = mysql_real_escape_string(H->server, *quoted + 1, unquoted, unquotedlen);
- (*quoted)[*quotedlen + 1] = '"';
- (*quoted)[*quotedlen + 2] = '\0';
- *quotedlen += 2;
- return 1;
-}
-
-static int mysql_handle_begin(pdo_dbh_t *dbh TSRMLS_DC)
-{
- return 0 <= mysql_handle_doer(dbh, ZEND_STRL("START TRANSACTION") TSRMLS_CC);
-}
-
-static int mysql_handle_commit(pdo_dbh_t *dbh TSRMLS_DC)
-{
- return 0 <= mysql_handle_doer(dbh, ZEND_STRL("COMMIT") TSRMLS_CC);
-}
-
-static int mysql_handle_rollback(pdo_dbh_t *dbh TSRMLS_DC)
-{
- return 0 <= mysql_handle_doer(dbh, ZEND_STRL("ROLLBACK") TSRMLS_CC);
-}
-
-static int mysql_handle_autocommit(pdo_dbh_t *dbh TSRMLS_DC)
-{
- if (dbh->auto_commit) {
- return 0 <= mysql_handle_doer(dbh, ZEND_STRL("SET AUTOCOMMIT=1") TSRMLS_CC);
- } else {
- return 0 <= mysql_handle_doer(dbh, ZEND_STRL("SET AUTOCOMMIT=0") TSRMLS_CC);
- }
-}
-
-static int pdo_mysql_set_attribute(pdo_dbh_t *dbh, long attr, zval *val TSRMLS_DC)
-{
- switch (attr) {
- case PDO_ATTR_AUTOCOMMIT:
-
- convert_to_boolean(val);
-
- /* ignore if the new value equals the old one */
- if (dbh->auto_commit ^ Z_BVAL_P(val)) {
- dbh->auto_commit = Z_BVAL_P(val);
- mysql_handle_autocommit(dbh TSRMLS_CC);
- }
- return 1;
-
- default:
- return 0;
- }
-}
-
-static int pdo_mysql_get_attribute(pdo_dbh_t *dbh, long attr, zval *return_value TSRMLS_DC)
-{
- pdo_mysql_db_handle *H = (pdo_mysql_db_handle *)dbh->driver_data;
-
- switch (attr) {
- case PDO_ATTR_CLIENT_VERSION:
- ZVAL_STRING(return_value, (char *)mysql_get_client_info(), 1);
- break;
-
- case PDO_ATTR_SERVER_VERSION:
- ZVAL_STRING(return_value, (char *)mysql_get_server_info(H->server), 1);
- break;
-
- case PDO_ATTR_CONNECTION_STATUS:
- ZVAL_STRING(return_value, (char *)mysql_get_host_info(H->server), 1);
- break;
-
- case PDO_ATTR_SERVER_INFO: {
- char *tmp;
-
- if ((tmp = (char *)mysql_stat(H->server))) {
- ZVAL_STRING(return_value, tmp, 1);
- } else {
- pdo_mysql_error(dbh);
- return -1;
- }
- }
- break;
-
- case PDO_ATTR_AUTOCOMMIT:
- ZVAL_LONG(return_value, dbh->auto_commit);
- return 1;
-
- default:
- return 0;
- }
-
- return 1;
-}
-
-
-static struct pdo_dbh_methods mysql_methods = {
- mysql_handle_closer,
- mysql_handle_preparer,
- mysql_handle_doer,
- mysql_handle_quoter,
- mysql_handle_begin,
- mysql_handle_commit,
- mysql_handle_rollback,
- pdo_mysql_set_attribute,
- pdo_mysql_last_insert_id,
- pdo_mysql_fetch_error_func,
- pdo_mysql_get_attribute,
- NULL /* check_liveness: TODO: ping */
-};
-
-#ifndef PDO_MYSQL_UNIX_ADDR
-# ifdef PHP_WIN32
-# define PDO_MYSQL_UNIX_ADDR "MySQL"
-# else
-# define PDO_MYSQL_UNIX_ADDR "/tmp/mysql.sock"
-# endif
-#endif
-
-static int pdo_mysql_handle_factory(pdo_dbh_t *dbh, zval *driver_options TSRMLS_DC) /* {{{ */
-{
- pdo_mysql_db_handle *H;
- int i, ret = 0;
- char *host = NULL, *unix_socket = NULL;
- unsigned int port = 3306;
- char *dbname;
- struct pdo_data_src_parser vars[] = {
- { "charset", NULL, 0 },
- { "dbname", "", 0 },
- { "host", "localhost", 0 },
- { "port", "3306", 0 },
- { "unix_socket", PDO_MYSQL_UNIX_ADDR, 0 },
- };
-
- php_pdo_parse_data_source(dbh->data_source, dbh->data_source_len, vars, 4);
-
- H = pecalloc(1, sizeof(pdo_mysql_db_handle), dbh->is_persistent);
-
- H->einfo.errcode = 0;
- H->einfo.errmsg = NULL;
-
- /* allocate an environment */
-
- /* handle for the server */
- H->server = mysql_init(NULL);
- dbh->driver_data = H;
-
- /* handle MySQL options */
- if (driver_options) {
- long connect_timeout = pdo_attr_lval(driver_options, PDO_ATTR_TIMEOUT, 30 TSRMLS_CC);
-
- if (mysql_options(H->server, MYSQL_OPT_CONNECT_TIMEOUT, (const char *)&connect_timeout)) {
- pdo_mysql_error(dbh);
- goto cleanup;
- }
- }
-
- if (vars[2].optval && !strcmp("localhost", vars[2].optval)) {
- unix_socket = vars[4].optval;
- } else {
- host = vars[2].optval;
- port = atoi(vars[3].optval);
- }
- dbname = vars[1].optval;
- if (mysql_real_connect(H->server, host, dbh->username, dbh->password, dbname, port, unix_socket, 0) == NULL) {
- pdo_mysql_error(dbh);
- goto cleanup;
- }
-
- mysql_handle_autocommit(dbh TSRMLS_CC);
-
- H->attached = 1;
-
- dbh->alloc_own_columns = 1;
- dbh->max_escaped_char_length = 2;
- dbh->methods = &mysql_methods;
-
- ret = 1;
-
-cleanup:
- for (i = 0; i < sizeof(vars)/sizeof(vars[0]); i++) {
- if (vars[i].freeme) {
- efree(vars[i].optval);
- }
- }
-
- dbh->methods = &mysql_methods;
-
- return ret;
-}
-/* }}} */
-
-pdo_driver_t pdo_mysql_driver = {
- PDO_DRIVER_HEADER(mysql),
- pdo_mysql_handle_factory
-};
-
-/*
- * Local variables:
- * tab-width: 4
- * c-basic-offset: 4
- * End:
- * vim600: noet sw=4 ts=4 fdm=marker
- * vim<600: noet sw=4 ts=4
- */
diff --git a/ext/pdo_mysql/mysql_statement.c b/ext/pdo_mysql/mysql_statement.c
deleted file mode 100755
index 0615534f35..0000000000
--- a/ext/pdo_mysql/mysql_statement.c
+++ /dev/null
@@ -1,265 +0,0 @@
-/*
- +----------------------------------------------------------------------+
- | PHP Version 5 |
- +----------------------------------------------------------------------+
- | Copyright (c) 1997-2004 The PHP Group |
- +----------------------------------------------------------------------+
- | This source file is subject to version 3.0 of the PHP license, |
- | that is bundled with this package in the file LICENSE, and is |
- | available through the world-wide-web at the following url: |
- | http://www.php.net/license/3_0.txt. |
- | If you did not receive a copy of the PHP license and are unable to |
- | obtain it through the world-wide-web, please send a note to |
- | license@php.net so we can mail you a copy immediately. |
- +----------------------------------------------------------------------+
- | Author: George Schlossnagle <george@omniti.com> |
- +----------------------------------------------------------------------+
-*/
-
-/* $Id$ */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include "php.h"
-#include "php_ini.h"
-#include "ext/standard/info.h"
-#include "pdo/php_pdo.h"
-#include "pdo/php_pdo_driver.h"
-#include "php_pdo_mysql.h"
-#include "php_pdo_mysql_int.h"
-
-
-static int pdo_mysql_stmt_dtor(pdo_stmt_t *stmt TSRMLS_DC)
-{
- pdo_mysql_stmt *S = (pdo_mysql_stmt*)stmt->driver_data;
-
- if (S->result) {
- /* free the resource */
- mysql_free_result(S->result);
- S->result = NULL;
- }
- if (S->einfo.errmsg) {
- efree(S->einfo.errmsg);
- S->einfo.errmsg = NULL;
- }
- efree(S);
- return 1;
-}
-
-static int pdo_mysql_stmt_execute(pdo_stmt_t *stmt TSRMLS_DC)
-{
- pdo_mysql_stmt *S = (pdo_mysql_stmt*)stmt->driver_data;
- pdo_mysql_db_handle *H = S->H;
- my_ulonglong row_count;
-
- /* ensure that we free any previous unfetched results */
- if (S->result) {
- mysql_free_result(S->result);
- S->result = NULL;
- }
-
- if (mysql_real_query(H->server, stmt->active_query_string, stmt->active_query_stringlen) != 0) {
- pdo_mysql_error_stmt(stmt);
- return 0;
- }
-
- row_count = mysql_affected_rows(H->server);
- if (row_count == (my_ulonglong)-1) {
- /* we either have a query that returned a result set or an error occured
- lets see if we have access to a result set */
- S->result = mysql_use_result(H->server);
- if (NULL == S->result) {
- pdo_mysql_error_stmt(stmt);
- return 0;
- }
-
- stmt->row_count = 0;
-
- if (!stmt->executed) {
- stmt->column_count = (int) mysql_num_fields(S->result);
- S->fields = mysql_fetch_fields(S->result);
- }
- } else {
- /* this was a DML or DDL query (INSERT, UPDATE, DELETE, ... */
- stmt->row_count = row_count;
- }
-
- return 1;
-}
-
-static int pdo_mysql_stmt_param_hook(pdo_stmt_t *stmt, struct pdo_bound_param_data *param,
- enum pdo_param_event event_type TSRMLS_DC)
-{
- return 1;
-}
-
-static int pdo_mysql_stmt_fetch(pdo_stmt_t *stmt,
- enum pdo_fetch_orientation ori, long offset TSRMLS_DC)
-{
- pdo_mysql_stmt *S = (pdo_mysql_stmt*)stmt->driver_data;
- if (!S->result) {
- return 0;
- }
- if ((S->current_data = mysql_fetch_row(S->result)) == NULL) {
- if (mysql_errno(S->H->server)) {
- pdo_mysql_error_stmt(stmt);
- }
- return 0;
- }
- S->current_lengths = mysql_fetch_lengths(S->result);
- return 1;
-}
-
-static int pdo_mysql_stmt_describe(pdo_stmt_t *stmt, int colno TSRMLS_DC)
-{
- pdo_mysql_stmt *S = (pdo_mysql_stmt*)stmt->driver_data;
- struct pdo_column_data *cols = stmt->columns;
- unsigned int i;
-
- if (!S->result) {
- return 0;
- }
-
- if (colno >= stmt->column_count) {
- /* error invalid column */
- return 0;
- }
-
- /* fetch all on demand, this seems easiest
- ** if we've been here before bail out
- */
- if (cols[0].name) {
- return 1;
- }
- for(i=0; i < stmt->column_count; i++) {
- int namelen;
- namelen = strlen(S->fields[i].name);
- cols[i].precision = S->fields[i].decimals;
- cols[i].maxlen = S->fields[i].length;
- cols[i].namelen = namelen;
- cols[i].name = estrndup(S->fields[i].name, namelen + 1);
- cols[i].param_type = PDO_PARAM_STR;
- }
- return 1;
-}
-
-static int pdo_mysql_stmt_get_col(pdo_stmt_t *stmt, int colno, char **ptr, unsigned long *len, int *caller_frees TSRMLS_DC)
-{
- pdo_mysql_stmt *S = (pdo_mysql_stmt*)stmt->driver_data;
-
- if (S->current_data == NULL || !S->result) {
- return 0;
- }
- if (colno >= stmt->column_count) {
- /* error invalid column */
- return 0;
- }
- *ptr = S->current_data[colno];
- *len = S->current_lengths[colno];
- return 1;
-}
-
-static char *type_to_name_native(int type)
-{
-#define PDO_MYSQL_NATIVE_TYPE_NAME(x) case FIELD_TYPE_##x: return #x;
-
- switch (type) {
- PDO_MYSQL_NATIVE_TYPE_NAME(STRING)
- PDO_MYSQL_NATIVE_TYPE_NAME(VAR_STRING)
-#ifdef MYSQL_HAS_TINY
- PDO_MYSQL_NATIVE_TYPE_NAME(TINY)
-#endif
- PDO_MYSQL_NATIVE_TYPE_NAME(SHORT)
- PDO_MYSQL_NATIVE_TYPE_NAME(LONG)
- PDO_MYSQL_NATIVE_TYPE_NAME(LONGLONG)
- PDO_MYSQL_NATIVE_TYPE_NAME(INT24)
- PDO_MYSQL_NATIVE_TYPE_NAME(FLOAT)
- PDO_MYSQL_NATIVE_TYPE_NAME(DOUBLE)
- PDO_MYSQL_NATIVE_TYPE_NAME(DECIMAL)
- PDO_MYSQL_NATIVE_TYPE_NAME(TIMESTAMP)
-#ifdef MYSQL_HAS_YEAR
- PDO_MYSQL_NATIVE_TYPE_NAME(YEAR)
-#endif
- PDO_MYSQL_NATIVE_TYPE_NAME(DATE)
- PDO_MYSQL_NATIVE_TYPE_NAME(TIME)
- PDO_MYSQL_NATIVE_TYPE_NAME(DATETIME)
- PDO_MYSQL_NATIVE_TYPE_NAME(TINY_BLOB)
- PDO_MYSQL_NATIVE_TYPE_NAME(MEDIUM_BLOB)
- PDO_MYSQL_NATIVE_TYPE_NAME(LONG_BLOB)
- PDO_MYSQL_NATIVE_TYPE_NAME(BLOB)
- PDO_MYSQL_NATIVE_TYPE_NAME(NULL)
- default:
- return NULL;
- }
-}
-
-static int pdo_mysql_stmt_col_meta(pdo_stmt_t *stmt, long colno, zval *return_value TSRMLS_DC)
-{
- pdo_mysql_stmt *S = (pdo_mysql_stmt*)stmt->driver_data;
- MYSQL_FIELD *F;
- zval *flags;
- char *str;
-
- if (!S->result) {
- return FAILURE;
- }
- if (colno >= stmt->column_count) {
- /* error invalid column */
- return FAILURE;
- }
-
- array_init(return_value);
- MAKE_STD_ZVAL(flags);
- array_init(flags);
-
- F = S->fields + colno;
-
- if (F->def) {
- add_assoc_string(return_value, "mysql:def", F->def, 1);
- }
- if (IS_NOT_NULL(F->flags)) {
- add_next_index_string(flags, "not_null", 1);
- }
- if (IS_PRI_KEY(F->flags)) {
- add_next_index_string(flags, "primary_key", 1);
- }
- if (F->flags & MULTIPLE_KEY_FLAG) {
- add_next_index_string(flags, "multiple_key", 1);
- }
- if (F->flags & UNIQUE_KEY_FLAG) {
- add_next_index_string(flags, "unique_key", 1);
- }
- if (IS_BLOB(F->flags)) {
- add_next_index_string(flags, "blob", 1);
- }
- str = type_to_name_native(F->type);
- if (str) {
- add_assoc_string(return_value, "native_type", str, 1);
- }
-
- add_assoc_zval(return_value, "flags", flags);
- return SUCCESS;
-}
-
-struct pdo_stmt_methods mysql_stmt_methods = {
- pdo_mysql_stmt_dtor,
- pdo_mysql_stmt_execute,
- pdo_mysql_stmt_fetch,
- pdo_mysql_stmt_describe,
- pdo_mysql_stmt_get_col,
- pdo_mysql_stmt_param_hook,
- NULL, /* set_attr */
- NULL, /* get_attr */
- pdo_mysql_stmt_col_meta
-};
-
-/*
- * Local variables:
- * tab-width: 4
- * c-basic-offset: 4
- * End:
- * vim600: noet sw=4 ts=4 fdm=marker
- * vim<600: noet sw=4 ts=4
- */
diff --git a/ext/pdo_mysql/package.xml b/ext/pdo_mysql/package.xml
deleted file mode 100644
index 77b3aa144a..0000000000
--- a/ext/pdo_mysql/package.xml
+++ /dev/null
@@ -1,49 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!DOCTYPE package SYSTEM "../pear/package.dtd">
-<package version="1.0">
- <name>PDO_MYSQL</name>
- <summary>Mysql 3.x/4.0 driver for PDO</summary>
- <maintainers>
- <maintainer>
- <user>gschlossnagle</user>
- <name>George Schlossnagle</name>
- <email>george@omniti.com</email>
- <role>lead</role>
- </maintainer>
- <maintainer>
- <user>iliaa</user>
- <name>Ilia Alshanetsky</name>
- <email>iliaa@php.net</email>
- <role>lead</role>
- </maintainer>
- </maintainers>
- <description>
- This extension provides a Mysql 3.x/4.0 driver for PDO.
- </description>
- <license>PHP</license>
- <release>
- <state>beta</state>
- <version>0.2</version>
- <date>2005-02-09</date>
-
- <notes>
- Hope it works!
- </notes>
-
- <filelist>
- <file role="src" name="config.m4"/>
- <file role="src" name="pdo_mysql.c"/>
- <file role="src" name="mysql_driver.c"/>
- <file role="src" name="mysql_statement.c"/>
- <file role="src" name="php_pdo_mysql.h"/>
- <file role="src" name="php_pdo_mysql_int.h"/>
- <file role="src" name="php_pdo_mysql_sqlstate.h"/>
-
- <file role="doc" name="CREDITS"/>
- </filelist>
- <deps>
- <dep type="php" rel="ge" version="5.0.3"/>
- <dep type="ext" name="pdo" rel="ge" version="0.2"/>
- </deps>
- </release>
-</package>
diff --git a/ext/pdo_mysql/pdo_mysql.c b/ext/pdo_mysql/pdo_mysql.c
deleted file mode 100755
index 819c44f0d7..0000000000
--- a/ext/pdo_mysql/pdo_mysql.c
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- +----------------------------------------------------------------------+
- | PHP Version 5 |
- +----------------------------------------------------------------------+
- | Copyright (c) 1997-2004 The PHP Group |
- +----------------------------------------------------------------------+
- | This source file is subject to version 3.0 of the PHP license, |
- | that is bundled with this package in the file LICENSE, and is |
- | available through the world-wide-web at the following url: |
- | http://www.php.net/license/3_0.txt. |
- | If you did not receive a copy of the PHP license and are unable to |
- | obtain it through the world-wide-web, please send a note to |
- | license@php.net so we can mail you a copy immediately. |
- +----------------------------------------------------------------------+
- | Author: George Schlossnagle <george@omniti.com> |
- +----------------------------------------------------------------------+
-*/
-
-/* $Id$ */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include "php.h"
-#include "php_ini.h"
-#include "ext/standard/info.h"
-#include "pdo/php_pdo.h"
-#include "pdo/php_pdo_driver.h"
-#include "php_pdo_mysql.h"
-#include "php_pdo_mysql_int.h"
-
-/* {{{ pdo_mysql_functions[] */
-function_entry pdo_mysql_functions[] = {
- {NULL, NULL, NULL}
-};
-/* }}} */
-
-/* {{{ pdo_mysql_module_entry */
-zend_module_entry pdo_mysql_module_entry = {
- STANDARD_MODULE_HEADER,
- "pdo_mysql",
- pdo_mysql_functions,
- PHP_MINIT(pdo_mysql),
- PHP_MSHUTDOWN(pdo_mysql),
- NULL,
- NULL,
- PHP_MINFO(pdo_mysql),
- "0.2",
- STANDARD_MODULE_PROPERTIES
-};
-/* }}} */
-
-#ifdef COMPILE_DL_PDO_MYSQL
-ZEND_GET_MODULE(pdo_mysql)
-#endif
-
-/* true global environment */
-
-/* {{{ PHP_MINIT_FUNCTION
- */
-PHP_MINIT_FUNCTION(pdo_mysql)
-{
- return php_pdo_register_driver(&pdo_mysql_driver);
-}
-/* }}} */
-
-/* {{{ PHP_MSHUTDOWN_FUNCTION
- */
-PHP_MSHUTDOWN_FUNCTION(pdo_mysql)
-{
- php_pdo_unregister_driver(&pdo_mysql_driver);
- return SUCCESS;
-}
-/* }}} */
-
-/* {{{ PHP_MINFO_FUNCTION
- */
-PHP_MINFO_FUNCTION(pdo_mysql)
-{
- php_info_print_table_start();
- php_info_print_table_header(2, "PDO Driver for MySQL 3.x Client Libraries", "enabled");
- php_info_print_table_end();
-}
-/* }}} */
-
-/*
- * Local variables:
- * tab-width: 4
- * c-basic-offset: 4
- * End:
- * vim600: noet sw=4 ts=4 fdm=marker
- * vim<600: noet sw=4 ts=4
- */
diff --git a/ext/pdo_mysql/php_pdo_mysql.h b/ext/pdo_mysql/php_pdo_mysql.h
deleted file mode 100755
index 1fed28bd5e..0000000000
--- a/ext/pdo_mysql/php_pdo_mysql.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- +----------------------------------------------------------------------+
- | PHP Version 5 |
- +----------------------------------------------------------------------+
- | Copyright (c) 1997-2004 The PHP Group |
- +----------------------------------------------------------------------+
- | This source file is subject to version 3.0 of the PHP license, |
- | that is bundled with this package in the file LICENSE, and is |
- | available through the world-wide-web at the following url: |
- | http://www.php.net/license/3_0.txt. |
- | If you did not receive a copy of the PHP license and are unable to |
- | obtain it through the world-wide-web, please send a note to |
- | license@php.net so we can mail you a copy immediately. |
- +----------------------------------------------------------------------+
- | Author: George Schlossnagle <george@omniti.com> |
- +----------------------------------------------------------------------+
-*/
-
-/* $Id$ */
-
-#ifndef PHP_PDO_MYSQL_H
-#define PHP_PDO_MYSQL_H
-
-extern zend_module_entry pdo_mysql_module_entry;
-#define phpext_pdo_mysql_ptr &pdo_mysql_module_entry
-
-#ifdef PHP_WIN32
-#define PHP_PDO_MYSQL_API __declspec(dllexport)
-#else
-#define PHP_PDO_MYSQL_API
-#endif
-
-#ifdef ZTS
-#include "TSRM.h"
-#endif
-
-PHP_MINIT_FUNCTION(pdo_mysql);
-PHP_MSHUTDOWN_FUNCTION(pdo_mysql);
-PHP_RINIT_FUNCTION(pdo_mysql);
-PHP_RSHUTDOWN_FUNCTION(pdo_mysql);
-PHP_MINFO_FUNCTION(pdo_mysql);
-
-#endif /* PHP_PDO_MYSQL_H */
-
-
-/*
- * Local variables:
- * tab-width: 4
- * c-basic-offset: 4
- * End:
- * vim600: noet sw=4 ts=4 fdm=marker
- * vim<600: noet sw=4 ts=4
- */
diff --git a/ext/pdo_mysql/php_pdo_mysql_int.h b/ext/pdo_mysql/php_pdo_mysql_int.h
deleted file mode 100755
index 4dc5739793..0000000000
--- a/ext/pdo_mysql/php_pdo_mysql_int.h
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- +----------------------------------------------------------------------+
- | PHP Version 5 |
- +----------------------------------------------------------------------+
- | Copyright (c) 1997-2004 The PHP Group |
- +----------------------------------------------------------------------+
- | This source file is subject to version 3.0 of the PHP license, |
- | that is bundled with this package in the file LICENSE, and is |
- | available through the world-wide-web at the following url: |
- | http://www.php.net/license/3_0.txt. |
- | If you did not receive a copy of the PHP license and are unable to |
- | obtain it through the world-wide-web, please send a note to |
- | license@php.net so we can mail you a copy immediately. |
- +----------------------------------------------------------------------+
- | Author: George Schlossnagle <george@omniti.com> |
- +----------------------------------------------------------------------+
-*/
-
-/* $Id$ */
-
-#ifndef PHP_PDO_MYSQL_INT_H
-#define PHP_PDO_MYSQL_INT_H
-
-#include <mysql.h>
-
-typedef struct {
- const char *file;
- int line;
- unsigned int errcode;
- char *errmsg;
-} pdo_mysql_error_info;
-
-/* stuff we use in a mySQL database handle */
-typedef struct {
- MYSQL *server;
-
- unsigned attached:1;
- unsigned _reserved:31;
-
- pdo_mysql_error_info einfo;
-} pdo_mysql_db_handle;
-
-typedef struct {
- MYSQL_FIELD *def;
-} pdo_mysql_column;
-
-typedef struct {
- pdo_mysql_db_handle *H;
- MYSQL_RES *result;
- MYSQL_FIELD *fields;
- MYSQL_ROW current_data;
- long *current_lengths;
- pdo_mysql_error_info einfo;
-} pdo_mysql_stmt;
-
-typedef struct {
- char *repr;
- long repr_len;
- int mysql_type;
- void *thing; /* for LOBS, REFCURSORS etc. */
-} pdo_mysql_bound_param;
-
-extern pdo_driver_t pdo_mysql_driver;
-
-extern int _pdo_mysql_error(pdo_dbh_t *dbh, pdo_stmt_t *stmt, const char *file, int line TSRMLS_DC);
-#define pdo_mysql_error(s) _pdo_mysql_error(s, NULL, __FILE__, __LINE__ TSRMLS_CC)
-#define pdo_mysql_error_stmt(s) _pdo_mysql_error(stmt->dbh, stmt, __FILE__, __LINE__ TSRMLS_CC)
-
-extern struct pdo_stmt_methods mysql_stmt_methods;
-#endif
diff --git a/ext/pdo_mysql/php_pdo_mysql_sqlstate.h b/ext/pdo_mysql/php_pdo_mysql_sqlstate.h
deleted file mode 100644
index 97724b72e9..0000000000
--- a/ext/pdo_mysql/php_pdo_mysql_sqlstate.h
+++ /dev/null
@@ -1,388 +0,0 @@
-/* DO NOT EDIT THIS FILE!!! It is auto generated by get_error_codes.php */
-#ifdef ER_DUP_KEY
- case ER_DUP_KEY : return "23000";
-#endif
-#ifdef ER_OUTOFMEMORY
- case ER_OUTOFMEMORY : return "HY001";
-#endif
-#ifdef ER_OUT_OF_SORTMEMORY
- case ER_OUT_OF_SORTMEMORY : return "HY001";
-#endif
-#ifdef ER_CON_COUNT_ERROR
- case ER_CON_COUNT_ERROR : return "08004";
-#endif
-#ifdef ER_BAD_HOST_ERROR
- case ER_BAD_HOST_ERROR : return "08S01";
-#endif
-#ifdef ER_HANDSHAKE_ERROR
- case ER_HANDSHAKE_ERROR : return "08S01";
-#endif
-#ifdef ER_DBACCESS_DENIED_ERROR
- case ER_DBACCESS_DENIED_ERROR : return "42000";
-#endif
-#ifdef ER_ACCESS_DENIED_ERROR
- case ER_ACCESS_DENIED_ERROR : return "28000";
-#endif
-#ifdef ER_NO_DB_ERROR
- case ER_NO_DB_ERROR : return "3D000";
-#endif
-#ifdef ER_UNKNOWN_COM_ERROR
- case ER_UNKNOWN_COM_ERROR : return "08S01";
-#endif
-#ifdef ER_BAD_NULL_ERROR
- case ER_BAD_NULL_ERROR : return "23000";
-#endif
-#ifdef ER_BAD_DB_ERROR
- case ER_BAD_DB_ERROR : return "42000";
-#endif
-#ifdef ER_TABLE_EXISTS_ERROR
- case ER_TABLE_EXISTS_ERROR : return "42S01";
-#endif
-#ifdef ER_BAD_TABLE_ERROR
- case ER_BAD_TABLE_ERROR : return "42S02";
-#endif
-#ifdef ER_NON_UNIQ_ERROR
- case ER_NON_UNIQ_ERROR : return "23000";
-#endif
-#ifdef ER_SERVER_SHUTDOWN
- case ER_SERVER_SHUTDOWN : return "08S01";
-#endif
-#ifdef ER_BAD_FIELD_ERROR
- case ER_BAD_FIELD_ERROR : return "42S22";
-#endif
-#ifdef ER_WRONG_FIELD_WITH_GROUP
- case ER_WRONG_FIELD_WITH_GROUP : return "42000";
-#endif
-#ifdef ER_WRONG_GROUP_FIELD
- case ER_WRONG_GROUP_FIELD : return "42000";
-#endif
-#ifdef ER_WRONG_SUM_SELECT
- case ER_WRONG_SUM_SELECT : return "42000";
-#endif
-#ifdef ER_WRONG_VALUE_COUNT
- case ER_WRONG_VALUE_COUNT : return "21S01";
-#endif
-#ifdef ER_TOO_LONG_IDENT
- case ER_TOO_LONG_IDENT : return "42000";
-#endif
-#ifdef ER_DUP_FIELDNAME
- case ER_DUP_FIELDNAME : return "42S21";
-#endif
-#ifdef ER_DUP_KEYNAME
- case ER_DUP_KEYNAME : return "42000";
-#endif
-#ifdef ER_DUP_ENTRY
- case ER_DUP_ENTRY : return "23000";
-#endif
-#ifdef ER_WRONG_FIELD_SPEC
- case ER_WRONG_FIELD_SPEC : return "42000";
-#endif
-#ifdef ER_PARSE_ERROR
- case ER_PARSE_ERROR : return "42000";
-#endif
-#ifdef ER_NONUNIQ_TABLE
- case ER_NONUNIQ_TABLE : return "42000";
-#endif
-#ifdef ER_INVALID_DEFAULT
- case ER_INVALID_DEFAULT : return "42000";
-#endif
-#ifdef ER_MULTIPLE_PRI_KEY
- case ER_MULTIPLE_PRI_KEY : return "42000";
-#endif
-#ifdef ER_TOO_MANY_KEYS
- case ER_TOO_MANY_KEYS : return "42000";
-#endif
-#ifdef ER_TOO_MANY_KEY_PARTS
- case ER_TOO_MANY_KEY_PARTS : return "42000";
-#endif
-#ifdef ER_TOO_LONG_KEY
- case ER_TOO_LONG_KEY : return "42000";
-#endif
-#ifdef ER_KEY_COLUMN_DOES_NOT_EXITS
- case ER_KEY_COLUMN_DOES_NOT_EXITS : return "42000";
-#endif
-#ifdef ER_BLOB_USED_AS_KEY
- case ER_BLOB_USED_AS_KEY : return "42000";
-#endif
-#ifdef ER_TOO_BIG_FIELDLENGTH
- case ER_TOO_BIG_FIELDLENGTH : return "42000";
-#endif
-#ifdef ER_WRONG_AUTO_KEY
- case ER_WRONG_AUTO_KEY : return "42000";
-#endif
-#ifdef ER_FORCING_CLOSE
- case ER_FORCING_CLOSE : return "08S01";
-#endif
-#ifdef ER_IPSOCK_ERROR
- case ER_IPSOCK_ERROR : return "08S01";
-#endif
-#ifdef ER_NO_SUCH_INDEX
- case ER_NO_SUCH_INDEX : return "42S12";
-#endif
-#ifdef ER_WRONG_FIELD_TERMINATORS
- case ER_WRONG_FIELD_TERMINATORS : return "42000";
-#endif
-#ifdef ER_BLOBS_AND_NO_TERMINATED
- case ER_BLOBS_AND_NO_TERMINATED : return "42000";
-#endif
-#ifdef ER_CANT_REMOVE_ALL_FIELDS
- case ER_CANT_REMOVE_ALL_FIELDS : return "42000";
-#endif
-#ifdef ER_CANT_DROP_FIELD_OR_KEY
- case ER_CANT_DROP_FIELD_OR_KEY : return "42000";
-#endif
-#ifdef ER_BLOB_CANT_HAVE_DEFAULT
- case ER_BLOB_CANT_HAVE_DEFAULT : return "42000";
-#endif
-#ifdef ER_WRONG_DB_NAME
- case ER_WRONG_DB_NAME : return "42000";
-#endif
-#ifdef ER_WRONG_TABLE_NAME
- case ER_WRONG_TABLE_NAME : return "42000";
-#endif
-#ifdef ER_TOO_BIG_SELECT
- case ER_TOO_BIG_SELECT : return "42000";
-#endif
-#ifdef ER_UNKNOWN_PROCEDURE
- case ER_UNKNOWN_PROCEDURE : return "42000";
-#endif
-#ifdef ER_WRONG_PARAMCOUNT_TO_PROCEDURE
- case ER_WRONG_PARAMCOUNT_TO_PROCEDURE : return "42000";
-#endif
-#ifdef ER_UNKNOWN_TABLE
- case ER_UNKNOWN_TABLE : return "42S02";
-#endif
-#ifdef ER_FIELD_SPECIFIED_TWICE
- case ER_FIELD_SPECIFIED_TWICE : return "42000";
-#endif
-#ifdef ER_UNSUPPORTED_EXTENSION
- case ER_UNSUPPORTED_EXTENSION : return "42000";
-#endif
-#ifdef ER_TABLE_MUST_HAVE_COLUMNS
- case ER_TABLE_MUST_HAVE_COLUMNS : return "42000";
-#endif
-#ifdef ER_UNKNOWN_CHARACTER_SET
- case ER_UNKNOWN_CHARACTER_SET : return "42000";
-#endif
-#ifdef ER_TOO_BIG_ROWSIZE
- case ER_TOO_BIG_ROWSIZE : return "42000";
-#endif
-#ifdef ER_WRONG_OUTER_JOIN
- case ER_WRONG_OUTER_JOIN : return "42000";
-#endif
-#ifdef ER_NULL_COLUMN_IN_INDEX
- case ER_NULL_COLUMN_IN_INDEX : return "42000";
-#endif
-#ifdef ER_PASSWORD_ANONYMOUS_USER
- case ER_PASSWORD_ANONYMOUS_USER : return "42000";
-#endif
-#ifdef ER_PASSWORD_NOT_ALLOWED
- case ER_PASSWORD_NOT_ALLOWED : return "42000";
-#endif
-#ifdef ER_PASSWORD_NO_MATCH
- case ER_PASSWORD_NO_MATCH : return "42000";
-#endif
-#ifdef ER_WRONG_VALUE_COUNT_ON_ROW
- case ER_WRONG_VALUE_COUNT_ON_ROW : return "21S01";
-#endif
-#ifdef ER_INVALID_USE_OF_NULL
- case ER_INVALID_USE_OF_NULL : return "42000";
-#endif
-#ifdef ER_REGEXP_ERROR
- case ER_REGEXP_ERROR : return "42000";
-#endif
-#ifdef ER_NONEXISTING_GRANT
- case ER_NONEXISTING_GRANT : return "42000";
-#endif
-#ifdef ER_TABLEACCESS_DENIED_ERROR
- case ER_TABLEACCESS_DENIED_ERROR : return "42000";
-#endif
-#ifdef ER_COLUMNACCESS_DENIED_ERROR
- case ER_COLUMNACCESS_DENIED_ERROR : return "42000";
-#endif
-#ifdef ER_ILLEGAL_GRANT_FOR_TABLE
- case ER_ILLEGAL_GRANT_FOR_TABLE : return "42000";
-#endif
-#ifdef ER_GRANT_WRONG_HOST_OR_USER
- case ER_GRANT_WRONG_HOST_OR_USER : return "42000";
-#endif
-#ifdef ER_NO_SUCH_TABLE
- case ER_NO_SUCH_TABLE : return "42S02";
-#endif
-#ifdef ER_NONEXISTING_TABLE_GRANT
- case ER_NONEXISTING_TABLE_GRANT : return "42000";
-#endif
-#ifdef ER_NOT_ALLOWED_COMMAND
- case ER_NOT_ALLOWED_COMMAND : return "42000";
-#endif
-#ifdef ER_SYNTAX_ERROR
- case ER_SYNTAX_ERROR : return "42000";
-#endif
-#ifdef ER_ABORTING_CONNECTION
- case ER_ABORTING_CONNECTION : return "08S01";
-#endif
-#ifdef ER_NET_PACKET_TOO_LARGE
- case ER_NET_PACKET_TOO_LARGE : return "08S01";
-#endif
-#ifdef ER_NET_READ_ERROR_FROM_PIPE
- case ER_NET_READ_ERROR_FROM_PIPE : return "08S01";
-#endif
-#ifdef ER_NET_FCNTL_ERROR
- case ER_NET_FCNTL_ERROR : return "08S01";
-#endif
-#ifdef ER_NET_PACKETS_OUT_OF_ORDER
- case ER_NET_PACKETS_OUT_OF_ORDER : return "08S01";
-#endif
-#ifdef ER_NET_UNCOMPRESS_ERROR
- case ER_NET_UNCOMPRESS_ERROR : return "08S01";
-#endif
-#ifdef ER_NET_READ_ERROR
- case ER_NET_READ_ERROR : return "08S01";
-#endif
-#ifdef ER_NET_READ_INTERRUPTED
- case ER_NET_READ_INTERRUPTED : return "08S01";
-#endif
-#ifdef ER_NET_ERROR_ON_WRITE
- case ER_NET_ERROR_ON_WRITE : return "08S01";
-#endif
-#ifdef ER_NET_WRITE_INTERRUPTED
- case ER_NET_WRITE_INTERRUPTED : return "08S01";
-#endif
-#ifdef ER_TOO_LONG_STRING
- case ER_TOO_LONG_STRING : return "42000";
-#endif
-#ifdef ER_TABLE_CANT_HANDLE_BLOB
- case ER_TABLE_CANT_HANDLE_BLOB : return "42000";
-#endif
-#ifdef ER_TABLE_CANT_HANDLE_AUTO_INCREMENT
- case ER_TABLE_CANT_HANDLE_AUTO_INCREMENT : return "42000";
-#endif
-#ifdef ER_WRONG_COLUMN_NAME
- case ER_WRONG_COLUMN_NAME : return "42000";
-#endif
-#ifdef ER_WRONG_KEY_COLUMN
- case ER_WRONG_KEY_COLUMN : return "42000";
-#endif
-#ifdef ER_DUP_UNIQUE
- case ER_DUP_UNIQUE : return "23000";
-#endif
-#ifdef ER_BLOB_KEY_WITHOUT_LENGTH
- case ER_BLOB_KEY_WITHOUT_LENGTH : return "42000";
-#endif
-#ifdef ER_PRIMARY_CANT_HAVE_NULL
- case ER_PRIMARY_CANT_HAVE_NULL : return "42000";
-#endif
-#ifdef ER_TOO_MANY_ROWS
- case ER_TOO_MANY_ROWS : return "42000";
-#endif
-#ifdef ER_REQUIRES_PRIMARY_KEY
- case ER_REQUIRES_PRIMARY_KEY : return "42000";
-#endif
-#ifdef ER_CHECK_NO_SUCH_TABLE
- case ER_CHECK_NO_SUCH_TABLE : return "42000";
-#endif
-#ifdef ER_CHECK_NOT_IMPLEMENTED
- case ER_CHECK_NOT_IMPLEMENTED : return "42000";
-#endif
-#ifdef ER_CANT_DO_THIS_DURING_AN_TRANSACTION
- case ER_CANT_DO_THIS_DURING_AN_TRANSACTION: return "25000";
-#endif
-#ifdef ER_NEW_ABORTING_CONNECTION
- case ER_NEW_ABORTING_CONNECTION : return "08S01";
-#endif
-#ifdef ER_MASTER_NET_READ
- case ER_MASTER_NET_READ : return "08S01";
-#endif
-#ifdef ER_MASTER_NET_WRITE
- case ER_MASTER_NET_WRITE : return "08S01";
-#endif
-#ifdef ER_TOO_MANY_USER_CONNECTIONS
- case ER_TOO_MANY_USER_CONNECTIONS : return "42000";
-#endif
-#ifdef ER_READ_ONLY_TRANSACTION
- case ER_READ_ONLY_TRANSACTION : return "25000";
-#endif
-#ifdef ER_LOCK_DEADLOCK
- case ER_LOCK_DEADLOCK : return "40001";
-#endif
-#ifdef ER_NO_REFERENCED_ROW
- case ER_NO_REFERENCED_ROW : return "23000";
-#endif
-#ifdef ER_ROW_IS_REFERENCED
- case ER_ROW_IS_REFERENCED : return "23000";
-#endif
-#ifdef ER_CONNECT_TO_MASTER
- case ER_CONNECT_TO_MASTER : return "08S01";
-#endif
-#ifdef ER_USER_LIMIT_REACHED
- case ER_USER_LIMIT_REACHED : return "42000";
-#endif
-#ifdef ER_NO_DEFAULT
- case ER_NO_DEFAULT : return "42000";
-#endif
-#ifdef ER_WRONG_VALUE_FOR_VAR
- case ER_WRONG_VALUE_FOR_VAR : return "42000";
-#endif
-#ifdef ER_WRONG_TYPE_FOR_VAR
- case ER_WRONG_TYPE_FOR_VAR : return "42000";
-#endif
-#ifdef ER_CANT_USE_OPTION_HERE
- case ER_CANT_USE_OPTION_HERE : return "42000";
-#endif
-#ifdef ER_NOT_SUPPORTED_YET
- case ER_NOT_SUPPORTED_YET : return "42000";
-#endif
-#ifdef ER_WRONG_FK_DEF
- case ER_WRONG_FK_DEF : return "42000";
-#endif
-#ifdef ER_OPERAND_COLUMNS
- case ER_OPERAND_COLUMNS : return "21000";
-#endif
-#ifdef ER_SUBQUERY_NO_1_ROW
- case ER_SUBQUERY_NO_1_ROW : return "21000";
-#endif
-#ifdef ER_ILLEGAL_REFERENCE
- case ER_ILLEGAL_REFERENCE : return "42S22";
-#endif
-#ifdef ER_DERIVED_MUST_HAVE_ALIAS
- case ER_DERIVED_MUST_HAVE_ALIAS : return "42000";
-#endif
-#ifdef ER_SELECT_REDUCED
- case ER_SELECT_REDUCED : return "01000";
-#endif
-#ifdef ER_TABLENAME_NOT_ALLOWED_HERE
- case ER_TABLENAME_NOT_ALLOWED_HERE : return "42000";
-#endif
-#ifdef ER_NOT_SUPPORTED_AUTH_MODE
- case ER_NOT_SUPPORTED_AUTH_MODE : return "08004";
-#endif
-#ifdef ER_SPATIAL_CANT_HAVE_NULL
- case ER_SPATIAL_CANT_HAVE_NULL : return "42000";
-#endif
-#ifdef ER_COLLATION_CHARSET_MISMATCH
- case ER_COLLATION_CHARSET_MISMATCH : return "42000";
-#endif
-#ifdef ER_WARN_TOO_FEW_RECORDS
- case ER_WARN_TOO_FEW_RECORDS : return "01000";
-#endif
-#ifdef ER_WARN_TOO_MANY_RECORDS
- case ER_WARN_TOO_MANY_RECORDS : return "01000";
-#endif
-#ifdef ER_WARN_NULL_TO_NOTNULL
- case ER_WARN_NULL_TO_NOTNULL : return "01000";
-#endif
-#ifdef ER_WARN_DATA_OUT_OF_RANGE
- case ER_WARN_DATA_OUT_OF_RANGE : return "01000";
-#endif
-#ifdef ER_WARN_DATA_TRUNCATED
- case ER_WARN_DATA_TRUNCATED : return "01000";
-#endif
-#ifdef ER_WRONG_NAME_FOR_INDEX
- case ER_WRONG_NAME_FOR_INDEX : return "42000";
-#endif
-#ifdef ER_WRONG_NAME_FOR_CATALOG
- case ER_WRONG_NAME_FOR_CATALOG : return "42000";
-#endif
-#ifdef ER_UNKNOWN_STORAGE_ENGINE
- case ER_UNKNOWN_STORAGE_ENGINE : return "42000";
-#endif
diff --git a/ext/pdo_mysql/tests/connection.inc b/ext/pdo_mysql/tests/connection.inc
deleted file mode 100755
index a1b18184a9..0000000000
--- a/ext/pdo_mysql/tests/connection.inc
+++ /dev/null
@@ -1,12 +0,0 @@
-<?php
-
-$HOST = 'localhost';
-$USER = 'root';
-$PASSWD = '';
-$DBNAME = 'test';
-
-$CONNECTION = "mysql:host=$HOST;dbname=$DBNAME";
-
-$PDO_TESTS = dirname(__FILE__) . '/../../pdo/tests/';
-
-?>
diff --git a/ext/pdo_mysql/tests/pdo_001.phpt b/ext/pdo_mysql/tests/pdo_001.phpt
deleted file mode 100755
index 4292389426..0000000000
--- a/ext/pdo_mysql/tests/pdo_001.phpt
+++ /dev/null
@@ -1,41 +0,0 @@
---TEST--
-PDO_MySQL: PDO_FETCH_ASSOC
---SKIPIF--
-<?php # vim:ft=php
-require_once('skipif.inc'); ?>
---FILE--
-<?php
-
-require_once('connection.inc');
-require_once('prepare.inc');
-
-require_once($PDO_TESTS . 'pdo_001.inc');
-
-?>
-===DONE===
-<?php exit(0); ?>
---EXPECT--
-array(3) {
- [0]=>
- array(2) {
- ["id"]=>
- string(1) "1"
- ["val"]=>
- string(1) "A"
- }
- [1]=>
- array(2) {
- ["id"]=>
- string(1) "2"
- ["val"]=>
- string(1) "B"
- }
- [2]=>
- array(2) {
- ["id"]=>
- string(1) "3"
- ["val"]=>
- string(1) "C"
- }
-}
-===DONE===
diff --git a/ext/pdo_mysql/tests/pdo_002.phpt b/ext/pdo_mysql/tests/pdo_002.phpt
deleted file mode 100755
index c2fa867582..0000000000
--- a/ext/pdo_mysql/tests/pdo_002.phpt
+++ /dev/null
@@ -1,41 +0,0 @@
---TEST--
-PDO_MySQL: PDO_FETCH_NUM
---SKIPIF--
-<?php # vim:ft=php
-require_once('skipif.inc'); ?>
---FILE--
-<?php
-
-require_once('connection.inc');
-require_once('prepare.inc');
-
-require_once($PDO_TESTS . 'pdo_002.inc');
-
-?>
-===DONE===
-<?php exit(0); ?>
---EXPECT--
-array(3) {
- [0]=>
- array(2) {
- [0]=>
- string(1) "1"
- [1]=>
- string(1) "A"
- }
- [1]=>
- array(2) {
- [0]=>
- string(1) "2"
- [1]=>
- string(1) "B"
- }
- [2]=>
- array(2) {
- [0]=>
- string(1) "3"
- [1]=>
- string(1) "C"
- }
-}
-===DONE===
diff --git a/ext/pdo_mysql/tests/pdo_003.phpt b/ext/pdo_mysql/tests/pdo_003.phpt
deleted file mode 100755
index 09a803c355..0000000000
--- a/ext/pdo_mysql/tests/pdo_003.phpt
+++ /dev/null
@@ -1,53 +0,0 @@
---TEST--
-PDO_MySQL: PDO_FETCH_BOTH
---SKIPIF--
-<?php # vim:ft=php
-require_once('skipif.inc'); ?>
---FILE--
-<?php
-
-require_once('connection.inc');
-require_once('prepare.inc');
-
-require_once($PDO_TESTS . 'pdo_003.inc');
-
-?>
-===DONE===
-<?php exit(0); ?>
---EXPECT--
-array(3) {
- [0]=>
- array(4) {
- ["id"]=>
- string(1) "1"
- [0]=>
- string(1) "1"
- ["val"]=>
- string(1) "A"
- [1]=>
- string(1) "A"
- }
- [1]=>
- array(4) {
- ["id"]=>
- string(1) "2"
- [0]=>
- string(1) "2"
- ["val"]=>
- string(1) "B"
- [1]=>
- string(1) "B"
- }
- [2]=>
- array(4) {
- ["id"]=>
- string(1) "3"
- [0]=>
- string(1) "3"
- ["val"]=>
- string(1) "C"
- [1]=>
- string(1) "C"
- }
-}
-===DONE===
diff --git a/ext/pdo_mysql/tests/pdo_004.phpt b/ext/pdo_mysql/tests/pdo_004.phpt
deleted file mode 100755
index 4a00ed2274..0000000000
--- a/ext/pdo_mysql/tests/pdo_004.phpt
+++ /dev/null
@@ -1,41 +0,0 @@
---TEST--
-PDO_MySQL: PDO_FETCH_OBJ
---SKIPIF--
-<?php # vim:ft=php
-require_once('skipif.inc'); ?>
---FILE--
-<?php
-
-require_once('connection.inc');
-require_once('prepare.inc');
-
-require_once($PDO_TESTS . 'pdo_004.inc');
-
-?>
-===DONE===
-<?php exit(0); ?>
---EXPECTF--
-array(3) {
- [0]=>
- object(stdClass)#%d (2) {
- ["id"]=>
- string(1) "1"
- ["val"]=>
- string(1) "A"
- }
- [1]=>
- object(stdClass)#%d (2) {
- ["id"]=>
- string(1) "2"
- ["val"]=>
- string(1) "B"
- }
- [2]=>
- object(stdClass)#%d (2) {
- ["id"]=>
- string(1) "3"
- ["val"]=>
- string(1) "C"
- }
-}
-===DONE===
diff --git a/ext/pdo_mysql/tests/pdo_005.phpt b/ext/pdo_mysql/tests/pdo_005.phpt
deleted file mode 100755
index 8b93ffd230..0000000000
--- a/ext/pdo_mysql/tests/pdo_005.phpt
+++ /dev/null
@@ -1,120 +0,0 @@
---TEST--
-PDO_MySQL: PDO_FETCH_CLASS
---SKIPIF--
-<?php # vim:ft=php
-require_once('skipif.inc'); ?>
---FILE--
-<?php
-
-require_once('connection.inc');
-require_once('prepare.inc');
-
-require_once($PDO_TESTS . 'pdo_005.inc');
-
-?>
-===DONE===
-<?php exit(0); ?>
---EXPECTF--
-array(3) {
- [0]=>
- object(stdClass)#%d (3) {
- ["id"]=>
- string(1) "1"
- ["val"]=>
- string(1) "A"
- ["val2"]=>
- string(2) "AA"
- }
- [1]=>
- object(stdClass)#%d (3) {
- ["id"]=>
- string(1) "2"
- ["val"]=>
- string(1) "B"
- ["val2"]=>
- string(2) "BB"
- }
- [2]=>
- object(stdClass)#%d (3) {
- ["id"]=>
- string(1) "3"
- ["val"]=>
- string(1) "C"
- ["val2"]=>
- string(2) "CC"
- }
-}
-array(3) {
- [0]=>
- object(TestBase)#%d (3) {
- ["id"]=>
- string(1) "1"
- ["val:protected"]=>
- string(1) "A"
- ["val2:private"]=>
- string(2) "AA"
- }
- [1]=>
- object(TestBase)#%d (3) {
- ["id"]=>
- string(1) "2"
- ["val:protected"]=>
- string(1) "B"
- ["val2:private"]=>
- string(2) "BB"
- }
- [2]=>
- object(TestBase)#%d (3) {
- ["id"]=>
- string(1) "3"
- ["val:protected"]=>
- string(1) "C"
- ["val2:private"]=>
- string(2) "CC"
- }
-}
-TestDerived::__construct(0,1)
-TestDerived::__construct(1,2)
-TestDerived::__construct(2,3)
-array(3) {
- [0]=>
- object(TestDerived)#%d (5) {
- ["row:protected"]=>
- int(0)
- ["id"]=>
- string(1) "1"
- ["val:protected"]=>
- string(1) "A"
- ["val2:private"]=>
- NULL
- ["val2"]=>
- string(2) "AA"
- }
- [1]=>
- object(TestDerived)#%d (5) {
- ["row:protected"]=>
- int(1)
- ["id"]=>
- string(1) "2"
- ["val:protected"]=>
- string(1) "B"
- ["val2:private"]=>
- NULL
- ["val2"]=>
- string(2) "BB"
- }
- [2]=>
- object(TestDerived)#%d (5) {
- ["row:protected"]=>
- int(2)
- ["id"]=>
- string(1) "3"
- ["val:protected"]=>
- string(1) "C"
- ["val2:private"]=>
- NULL
- ["val2"]=>
- string(2) "CC"
- }
-}
-===DONE===
diff --git a/ext/pdo_mysql/tests/pdo_006.phpt b/ext/pdo_mysql/tests/pdo_006.phpt
deleted file mode 100755
index 06da90a71d..0000000000
--- a/ext/pdo_mysql/tests/pdo_006.phpt
+++ /dev/null
@@ -1,64 +0,0 @@
---TEST--
-PDO_MySQL: PDO_FETCH_GROUP
---SKIPIF--
-<?php # vim:ft=php
-require_once('skipif.inc'); ?>
---FILE--
-<?php
-
-require_once('connection.inc');
-require_once('prepare.inc');
-
-require_once($PDO_TESTS . 'pdo_006.inc');
-
-?>
-===DONE===
-<?php exit(0); ?>
---EXPECTF--
-array(2) {
- ["A"]=>
- array(2) {
- [0]=>
- array(1) {
- [0]=>
- string(1) "1"
- }
- [1]=>
- array(1) {
- [0]=>
- string(1) "2"
- }
- }
- ["C"]=>
- array(1) {
- [0]=>
- array(1) {
- [0]=>
- string(1) "3"
- }
- }
-}
-array(2) {
- ["A"]=>
- array(2) {
- [0]=>
- array(1) {
- ["id"]=>
- string(1) "1"
- }
- [1]=>
- array(1) {
- ["id"]=>
- string(1) "2"
- }
- }
- ["C"]=>
- array(1) {
- [0]=>
- array(1) {
- ["id"]=>
- string(1) "3"
- }
- }
-}
-===DONE===
diff --git a/ext/pdo_mysql/tests/pdo_007.phpt b/ext/pdo_mysql/tests/pdo_007.phpt
deleted file mode 100755
index 0fb9fb0489..0000000000
--- a/ext/pdo_mysql/tests/pdo_007.phpt
+++ /dev/null
@@ -1,52 +0,0 @@
---TEST--
-PDO_MySQL: PDO_FETCH_UNIQUE
---SKIPIF--
-<?php # vim:ft=php
-require_once('skipif.inc'); ?>
---FILE--
-<?php
-
-require_once('connection.inc');
-require_once('prepare.inc');
-
-require_once($PDO_TESTS . 'pdo_007.inc');
-
-?>
-===DONE===
-<?php exit(0); ?>
---EXPECTF--
-array(3) {
- ["A"]=>
- array(1) {
- [0]=>
- string(1) "A"
- }
- ["B"]=>
- array(1) {
- [0]=>
- string(1) "A"
- }
- ["C"]=>
- array(1) {
- [0]=>
- string(1) "C"
- }
-}
-array(3) {
- ["A"]=>
- array(1) {
- ["val"]=>
- string(1) "A"
- }
- ["B"]=>
- array(1) {
- ["val"]=>
- string(1) "A"
- }
- ["C"]=>
- array(1) {
- ["val"]=>
- string(1) "C"
- }
-}
-===DONE===
diff --git a/ext/pdo_mysql/tests/pdo_008.phpt b/ext/pdo_mysql/tests/pdo_008.phpt
deleted file mode 100755
index e185b2399d..0000000000
--- a/ext/pdo_mysql/tests/pdo_008.phpt
+++ /dev/null
@@ -1,30 +0,0 @@
---TEST--
-PDO_MySQL: PDO_FETCH_UNIQUE conflict
---SKIPIF--
-<?php # vim:ft=php
-require_once('skipif.inc'); ?>
---FILE--
-<?php
-
-require_once('connection.inc');
-require_once('prepare.inc');
-
-require_once($PDO_TESTS . 'pdo_008.inc');
-
-?>
-===DONE===
-<?php exit(0); ?>
---EXPECTF--
-array(2) {
- ["A"]=>
- array(1) {
- [0]=>
- string(1) "B"
- }
- ["C"]=>
- array(1) {
- [0]=>
- string(1) "C"
- }
-}
-===DONE===
diff --git a/ext/pdo_mysql/tests/pdo_009.phpt b/ext/pdo_mysql/tests/pdo_009.phpt
deleted file mode 100755
index 39ac93d178..0000000000
--- a/ext/pdo_mysql/tests/pdo_009.phpt
+++ /dev/null
@@ -1,89 +0,0 @@
---TEST--
-PDO_MySQL: PDO_FETCH_CLASSTYPE
---SKIPIF--
-<?php # vim:ft=php
-require_once('skipif.inc'); ?>
---FILE--
-<?php
-
-require_once('connection.inc');
-require_once('prepare.inc');
-
-require_once($PDO_TESTS . 'pdo_009.inc');
-
-?>
-===DONE===
-<?php exit(0); ?>
---EXPECTF--
-array(4) {
- [0]=>
- array(3) {
- [0]=>
- string(8) "stdClass"
- [1]=>
- string(1) "1"
- [2]=>
- string(1) "A"
- }
- [1]=>
- array(3) {
- [0]=>
- string(5) "Test1"
- [1]=>
- string(1) "2"
- [2]=>
- string(1) "B"
- }
- [2]=>
- array(3) {
- [0]=>
- string(5) "Test2"
- [1]=>
- string(1) "3"
- [2]=>
- string(1) "C"
- }
- [3]=>
- array(3) {
- [0]=>
- NULL
- [1]=>
- string(1) "4"
- [2]=>
- string(1) "D"
- }
-}
-Test1::__construct()
-Test2::__construct()
-Test3::__construct()
-array(4) {
- [0]=>
- object(stdClass)#%d (2) {
- ["id"]=>
- string(1) "1"
- ["val"]=>
- string(1) "A"
- }
- [1]=>
- object(Test1)#%d (2) {
- ["id"]=>
- string(1) "2"
- ["val"]=>
- string(1) "B"
- }
- [2]=>
- object(Test2)#%d (2) {
- ["id"]=>
- string(1) "3"
- ["val"]=>
- string(1) "C"
- }
- [3]=>
- object(Test3)#%d (2) {
- ["id"]=>
- string(1) "4"
- ["val"]=>
- string(1) "D"
- }
-}
-===DONE===
diff --git a/ext/pdo_mysql/tests/pdo_010.phpt b/ext/pdo_mysql/tests/pdo_010.phpt
deleted file mode 100755
index 606a5e8b0c..0000000000
--- a/ext/pdo_mysql/tests/pdo_010.phpt
+++ /dev/null
@@ -1,76 +0,0 @@
---TEST--
-PDO_MySQL: PDO_FETCH_(CLASSTYPE and GROUP/UNIQUE)
---SKIPIF--
-<?php # vim:ft=php
-require_once('skipif.inc'); ?>
---FILE--
-<?php
-
-require_once('connection.inc');
-require_once('prepare.inc');
-
-require_once($PDO_TESTS . 'pdo_010.inc');
-
-?>
-===DONE===
-<?php exit(0); ?>
---EXPECTF--
-Test1::__construct()
-Test2::__construct()
-Test3::__construct()
-array(2) {
- ["Group1"]=>
- array(2) {
- [0]=>
- object(stdClass)#%d (2) {
- ["id"]=>
- string(1) "1"
- ["val"]=>
- string(1) "A"
- }
- [1]=>
- object(Test1)#%d (2) {
- ["id"]=>
- string(1) "2"
- ["val"]=>
- string(1) "B"
- }
- }
- ["Group2"]=>
- array(2) {
- [0]=>
- object(Test2)#%d (2) {
- ["id"]=>
- string(1) "3"
- ["val"]=>
- string(1) "C"
- }
- [1]=>
- object(Test3)#%d (2) {
- ["id"]=>
- string(1) "4"
- ["val"]=>
- string(1) "D"
- }
- }
-}
-Test1::__construct()
-Test2::__construct()
-Test3::__construct()
-array(2) {
- ["Group1"]=>
- object(Test1)#%d (2) {
- ["id"]=>
- string(1) "2"
- ["val"]=>
- string(1) "B"
- }
- ["Group2"]=>
- object(Test3)#%d (2) {
- ["id"]=>
- string(1) "4"
- ["val"]=>
- string(1) "D"
- }
-}
-===DONE===
diff --git a/ext/pdo_mysql/tests/pdo_011.phpt b/ext/pdo_mysql/tests/pdo_011.phpt
deleted file mode 100755
index 667dc48d9e..0000000000
--- a/ext/pdo_mysql/tests/pdo_011.phpt
+++ /dev/null
@@ -1,181 +0,0 @@
---TEST--
-PDO_MySQL: PDO_FETCH_FUNC and statement overloading
---SKIPIF--
-<?php # vim:ft=php
-require_once('skipif.inc'); ?>
---FILE--
-<?php
-
-require_once('connection.inc');
-require_once('prepare.inc');
-
-require_once($PDO_TESTS . 'pdo_011.inc');
-
-?>
-===DONE===
-<?php exit(0); ?>
---EXPECTF--
-Test1::__construct(0,0)
-test(1,N/A)
-test(2,N/A)
-test(3,N/A)
-test(4,N/A)
-array(2) {
- ["Group1"]=>
- array(2) {
- [0]=>
- array(1) {
- [1]=>
- string(3) "N/A"
- }
- [1]=>
- array(1) {
- [2]=>
- string(3) "N/A"
- }
- }
- ["Group2"]=>
- array(2) {
- [0]=>
- array(1) {
- [3]=>
- string(3) "N/A"
- }
- [1]=>
- array(1) {
- [4]=>
- string(3) "N/A"
- }
- }
-}
-test(1,A)
-test(2,B)
-test(3,C)
-test(4,D)
-array(4) {
- [0]=>
- array(1) {
- [1]=>
- string(1) "A"
- }
- [1]=>
- array(1) {
- [2]=>
- string(1) "B"
- }
- [2]=>
- array(1) {
- [3]=>
- string(1) "C"
- }
- [3]=>
- array(1) {
- [4]=>
- string(1) "D"
- }
-}
-Test1::factory(1,A)
-Test1::__construct(1,A)
-Test1::factory(2,B)
-Test1::__construct(2,B)
-Test1::factory(3,C)
-Test1::__construct(3,C)
-Test1::factory(4,D)
-Test1::__construct(4,D)
-array(4) {
- [0]=>
- object(Test1)#%d (2) {
- ["id"]=>
- string(1) "1"
- ["val"]=>
- string(1) "A"
- }
- [1]=>
- object(Test1)#%d (2) {
- ["id"]=>
- string(1) "2"
- ["val"]=>
- string(1) "B"
- }
- [2]=>
- object(Test1)#%d (2) {
- ["id"]=>
- string(1) "3"
- ["val"]=>
- string(1) "C"
- }
- [3]=>
- object(Test1)#%d (2) {
- ["id"]=>
- string(1) "4"
- ["val"]=>
- string(1) "D"
- }
-}
-Test1::factory(1,A)
-Test1::__construct(1,A)
-Test1::factory(2,B)
-Test1::__construct(2,B)
-Test1::factory(3,C)
-Test1::__construct(3,C)
-Test1::factory(4,D)
-Test1::__construct(4,D)
-array(4) {
- [0]=>
- object(Test1)#%d (2) {
- ["id"]=>
- string(1) "1"
- ["val"]=>
- string(1) "A"
- }
- [1]=>
- object(Test1)#%d (2) {
- ["id"]=>
- string(1) "2"
- ["val"]=>
- string(1) "B"
- }
- [2]=>
- object(Test1)#%d (2) {
- ["id"]=>
- string(1) "3"
- ["val"]=>
- string(1) "C"
- }
- [3]=>
- object(Test1)#%d (2) {
- ["id"]=>
- string(1) "4"
- ["val"]=>
- string(1) "D"
- }
-}
-DerivedStatement::__construct(Overloaded)
-string(16) "DerivedStatement"
-DerivedStatement::retrieve(1,A)
-DerivedStatement::retrieve(2,B)
-DerivedStatement::retrieve(3,C)
-DerivedStatement::retrieve(4,D)
-array(4) {
- [0]=>
- array(1) {
- [1]=>
- string(1) "A"
- }
- [1]=>
- array(1) {
- [2]=>
- string(1) "B"
- }
- [2]=>
- array(1) {
- [3]=>
- string(1) "C"
- }
- [3]=>
- array(1) {
- [4]=>
- string(1) "D"
- }
-}
-===DONE===
diff --git a/ext/pdo_mysql/tests/pdo_012.phpt b/ext/pdo_mysql/tests/pdo_012.phpt
deleted file mode 100755
index c238475720..0000000000
--- a/ext/pdo_mysql/tests/pdo_012.phpt
+++ /dev/null
@@ -1,70 +0,0 @@
---TEST--
-PDO_MySQL: PDOStatement::setFetchMode
---SKIPIF--
-<?php # vim:ft=php
-require_once('skipif.inc'); ?>
---FILE--
-<?php
-
-require_once('connection.inc');
-require_once('prepare.inc');
-
-require_once($PDO_TESTS . 'pdo_012.inc');
-
-?>
-===DONE===
-<?php exit(0); ?>
---EXPECTF--
-array(2) {
- [0]=>
- array(2) {
- [0]=>
- string(1) "A"
- [1]=>
- string(6) "Group1"
- }
- [1]=>
- array(2) {
- [0]=>
- string(1) "B"
- [1]=>
- string(6) "Group2"
- }
-}
-Test::__construct(N/A)
-Test::__construct(N/A)
-array(2) {
- [0]=>
- object(Test)#%d (2) {
- ["val"]=>
- string(1) "A"
- ["grp"]=>
- string(6) "Group1"
- }
- [1]=>
- object(Test)#%d (2) {
- ["val"]=>
- string(1) "B"
- ["grp"]=>
- string(6) "Group2"
- }
-}
-Test::__construct(Changed)
-Test::__construct(Changed)
-array(2) {
- [0]=>
- object(Test)#%d (2) {
- ["val"]=>
- string(1) "A"
- ["grp"]=>
- string(6) "Group1"
- }
- [1]=>
- object(Test)#%d (2) {
- ["val"]=>
- string(1) "B"
- ["grp"]=>
- string(6) "Group2"
- }
-}
-===DONE===
diff --git a/ext/pdo_mysql/tests/pdo_013.phpt b/ext/pdo_mysql/tests/pdo_013.phpt
deleted file mode 100755
index 0d2f8bd39e..0000000000
--- a/ext/pdo_mysql/tests/pdo_013.phpt
+++ /dev/null
@@ -1,58 +0,0 @@
---TEST--
-PDO_MySQL: PDOStatement is Traversable
---SKIPIF--
-<?php # vim:ft=php
-require_once('skipif.inc'); ?>
---FILE--
-<?php
-
-require_once('connection.inc');
-require_once('prepare.inc');
-
-require_once($PDO_TESTS . 'pdo_013.inc');
-
-?>
-===DONE===
-<?php exit(0); ?>
---EXPECTF--
-array(2) {
- [0]=>
- string(1) "A"
- [1]=>
- string(6) "Group1"
-}
-array(2) {
- [0]=>
- string(1) "B"
- [1]=>
- string(6) "Group2"
-}
-Test::__construct(N/A)
-object(Test)#%d (2) {
- ["val"]=>
- string(1) "A"
- ["grp"]=>
- string(6) "Group1"
-}
-Test::__construct(N/A)
-object(Test)#%d (2) {
- ["val"]=>
- string(1) "B"
- ["grp"]=>
- string(6) "Group2"
-}
-Test::__construct(WOW)
-object(Test)#%d (2) {
- ["val"]=>
- string(1) "A"
- ["grp"]=>
- string(6) "Group1"
-}
-Test::__construct(WOW)
-object(Test)#%d (2) {
- ["val"]=>
- string(1) "B"
- ["grp"]=>
- string(6) "Group2"
-}
-===DONE===
diff --git a/ext/pdo_mysql/tests/pdo_014.phpt b/ext/pdo_mysql/tests/pdo_014.phpt
deleted file mode 100755
index a702c93e7d..0000000000
--- a/ext/pdo_mysql/tests/pdo_014.phpt
+++ /dev/null
@@ -1,51 +0,0 @@
---TEST--
-PDO_MySQL: PDOStatement and SPL Iterators
---SKIPIF--
-<?php # vim:ft=php
-require_once('skipif.inc');
-if (!extension_loaded('SPL')) die('skip SPL not available');
-if (!class_exists('IteratorIterator')) die ('skip Class IteratorIterator does not exist');
-?>
---FILE--
-<?php
-
-require_once('connection.inc');
-require_once('prepare.inc');
-
-require_once($PDO_TESTS . 'pdo_014.inc');
-
-?>
-===DONE===
-<?php exit(0); ?>
---EXPECTF--
-Test::__construct(WOW)
-object(Test)#4 (2) {
- ["val"]=>
- string(1) "A"
- ["grp"]=>
- string(6) "Group1"
-}
-Test::__construct(WOW)
-object(Test)#6 (2) {
- ["val"]=>
- string(1) "B"
- ["grp"]=>
- string(6) "Group2"
-}
-NULL
-bool(false)
-PDOStatementAggregate::__construct
-PDOStatementAggregate::getIterator
-array(2) {
- [0]=>
- string(1) "A"
- [1]=>
- string(6) "Group1"
-}
-array(2) {
- [0]=>
- string(1) "B"
- [1]=>
- string(6) "Group2"
-}
-===DONE===
diff --git a/ext/pdo_mysql/tests/pdo_015.phpt b/ext/pdo_mysql/tests/pdo_015.phpt
deleted file mode 100755
index a7974b51b9..0000000000
--- a/ext/pdo_mysql/tests/pdo_015.phpt
+++ /dev/null
@@ -1,76 +0,0 @@
---TEST--
-PDO_MySQL: PDO_FETCH_COLUMN
---SKIPIF--
-<?php # vim:ft=php
-require_once('skipif.inc');
-?>
---FILE--
-<?php
-
-require_once('connection.inc');
-require_once('prepare.inc');
-
-require_once($PDO_TESTS . 'pdo_015.inc');
-
-?>
-===DONE===
-<?php exit(0); ?>
---EXPECTF--
-array(2) {
- [0]=>
- string(1) "1"
- [1]=>
- string(1) "2"
-}
-array(2) {
- [0]=>
- string(2) "A2"
- [1]=>
- string(2) "B2"
-}
-array(2) {
- [1]=>
- array(1) {
- [0]=>
- string(1) "A"
- }
- [2]=>
- array(1) {
- [0]=>
- string(1) "A"
- }
-}
-array(2) {
- [1]=>
- string(1) "A"
- [2]=>
- string(1) "A"
-}
-array(2) {
- [1]=>
- string(1) "1"
- [2]=>
- string(1) "2"
-}
-array(2) {
- [1]=>
- string(1) "A"
- [2]=>
- string(1) "A"
-}
-array(2) {
- [1]=>
- string(2) "A2"
- [2]=>
- string(2) "B2"
-}
-array(1) {
- ["A"]=>
- array(2) {
- [0]=>
- string(2) "A2"
- [1]=>
- string(2) "B2"
- }
-}
-===DONE===
diff --git a/ext/pdo_mysql/tests/pdo_016.phpt b/ext/pdo_mysql/tests/pdo_016.phpt
deleted file mode 100755
index 1be753f306..0000000000
--- a/ext/pdo_mysql/tests/pdo_016.phpt
+++ /dev/null
@@ -1,117 +0,0 @@
---TEST--
-PDO_MySQL: PDO_FETCH_BOUND
---SKIPIF--
-<?php # vim:ft=php
-require_once('skipif.inc');
-?>
---FILE--
-<?php
-
-require_once('connection.inc');
-require_once('prepare.inc');
-
-require_once($PDO_TESTS . 'pdo_016.inc');
-
-?>
-===DONE===
-<?php exit(0); ?>
---EXPECTF--
-===INIT===
-int(1)
-int(1)
-int(1)
-string(1) "3"
-array(3) {
- [0]=>
- string(7) "String0"
- [1]=>
- string(7) "String1"
- [2]=>
- string(7) "String2"
-}
-===WHILE===
-array(1) {
- [0]=>
- string(7) "String0"
-}
-array(1) {
- [1]=>
- string(7) "String1"
-}
-array(1) {
- [2]=>
- string(7) "String2"
-}
-===ALONE===
-array(1) {
- [0]=>
- string(7) "String0"
-}
-bool(true)
-bool(true)
-bool(true)
-bool(true)
-array(1) {
- [0]=>
- string(7) "String0"
-}
-array(1) {
- [1]=>
- string(7) "String1"
-}
-bool(true)
-bool(true)
-bool(true)
-bool(true)
-array(1) {
- [1]=>
- string(7) "String1"
-}
-array(1) {
- [2]=>
- string(7) "String2"
-}
-bool(true)
-bool(true)
-bool(true)
-bool(true)
-array(1) {
- [2]=>
- string(7) "String2"
-}
-===REBIND/SAME===
-array(1) {
- [0]=>
- string(7) "String0"
-}
-bool(true)
-bool(true)
-string(7) "String0"
-bool(true)
-bool(true)
-string(1) "0"
-array(1) {
- [1]=>
- string(7) "String1"
-}
-bool(true)
-bool(true)
-string(7) "String1"
-bool(true)
-bool(true)
-string(1) "1"
-array(1) {
- [2]=>
- string(7) "String2"
-}
-bool(true)
-bool(true)
-string(7) "String2"
-bool(true)
-bool(true)
-string(1) "2"
-===REBIND/CONFLICT===
-string(7) "String0"
-string(7) "String1"
-string(7) "String2"
-===DONE===
diff --git a/ext/pdo_mysql/tests/pdo_017.phpt b/ext/pdo_mysql/tests/pdo_017.phpt
deleted file mode 100755
index 0f3275bd4d..0000000000
--- a/ext/pdo_mysql/tests/pdo_017.phpt
+++ /dev/null
@@ -1,22 +0,0 @@
---TEST--
-PDO_MySQL: PDO::beginTransaction / PDO::rollBack
---SKIPIF--
-<?php # vim:ft=php
-require_once('skipif.inc');
-?>
---FILE--
-<?php
-
-require_once('connection.inc');
-require_once('prepare.inc');
-
-require_once($PDO_TESTS . 'pdo_017.inc');
-
-?>
-===DONE===
-<?php exit(0); ?>
---EXPECT--
-Counted 3 rows after insert.
-Counted 0 rows after delete.
-Counted 3 rows after rollback.
-===DONE===
diff --git a/ext/pdo_mysql/tests/pdo_018.phpt b/ext/pdo_mysql/tests/pdo_018.phpt
deleted file mode 100755
index cff3ad8726..0000000000
--- a/ext/pdo_mysql/tests/pdo_018.phpt
+++ /dev/null
@@ -1,136 +0,0 @@
---TEST--
-PDO_MySQL: PDO Unserializing
---SKIPIF--
-<?php # vim:ft=php
-require_once('skipif.inc');
-if (!interface_exists('Serializable')) die ('skip Interface Serializable does not exist');
-?>
---FILE--
-<?php
-
-require_once('connection.inc');
-require_once('prepare.inc');
-
-require_once($PDO_TESTS . 'pdo_018.inc');
-
-?>
-===DONE===
-<?php exit(0); ?>
---EXPECTF--
-===INIT===
-int(1)
-int(1)
-int(1)
-string(1) "3"
-array(3) {
- [0]=>
- string(8) "stdClass"
- [1]=>
- string(8) "TestBase"
- [2]=>
- string(11) "TestDerived"
-}
-===TYPES===
-array(4) {
- ["stdClass"]=>
- string(1) "0"
- ["TestBase"]=>
- string(1) "1"
- ["TestDerived"]=>
- string(1) "2"
- ["TestLeaf"]=>
- NULL
-}
-===INSERT===
-TestBase::serialize() = 'a:3:{s:7:"BasePub";s:6:"Public";s:7:"BasePro";s:9:"Protected";s:7:"BasePri";s:7:"Private";}'
-TestDerived::serialize()
-TestBase::serialize() = 'a:4:{s:7:"BasePub";s:13:"DerivedPublic";s:7:"BasePro";s:16:"DerivdeProtected";s:10:"DerivedPub";s:6:"Public";s:10:"DerivedPro";s:9:"Protected";}'
-TestDerived::serialize()
-TestBase::serialize() = 'a:4:{s:7:"BasePub";s:13:"DerivedPublic";s:7:"BasePro";s:16:"DerivdeProtected";s:10:"DerivedPub";s:6:"Public";s:10:"DerivedPro";s:9:"Protected";}'
-===DATA===
-array(4) {
- [0]=>
- NULL
- [1]=>
- string(91) "a:3:{s:7:"BasePub";s:6:"Public";s:7:"BasePro";s:9:"Protected";s:7:"BasePri";s:7:"Private";}"
- [2]=>
- string(144) "a:4:{s:7:"BasePub";s:13:"DerivedPublic";s:7:"BasePro";s:16:"DerivdeProtected";s:10:"DerivedPub";s:6:"Public";s:10:"DerivedPro";s:9:"Protected";}"
- [3]=>
- string(144) "a:4:{s:7:"BasePub";s:13:"DerivedPublic";s:7:"BasePro";s:16:"DerivdeProtected";s:10:"DerivedPub";s:6:"Public";s:10:"DerivedPro";s:9:"Protected";}"
-}
-===FAILURE===
-Exception:SQLSTATE[HY000]: General error: cannot unserialize class
-===COUNT===
-string(1) "3"
-===DATABASE===
-array(3) {
- [0]=>
- array(2) {
- ["name"]=>
- string(8) "TestBase"
- ["val"]=>
- string(91) "a:3:{s:7:"BasePub";s:6:"Public";s:7:"BasePro";s:9:"Protected";s:7:"BasePri";s:7:"Private";}"
- }
- [1]=>
- array(2) {
- ["name"]=>
- string(11) "TestDerived"
- ["val"]=>
- string(144) "a:4:{s:7:"BasePub";s:13:"DerivedPublic";s:7:"BasePro";s:16:"DerivdeProtected";s:10:"DerivedPub";s:6:"Public";s:10:"DerivedPro";s:9:"Protected";}"
- }
- [2]=>
- array(2) {
- ["name"]=>
- NULL
- ["val"]=>
- string(144) "a:4:{s:7:"BasePub";s:13:"DerivedPublic";s:7:"BasePro";s:16:"DerivdeProtected";s:10:"DerivedPub";s:6:"Public";s:10:"DerivedPro";s:9:"Protected";}"
- }
-}
-===FETCHCLASS===
-TestBase::unserialize[22](a:3:{s:7:"BasePub";s:6:"Public";s:7:"BasePro";s:9:"Protected";s:7:"BasePri";s:7:"Private";})
-TestDerived::unserialize()
-TestBase::unserialize[22](a:4:{s:7:"BasePub";s:13:"DerivedPublic";s:7:"BasePro";s:16:"DerivdeProtected";s:10:"DerivedPub";s:6:"Public";s:10:"DerivedPro";s:9:"Protected";})
-TestDerived::unserialize()
-TestBase::unserialize[22](a:4:{s:7:"BasePub";s:13:"DerivedPublic";s:7:"BasePro";s:16:"DerivdeProtected";s:10:"DerivedPub";s:6:"Public";s:10:"DerivedPro";s:9:"Protected";})
-array(3) {
- [0]=>
- object(TestBase)#%d (3) {
- ["BasePub"]=>
- string(7) "#Public"
- ["BasePro:protected"]=>
- string(10) "#Protected"
- ["BasePri:private"]=>
- string(8) "#Private"
- }
- [1]=>
- object(TestDerived)#%d (6) {
- ["BasePub"]=>
- string(14) "#DerivedPublic"
- ["BasePro:protected"]=>
- string(17) "#DerivdeProtected"
- ["DerivedPub"]=>
- string(7) "#Public"
- ["DerivedPro:protected"]=>
- string(10) "#Protected"
- ["DerivedPri:private"]=>
- string(7) "Private"
- ["BasePri:private"]=>
- string(7) "Private"
- }
- [2]=>
- object(TestLeaf)#%d (6) {
- ["BasePub"]=>
- string(14) "#DerivedPublic"
- ["BasePro:protected"]=>
- string(17) "#DerivdeProtected"
- ["DerivedPub"]=>
- string(7) "#Public"
- ["DerivedPro:protected"]=>
- string(10) "#Protected"
- ["DerivedPri:private"]=>
- string(7) "Private"
- ["BasePri:private"]=>
- string(7) "Private"
- }
-}
-===DONE===
diff --git a/ext/pdo_mysql/tests/pdo_019.phpt b/ext/pdo_mysql/tests/pdo_019.phpt
deleted file mode 100755
index 3b5f43984e..0000000000
--- a/ext/pdo_mysql/tests/pdo_019.phpt
+++ /dev/null
@@ -1,52 +0,0 @@
---TEST--
-PDO_MySQL: fetch() and while()
---SKIPIF--
-<?php # vim:ft=php
-require_once('skipif.inc');
-?>
---FILE--
-<?php
-
-require_once('connection.inc');
-require_once('prepare.inc');
-
-require_once($PDO_TESTS . 'pdo_019.inc');
-
-?>
-===DONE===
-<?php exit(0); ?>
---EXPECTF--
-===INIT===
-int(1)
-int(1)
-int(1)
-int(1)
-string(1) "4"
-array(4) {
- [0]=>
- string(7) "String0"
- [1]=>
- string(7) "String1"
- [2]=>
- string(7) "String2"
- [3]=>
- string(7) "String3"
-}
-===WHILE===
-array(1) {
- [0]=>
- string(7) "String0"
-}
-array(1) {
- [1]=>
- string(7) "String1"
-}
-array(1) {
- [2]=>
- string(7) "String2"
-}
-array(1) {
- [3]=>
- string(7) "String3"
-}
-===DONE===
diff --git a/ext/pdo_mysql/tests/pdo_020.phpt b/ext/pdo_mysql/tests/pdo_020.phpt
deleted file mode 100755
index 7c33a99f42..0000000000
--- a/ext/pdo_mysql/tests/pdo_020.phpt
+++ /dev/null
@@ -1,21 +0,0 @@
---TEST--
-PDO_MySQL: PDOStatement::columnCount
---SKIPIF--
-<?php # vim:ft=php
-require_once('skipif.inc'); ?>
---FILE--
-<?php
-
-require_once('connection.inc');
-require_once('prepare.inc');
-
-require_once($PDO_TESTS . 'pdo_020.inc');
-
-?>
-===DONE===
-<?php exit(0); ?>
---EXPECT--
-Counted 2 columns after select1.
-Counted 3 columns after select2.
-Counted 1 columns after select3.
-===DONE===
diff --git a/ext/pdo_mysql/tests/pdo_023.phpt b/ext/pdo_mysql/tests/pdo_023.phpt
deleted file mode 100755
index ba43758a3e..0000000000
--- a/ext/pdo_mysql/tests/pdo_023.phpt
+++ /dev/null
@@ -1,60 +0,0 @@
---TEST--
-PDO_MySQL: Overloading
---SKIPIF--
-<?php # vim:ft=php
-require_once('skipif.inc'); ?>
---FILE--
-<?php
-
-require_once('connection.inc');
-require_once('prepare.inc');
-
-require_once($PDO_TESTS . 'pdo_023_def.inc');
-
-$DB = NULL;
-
-$DB = new PDODatabaseX($CONNECTION);
-$DB->setAttribute(PDO_ATTR_ERRMODE, PDO_ERRMODE_WARNING);
-
-require_once($PDO_TESTS . 'pdo_023.inc');
-
-?>
-===DONE===
-<?php exit(0); ?>
---EXPECTF--
-int(1)
-int(2)
-object(PDODatabaseX)#%d (2) {
- ["test1"]=>
- int(1)
- ["test2"]=>
- int(22)
-}
-PDODatabaseX::query()
-PDOStatementX::__construct()
-PDOStatementX::__destruct()
-PDODatabaseX::query()
-PDOStatementX::__construct()
-PDOStatementX::__destruct()
-PDODatabaseX::query()
-PDOStatementX::__construct()
-PDOStatementX::__destruct()
-PDODatabaseX::query()
-PDOStatementX::__construct()
-object(PDOStatementX)#%d (3) {
- ["test1"]=>
- int(1)
- ["queryString"]=>
- string(24) "SELECT val, id FROM test"
- ["test2"]=>
- int(22)
-}
-array(2) {
- ["A"]=>
- string(1) "0"
- ["B"]=>
- string(1) "1"
-}
-PDOStatementX::__destruct()
-PDODatabaseX::__destruct()
-===DONE===
diff --git a/ext/pdo_mysql/tests/pdo_024.phpt b/ext/pdo_mysql/tests/pdo_024.phpt
deleted file mode 100755
index bf14896fcc..0000000000
--- a/ext/pdo_mysql/tests/pdo_024.phpt
+++ /dev/null
@@ -1,21 +0,0 @@
---TEST--
-PDO_MySQL: Bind does not convert NULL
---SKIPIF--
-<?php # vim:ft=php
-require_once('skipif.inc'); ?>
---FILE--
-<?php
-
-require_once('connection.inc');
-require_once('prepare.inc');
-
-require_once($PDO_TESTS . 'pdo_024.inc');
-
-?>
-===DONE===
-<?php exit(0); ?>
---EXPECTF--
-bind: success
-bool(true)
-NULL
-===DONE===
diff --git a/ext/pdo_mysql/tests/pdo_025.phpt b/ext/pdo_mysql/tests/pdo_025.phpt
deleted file mode 100755
index 371dc7e9b6..0000000000
--- a/ext/pdo_mysql/tests/pdo_025.phpt
+++ /dev/null
@@ -1,68 +0,0 @@
---TEST--
-PDO_MySQL: PDO_FETCH_INTO
---SKIPIF--
-<?php # vim:ft=php
-require_once('skipif.inc'); ?>
---FILE--
-<?php
-
-require_once('connection.inc');
-require_once('prepare.inc');
-
-require_once($PDO_TESTS . 'pdo_025.inc');
-
-?>
-===DONE===
-<?php exit(0); ?>
---EXPECTF--
-object(Test)#%d (3) {
- ["id"]=>
- string(2) "10"
- ["val"]=>
- string(3) "Abc"
- ["val2"]=>
- string(3) "zxy"
-}
-object(Test)#%d (3) {
- ["id"]=>
- string(2) "20"
- ["val"]=>
- string(3) "Def"
- ["val2"]=>
- string(3) "wvu"
-}
-object(Test)#%d (3) {
- ["id"]=>
- string(2) "30"
- ["val"]=>
- string(3) "Ghi"
- ["val2"]=>
- string(3) "tsr"
-}
-object(Test)#%d (3) {
- ["id"]=>
- string(2) "40"
- ["val"]=>
- string(3) "Jkl"
- ["val2"]=>
- string(3) "qpo"
-}
-object(Test)#%d (3) {
- ["id"]=>
- string(2) "50"
- ["val"]=>
- string(3) "Mno"
- ["val2"]=>
- string(3) "nml"
-}
-object(Test)#%d (3) {
- ["id"]=>
- string(2) "60"
- ["val"]=>
- string(3) "Pqr"
- ["val2"]=>
- string(3) "kji"
-}
-===FAIL===
-
-Fatal error: Cannot access protected property Fail::$id in %spdo_025.inc on line %d
diff --git a/ext/pdo_mysql/tests/pdo_026.phpt b/ext/pdo_mysql/tests/pdo_026.phpt
deleted file mode 100755
index 7e061d8671..0000000000
--- a/ext/pdo_mysql/tests/pdo_026.phpt
+++ /dev/null
@@ -1,50 +0,0 @@
---TEST--
-PDO_MySQL: Deriving PDO
---SKIPIF--
-<?php # vim:ft=php
-require_once('skipif.inc'); ?>
---FILE--
-<?php
-
-require_once('connection.inc');
-require_once('prepare.inc');
-
-require_once($PDO_TESTS . 'pdo_026.inc');
-
-?>
-===DONE===
-<?php exit(0); ?>
---EXPECT--
-string(11) "PDODatabase"
-string(12) "PDOStatement"
-PDODatabase::query()
-PDOStatementX::__construct()
-string(13) "PDOStatementX"
-string(11) "PDODatabase"
-array(3) {
- ["id"]=>
- string(2) "10"
- ["val"]=>
- string(3) "Abc"
- ["val2"]=>
- string(3) "zxy"
-}
-array(3) {
- ["id"]=>
- string(2) "20"
- ["val"]=>
- string(3) "Def"
- ["val2"]=>
- string(3) "wvu"
-}
-array(3) {
- ["id"]=>
- string(2) "30"
- ["val"]=>
- string(3) "Ghi"
- ["val2"]=>
- string(3) "tsr"
-}
-===DONE===
-PDODatabase::__destruct()
-PDOStatementX::__destruct()
diff --git a/ext/pdo_mysql/tests/prepare.inc b/ext/pdo_mysql/tests/prepare.inc
deleted file mode 100755
index 7bda793609..0000000000
--- a/ext/pdo_mysql/tests/prepare.inc
+++ /dev/null
@@ -1,16 +0,0 @@
-<?php
-
-require_once('connection.inc');
-
-$SQL = array();
-
-$DB = new pdo($CONNECTION, $USER, $PASSWD);
-
-foreach(array('test','classtypes') as $name)
-{
- $DB->query('DROP TABLE IF EXISTS '.$name);
-}
-
-$DB->setAttribute(PDO_ATTR_ERRMODE, PDO_ERRMODE_WARNING);
-
-?>
diff --git a/ext/pdo_mysql/tests/skipif.inc b/ext/pdo_mysql/tests/skipif.inc
deleted file mode 100755
index 70b66601a1..0000000000
--- a/ext/pdo_mysql/tests/skipif.inc
+++ /dev/null
@@ -1,12 +0,0 @@
-<?php
-
-if (!extension_loaded('pdo_mysql')) die('skip');
-
-require_once('connection.inc');
-require_once('prepare.inc');
-
-if (!$DB) {
- die('skip cannot open db');
-}
-
-?>