php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Return to Bug #63466
Patch patch_against_5.3.3 revision 2013-05-02 19:46 UTC by brianj at technews dot co dot za

Patch patch_against_5.3.3 for PDO MySQL Bug #63466

Patch version 2013-05-02 19:46 UTC

Return to Bug #63466 | Download this patch
Patch Revisions:

Developer: brianj@technews.co.za

diff -u -r php-5.3.3/ext/pdo_mysql/mysql_statement.c php5-5.3.3-patched/ext/pdo_mysql//mysql_statement.c
--- php-5.3.3/ext/pdo_mysql/mysql_statement.c	2010-05-21 13:09:28.000000000 +0200
+++ php5-5.3.3-patched/ext/pdo_mysql//mysql_statement.c	2013-05-02 23:18:53.000000000 +0200
@@ -615,6 +615,11 @@
 	PDO_DBG_ENTER("pdo_mysql_stmt_fetch");
 	PDO_DBG_INF_FMT("stmt=%p", S->stmt);
 	if (S->stmt) {
+		if(ori == PDO_FETCH_ORI_ABS) {
+			if(FAIL == mysqlnd_stmt_seek(S->stmt, offset)) {
+				PDO_DBG_RETURN(0);
+			}
+		}
 		if (FAIL == mysqlnd_stmt_fetch(S->stmt, &fetched_anything) || fetched_anything == FALSE) {
 			PDO_DBG_RETURN(0);
 		}
@@ -626,6 +631,9 @@
 	int ret;
 	
 	if (S->stmt) {
+		if(ori == PDO_FETCH_ORI_ABS) {
+			mysql_stmt_seek(S->stmt, offset);
+		}
 		ret = mysql_stmt_fetch(S->stmt);
 
 #		ifdef MYSQL_DATA_TRUNCATED
@@ -655,6 +663,9 @@
 		mnd_free(S->current_data);
 	}
 #endif /* PDO_USE_MYSQLND */
+	if(ori == PDO_FETCH_ORI_ABS) {
+		mysql_data_seek(S->result, offset);
+	}
 
 	if ((S->current_data = mysql_fetch_row(S->result)) == NULL) {
 		if (mysql_errno(S->H->server)) {
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Nov 21 22:01:28 2024 UTC