diff options
| author | Wez Furlong <wez@php.net> | 2005-07-08 19:25:37 +0000 |
|---|---|---|
| committer | Wez Furlong <wez@php.net> | 2005-07-08 19:25:37 +0000 |
| commit | 168b6500fd8b8d17f17e99659997620631096696 (patch) | |
| tree | 6d72d7e73aa733089130d0c323757aa58d36bf49 /ext/pdo_mysql/mysql_driver.c | |
| parent | 6377c0cccaacec8242b0fcf7c3cdc5026d58365f (diff) | |
| download | php-git-168b6500fd8b8d17f17e99659997620631096696.tar.gz | |
Fix #33618
Diffstat (limited to 'ext/pdo_mysql/mysql_driver.c')
| -rwxr-xr-x | ext/pdo_mysql/mysql_driver.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/ext/pdo_mysql/mysql_driver.c b/ext/pdo_mysql/mysql_driver.c index c73f4d2939..538cf09725 100755 --- a/ext/pdo_mysql/mysql_driver.c +++ b/ext/pdo_mysql/mysql_driver.c @@ -233,9 +233,8 @@ static long mysql_handle_doer(pdo_dbh_t *dbh, const char *sql, long sql_len TSRM 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)); + char *id = php_pdo_int64_to_str(mysql_insert_id(H->server) TSRMLS_CC); + *len = strlen(id); return id; } |
