summaryrefslogtreecommitdiff
path: root/ext/pdo_mysql
diff options
context:
space:
mode:
authorMark A. Hershberger <mah@debian.(none)>2009-03-25 00:35:13 -0400
committerMark A. Hershberger <mah@debian.(none)>2009-03-25 00:35:13 -0400
commit0a36161e13484a99ccf69bb38f206462d27cc6d6 (patch)
treed5107db4b7369603ac7c753829e8972ee74949f7 /ext/pdo_mysql
parentce7edc9b3c7370f32fec0bc7a8ec3e29ed9a5f61 (diff)
downloadphp-0a36161e13484a99ccf69bb38f206462d27cc6d6.tar.gz
Imported Upstream version 5.1.2upstream/5.1.2
Diffstat (limited to 'ext/pdo_mysql')
-rwxr-xr-xext/pdo_mysql/config.m418
-rwxr-xr-xext/pdo_mysql/mysql_driver.c10
-rwxr-xr-xext/pdo_mysql/mysql_statement.c21
-rw-r--r--ext/pdo_mysql/package.xml67
-rw-r--r--ext/pdo_mysql/package2.xml85
-rwxr-xr-xext/pdo_mysql/pdo_mysql.c12
-rwxr-xr-xext/pdo_mysql/php_pdo_mysql.h8
-rwxr-xr-xext/pdo_mysql/php_pdo_mysql_int.h8
8 files changed, 130 insertions, 99 deletions
diff --git a/ext/pdo_mysql/config.m4 b/ext/pdo_mysql/config.m4
index 1cfa766d0..b6d9ab8bb 100755
--- a/ext/pdo_mysql/config.m4
+++ b/ext/pdo_mysql/config.m4
@@ -1,5 +1,5 @@
dnl
-dnl $Id: config.m4,v 1.25.2.4 2005/11/25 17:07:49 wez Exp $
+dnl $Id: config.m4,v 1.25.2.6 2005/12/04 18:33:26 wez Exp $
dnl
if test "$PHP_PDO" != "no"; then
@@ -33,7 +33,7 @@ if test "$PHP_PDO_MYSQL" != "no"; then
fi
else
AC_MSG_RESULT([$PHP_PDO_MYSQL is not a directory])
- AC_MSG_ERROR([can't find mysql under the "$PHP_PDO_MYSQL" that you specified])
+ AC_MSG_ERROR([can not find mysql under the "$PHP_PDO_MYSQL" that you specified])
fi
else
for i in /usr/local /usr ; do
@@ -50,10 +50,12 @@ if test "$PHP_PDO_MYSQL" != "no"; then
if test -n "$PDO_MYSQL_CONFIG" && test -x "$PDO_MYSQL_CONFIG" ; then
AC_MSG_RESULT($PDO_MYSQL_CONFIG)
- PDO_MYSQL_INCLUDE=`$PDO_MYSQL_CONFIG --cflags`
- PDO_MYSQL_LIBS=`$PDO_MYSQL_CONFIG --libs`
- PDO_MYSQL_SOCKET=`$PDO_MYSQL_CONFIG --socket`
- PHP_SUBST_OLD(PDO_MYSQL_LIBS)
+ if test "x$SED" = "x"; then
+ AC_PATH_PROG(SED, sed)
+ fi
+ PDO_MYSQL_INCLUDE=`$PDO_MYSQL_CONFIG --cflags | $SED -e "s/'//g"`
+ PDO_MYSQL_LIBS=`$PDO_MYSQL_CONFIG --libs | $SED -e "s/'//g"`
+ PDO_MYSQL_SOCKET=`$PDO_MYSQL_CONFIG --socket`
elif test -z "$PDO_MYSQL_DIR"; then
AC_MSG_RESULT([not found])
AC_MSG_ERROR([Cannot find MySQL header files under $PDO_MYSQL_DIR])
@@ -74,7 +76,7 @@ if test "$PHP_PDO_MYSQL" != "no"; then
if test -r "$PDO_MYSQL_LIB_DIR"; then
AC_MSG_RESULT([libs under $PDO_MYSQL_LIB_DIR; seems promising])
else
- AC_MSG_RESULT([can't find it])
+ AC_MSG_RESULT([can not find it])
AC_MSG_ERROR([Unable to find your mysql installation])
fi
@@ -118,7 +120,7 @@ if test "$PHP_PDO_MYSQL" != "no"; then
PHP_NEW_EXTENSION(pdo_mysql, pdo_mysql.c mysql_driver.c mysql_statement.c, $ext_shared,,-I$pdo_inc_path $PDO_MYSQL_INCLUDE)
ifdef([PHP_ADD_EXTENSION_DEP],
[
- PHP_ADD_EXTENSION_DEP(pdo_mysql, pdo)
+ PHP_ADD_EXTENSION_DEP(pdo_mysql, pdo)
])
PDO_MYSQL_MODULE_TYPE=external
diff --git a/ext/pdo_mysql/mysql_driver.c b/ext/pdo_mysql/mysql_driver.c
index 61f697203..f2ce644b8 100755
--- a/ext/pdo_mysql/mysql_driver.c
+++ b/ext/pdo_mysql/mysql_driver.c
@@ -2,12 +2,12 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2005 The PHP Group |
+ | Copyright (c) 1997-2006 The PHP Group |
+----------------------------------------------------------------------+
- | This source file is subject to version 3.0 of the PHP license, |
+ | This source file is subject to version 3.01 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. |
+ | http://www.php.net/license/3_01.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. |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: mysql_driver.c,v 1.59.2.6 2005/11/25 12:56:04 tony2001 Exp $ */
+/* $Id: mysql_driver.c,v 1.59.2.8 2006/01/01 12:50:11 sniper Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -266,7 +266,7 @@ static int mysql_handle_quoter(pdo_dbh_t *dbh, const char *unquoted, int unquote
pdo_mysql_db_handle *H = (pdo_mysql_db_handle *)dbh->driver_data;
*quoted = safe_emalloc(2, unquotedlen, 3);
*quotedlen = mysql_real_escape_string(H->server, *quoted + 1, unquoted, unquotedlen);
- (*quoted)[0] =(*quoted)[++*quotedlen] = '"';
+ (*quoted)[0] =(*quoted)[++*quotedlen] = '\'';
(*quoted)[++*quotedlen] = '\0';
return 1;
}
diff --git a/ext/pdo_mysql/mysql_statement.c b/ext/pdo_mysql/mysql_statement.c
index 9009a3a74..5218e7b7f 100755
--- a/ext/pdo_mysql/mysql_statement.c
+++ b/ext/pdo_mysql/mysql_statement.c
@@ -2,12 +2,12 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2005 The PHP Group |
+ | Copyright (c) 1997-2006 The PHP Group |
+----------------------------------------------------------------------+
- | This source file is subject to version 3.0 of the PHP license, |
+ | This source file is subject to version 3.01 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. |
+ | http://www.php.net/license/3_01.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. |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: mysql_statement.c,v 1.48.2.7 2005/10/29 02:41:50 wez Exp $ */
+/* $Id: mysql_statement.c,v 1.48.2.10 2006/01/01 12:50:11 sniper Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -42,7 +42,7 @@ static int pdo_mysql_stmt_dtor(pdo_stmt_t *stmt TSRMLS_DC)
S->result = NULL;
}
if (S->einfo.errmsg) {
- efree(S->einfo.errmsg);
+ pefree(S->einfo.errmsg, stmt->dbh->is_persistent);
S->einfo.errmsg = NULL;
}
#if HAVE_MYSQL_STMT_PREPARE
@@ -503,11 +503,22 @@ static char *type_to_name_native(int type)
PDO_MYSQL_NATIVE_TYPE_NAME(FLOAT)
PDO_MYSQL_NATIVE_TYPE_NAME(DOUBLE)
PDO_MYSQL_NATIVE_TYPE_NAME(DECIMAL)
+#ifdef FIELD_TYPE_NEWDECIMAL
+ PDO_MYSQL_NATIVE_TYPE_NAME(NEWDECIMAL)
+#endif
+#ifdef FIELD_TYPE_GEOMETRY
+ PDO_MYSQL_NATIVE_TYPE_NAME(GEOMETRY)
+#endif
PDO_MYSQL_NATIVE_TYPE_NAME(TIMESTAMP)
#ifdef MYSQL_HAS_YEAR
PDO_MYSQL_NATIVE_TYPE_NAME(YEAR)
#endif
+ PDO_MYSQL_NATIVE_TYPE_NAME(SET)
+ PDO_MYSQL_NATIVE_TYPE_NAME(ENUM)
PDO_MYSQL_NATIVE_TYPE_NAME(DATE)
+#ifdef FIELD_TYPE_NEWDATE
+ PDO_MYSQL_NATIVE_TYPE_NAME(NEWDATE)
+#endif
PDO_MYSQL_NATIVE_TYPE_NAME(TIME)
PDO_MYSQL_NATIVE_TYPE_NAME(DATETIME)
PDO_MYSQL_NATIVE_TYPE_NAME(TINY_BLOB)
diff --git a/ext/pdo_mysql/package.xml b/ext/pdo_mysql/package.xml
deleted file mode 100644
index ee53e1ac2..000000000
--- a/ext/pdo_mysql/package.xml
+++ /dev/null
@@ -1,67 +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 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>
- <maintainer>
- <user>wez</user>
- <name>Wez Furlong</name>
- <email>wez@php.net</email>
- <role>lead</role>
- </maintainer>
-
- </maintainers>
- <description>
- This extension provides a MySQL driver for PDO.
- </description>
- <license>PHP</license>
- <release>
- <state>stable</state>
- <version>1.0</version>
- <date>2005-11-26</date>
-
- <notes>
-** Changes **
-- Improved error detection for OPTIMIZE queries
-- Added PDO::MYSQL_ATTR_LOCAL_INFILE, PDO::MYSQL_ATTR_INIT_COMMAND,
- PDO::MYSQL_ATTR_READ_DEFAULT_FILE, PDO::MYSQL_ATTR_READ_DEFAULT_GROUP
-- Improved error reporting when using native prepared statements
-- Fixed PECL Bug #5193: improved bounds checking when calling getColumnMeta()
-- Fixed Bug #34630: improved (emulated) LOB support
-- Fixed Bug #34623: crash when selecting longtext fields
-- Fixed PECL Bug #5802; is_null flag was sticking
-- Fixed PECL Bug #5645; added mysql client library version information to phpinfo() output.
-
-Windows binaries can be found at http://pecl4win.php.net/ext.php/php_pdo_mysql.dll
- </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="1.0"/>
- </deps>
- </release>
-</package>
diff --git a/ext/pdo_mysql/package2.xml b/ext/pdo_mysql/package2.xml
new file mode 100644
index 000000000..fded1712f
--- /dev/null
+++ b/ext/pdo_mysql/package2.xml
@@ -0,0 +1,85 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<package packagerversion="1.4.2" version="2.0" xmlns="http://pear.php.net/dtd/package-2.0" xmlns:tasks="http://pear.php.net/dtd/tasks-1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://pear.php.net/dtd/tasks-1.0
+http://pear.php.net/dtd/tasks-1.0.xsd
+http://pear.php.net/dtd/package-2.0
+http://pear.php.net/dtd/package-2.0.xsd">
+ <name>PDO_MYSQL</name>
+ <channel>pecl.php.net</channel>
+ <summary>MySQL driver for PDO</summary>
+ <description>This extension provides a MySQL driver for PDO.
+ </description>
+ <lead>
+ <name>George Schlossnagle</name>
+ <user>gschlossnagle</user>
+ <email>george@omniti.com</email>
+ <active>yes</active>
+ </lead>
+ <lead>
+ <name>Ilia Alshanetsky</name>
+ <user>iliaa</user>
+ <email>iliaa@php.net</email>
+ <active>yes</active>
+ </lead>
+ <lead>
+ <name>Wez Furlong</name>
+ <user>wez</user>
+ <email>wez@php.net</email>
+ <active>yes</active>
+ </lead>
+ <date>2005-12-04</date>
+ <version>
+ <release>1.0.2</release>
+ <api>1.0.2</api>
+ </version>
+ <stability>
+ <release>stable</release>
+ <api>stable</api>
+ </stability>
+ <license uri="http://www.php.net/license">PHP</license>
+ <notes>
+- Repackage using package2.xml
+- Fixed Bug #35480 and #35415, crash when using persistent connections.
+- Improved error detection for OPTIMIZE queries
+- Added PDO::MYSQL_ATTR_LOCAL_INFILE, PDO::MYSQL_ATTR_INIT_COMMAND,
+ PDO::MYSQL_ATTR_READ_DEFAULT_FILE, PDO::MYSQL_ATTR_READ_DEFAULT_GROUP
+- Improved error reporting when using native prepared statements
+- Fixed PECL Bug #5193: improved bounds checking when calling getColumnMeta()
+- Fixed Bug #34630: improved (emulated) LOB support
+- Fixed Bug #34623: crash when selecting longtext fields
+- Fixed PECL Bug #5802; is_null flag was sticking
+- Fixed PECL Bug #5645; added mysql client library version information to phpinfo() output.
+
+Windows binaries can be found at http://pecl4win.php.net/ext.php/php_pdo_mysql.dll
+
+ </notes>
+ <contents>
+ <dir name="/">
+ <file name="config.m4" role="src" />
+ <file name="CREDITS" role="doc" />
+ <file name="mysql_driver.c" role="src" />
+ <file name="mysql_statement.c" role="src" />
+ <file name="pdo_mysql.c" role="src" />
+ <file name="php_pdo_mysql.h" role="src" />
+ <file name="php_pdo_mysql_int.h" role="src" />
+ <file name="php_pdo_mysql_sqlstate.h" role="src" />
+ </dir> <!-- / -->
+ </contents>
+ <dependencies>
+ <required>
+ <php>
+ <min>5.0.3</min>
+ </php>
+ <pearinstaller>
+ <min>1.4.0</min>
+ </pearinstaller>
+ <package>
+ <name>pdo</name>
+ <channel>pecl.php.net</channel>
+ <min>1.0</min>
+ <providesextension>PDO</providesextension>
+ </package>
+ </required>
+ </dependencies>
+ <providesextension>PDO_MYSQL</providesextension>
+ <extsrcrelease />
+</package>
diff --git a/ext/pdo_mysql/pdo_mysql.c b/ext/pdo_mysql/pdo_mysql.c
index b46a075b7..2f8be1d52 100755
--- a/ext/pdo_mysql/pdo_mysql.c
+++ b/ext/pdo_mysql/pdo_mysql.c
@@ -2,12 +2,12 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2005 The PHP Group |
+ | Copyright (c) 1997-2006 The PHP Group |
+----------------------------------------------------------------------+
- | This source file is subject to version 3.0 of the PHP license, |
+ | This source file is subject to version 3.01 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. |
+ | http://www.php.net/license/3_01.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. |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: pdo_mysql.c,v 1.8.2.8 2005/11/26 20:50:07 wez Exp $ */
+/* $Id: pdo_mysql.c,v 1.8.2.12 2006/01/01 12:50:11 sniper Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -31,7 +31,7 @@
#include "php_pdo_mysql_int.h"
/* {{{ pdo_mysql_functions[] */
-function_entry pdo_mysql_functions[] = {
+zend_function_entry pdo_mysql_functions[] = {
{NULL, NULL, NULL}
};
/* }}} */
@@ -60,7 +60,7 @@ zend_module_entry pdo_mysql_module_entry = {
NULL,
NULL,
PHP_MINFO(pdo_mysql),
- "1.0",
+ "1.0.2",
STANDARD_MODULE_PROPERTIES
};
/* }}} */
diff --git a/ext/pdo_mysql/php_pdo_mysql.h b/ext/pdo_mysql/php_pdo_mysql.h
index d994749e6..2439838df 100755
--- a/ext/pdo_mysql/php_pdo_mysql.h
+++ b/ext/pdo_mysql/php_pdo_mysql.h
@@ -2,12 +2,12 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2005 The PHP Group |
+ | Copyright (c) 1997-2006 The PHP Group |
+----------------------------------------------------------------------+
- | This source file is subject to version 3.0 of the PHP license, |
+ | This source file is subject to version 3.01 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. |
+ | http://www.php.net/license/3_01.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. |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_pdo_mysql.h,v 1.3 2005/07/03 02:20:08 wez Exp $ */
+/* $Id: php_pdo_mysql.h,v 1.3.2.1 2006/01/01 12:50:11 sniper Exp $ */
#ifndef PHP_PDO_MYSQL_H
#define PHP_PDO_MYSQL_H
diff --git a/ext/pdo_mysql/php_pdo_mysql_int.h b/ext/pdo_mysql/php_pdo_mysql_int.h
index 85a046368..2602e04e1 100755
--- a/ext/pdo_mysql/php_pdo_mysql_int.h
+++ b/ext/pdo_mysql/php_pdo_mysql_int.h
@@ -2,12 +2,12 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2005 The PHP Group |
+ | Copyright (c) 1997-2006 The PHP Group |
+----------------------------------------------------------------------+
- | This source file is subject to version 3.0 of the PHP license, |
+ | This source file is subject to version 3.01 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. |
+ | http://www.php.net/license/3_01.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. |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_pdo_mysql_int.h,v 1.16.2.1 2005/10/27 17:34:24 tony2001 Exp $ */
+/* $Id: php_pdo_mysql_int.h,v 1.16.2.2 2006/01/01 12:50:11 sniper Exp $ */
#ifndef PHP_PDO_MYSQL_INT_H
#define PHP_PDO_MYSQL_INT_H