~ubuntu-branches/ubuntu/lucid/php5/lucid

« back to all changes in this revision

Viewing changes to ext/pdo_mysql/mysql_driver.c

  • Committer: Bazaar Package Importer
  • Author(s): Chuck Short
  • Date: 2010-03-16 09:09:50 UTC
  • mfrom: (1.1.18 upstream) (0.3.10 sid)
  • Revision ID: james.westby@ubuntu.com-20100316090950-e36m0pzranoixifd
Tags: 5.3.2-1ubuntu1
* Merge from debian unstable: 
  - debian/control:
    * Dropped firebird2.1-dev, libc-client-dev, libmcrypt-dev as it is in universe.
    * Dropped libmysqlclient15-dev, build against mysql 5.1.
    * Dropped libcurl-dev not in the archive.
    * Suggest php5-suhosin rather than recommends.
    * Dropped php5-imap, php5-interbase, php5-mcrypt since we have versions already in
      universe.
    * Dropped libonig-dev and libqgdbm since its in universe. (will be re-added in lucid+1)
    * Dropped locales-all.
  - modulelist: Drop imap, interbase, and mcrypt.
  - debian/rules:
    * Dropped building of mcrypt, imap, and interbase.
    * Install apport hook for php5.
  - Dropped debian/patches/libedit_is_editline.patch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
  +----------------------------------------------------------------------+
3
3
  | PHP Version 5                                                        |
4
4
  +----------------------------------------------------------------------+
5
 
  | Copyright (c) 1997-2009 The PHP Group                                |
 
5
  | Copyright (c) 1997-2010 The PHP Group                                |
6
6
  +----------------------------------------------------------------------+
7
7
  | This source file is subject to version 3.01 of the PHP license,      |
8
8
  | that is bundled with this package in the file LICENSE, and is        |
18
18
  +----------------------------------------------------------------------+
19
19
*/
20
20
 
21
 
/* $Id: mysql_driver.c 289630 2009-10-14 13:51:25Z johannes $ */
 
21
/* $Id: mysql_driver.c 294543 2010-02-04 20:28:55Z johannes $ */
22
22
 
23
23
#ifdef HAVE_CONFIG_H
24
24
#include "config.h"
127
127
 
128
128
        if (!dbh->methods) {
129
129
                PDO_DBG_INF("Throwing exception");
130
 
                zend_throw_exception_ex(php_pdo_get_exception(), 0 TSRMLS_CC, "SQLSTATE[%s] [%d] %s",
 
130
                zend_throw_exception_ex(php_pdo_get_exception(), einfo->errcode TSRMLS_CC, "SQLSTATE[%s] [%d] %s",
131
131
                                *pdo_err, einfo->errcode, einfo->errmsg);
132
132
        }
133
133
 
462
462
                case PDO_ATTR_SERVER_INFO: {
463
463
                        char *tmp;
464
464
#if PDO_USE_MYSQLND
465
 
                        int tmp_len;
 
465
                        unsigned int tmp_len;
466
466
 
467
467
                        if (mysqlnd_stat(H->server, &tmp, &tmp_len) == PASS) {
468
468
                                ZVAL_STRINGL(return_value, tmp, tmp_len, 0);
731
731
        }
732
732
 
733
733
        if (mysqlnd_connect(H->server, host, dbh->username, dbh->password, password_len, dbname, dbname_len,
734
 
                                                port, unix_socket, connect_opts, PDO_MYSQL_G(mysqlnd_thd_zval_cache) TSRMLS_CC) == NULL) {
 
734
                                                port, unix_socket, connect_opts TSRMLS_CC) == NULL) {
735
735
#else
736
736
        if (mysql_real_connect(H->server, host, dbh->username, dbh->password, dbname, port, unix_socket, connect_opts) == NULL) {
737
737
#endif