Author: jschlueter
Date: 2008-04-10 14:42:13 +0200 (Thu, 10 Apr 2008)
New Revision: 1413
Modified:
trunk/php5/ext/pdo_mysqlnd/mysql_driver.c
trunk/php5/ext/pdo_mysqlnd/mysql_statement.c
trunk/php5/ext/pdo_mysqlnd/php_pdo_mysql_int.h
Log:
- Remove last_insert_id work-around which doesn't work
Modified: trunk/php5/ext/pdo_mysqlnd/mysql_driver.c
===================================================================
--- trunk/php5/ext/pdo_mysqlnd/mysql_driver.c 2008-04-10 11:36:54 UTC (rev 1412)
+++ trunk/php5/ext/pdo_mysqlnd/mysql_driver.c 2008-04-10 12:42:13 UTC (rev 1413)
@@ -274,7 +274,7 @@
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 = php_pdo_int64_to_str(H->last_insert_id TSRMLS_CC);
+ char *id = php_pdo_int64_to_str(mysql_insert_id(H->server) TSRMLS_CC);
*len = strlen(id);
return id;
}
@@ -481,7 +481,6 @@
H = pecalloc(1, sizeof(pdo_mysql_db_handle), dbh->is_persistent);
- H->last_insert_id = 0;
H->einfo.errcode = 0;
H->einfo.errmsg = NULL;
Modified: trunk/php5/ext/pdo_mysqlnd/mysql_statement.c
===================================================================
--- trunk/php5/ext/pdo_mysqlnd/mysql_statement.c 2008-04-10 11:36:54 UTC (rev 1412)
+++ trunk/php5/ext/pdo_mysqlnd/mysql_statement.c 2008-04-10 12:42:13 UTC (rev 1413)
@@ -240,7 +240,6 @@
row_count = mysql_stmt_affected_rows(S->stmt);
if (row_count != (my_ulonglong)-1) {
stmt->row_count = row_count;
- H->last_insert_id = mysql_insert_id(H->server);
}
return 1;
}
@@ -270,7 +269,6 @@
return 0;
}
- H->last_insert_id = mysql_insert_id(H->server);
stmt->row_count = mysql_num_rows(S->result);
if (!stmt->executed) {
Modified: trunk/php5/ext/pdo_mysqlnd/php_pdo_mysql_int.h
===================================================================
--- trunk/php5/ext/pdo_mysqlnd/php_pdo_mysql_int.h 2008-04-10 11:36:54 UTC (rev 1412)
+++ trunk/php5/ext/pdo_mysqlnd/php_pdo_mysql_int.h 2008-04-10 12:42:13 UTC (rev 1413)
@@ -51,8 +51,6 @@
#endif
pdo_mysql_error_info einfo;
-
- pdo_int64_t last_insert_id;
} pdo_mysql_db_handle;
typedef struct {
| Thread |
|---|
| • PHP mysqlnd svn commit: r1413 - trunk/php5/ext/pdo_mysqlnd | jschlueter | 10 Apr |