com php-src: Apply fix for #69356 to "Sent SQL": ext/pdo/pdo_ stmt.c
| From: | Adam Baratz | Date: | Thu, 29 Jun 2017 09:45:41 +0000 |
| Subject: | com php-src: Apply fix for #69356 to "Sent SQL": ext/pdo/pdo_ stmt.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-98251@lists.php.net to get a copy of this message | ||
Commit: 5ed83f7e846a9b6bd844df8818180a890c1904cb
Author: Adam Baratz <adambaratz@php.net> Thu, 29 Jun 2017 11:45:41 +0200
Parents: 3ac20e099511c0bcbcfc5755199fe704e3918993
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=5ed83f7e846a9b6bd844df8818180a890c1904cb
Log:
Apply fix for #69356 to "Sent SQL"
Bugs:
https://bugs.php.net/69356
Changed paths:
M ext/pdo/pdo_stmt.c
Diff:
diff --git a/ext/pdo/pdo_stmt.c b/ext/pdo/pdo_stmt..c
index efdcc87..caf3ff1 100644
--- a/ext/pdo/pdo_stmt.c
+++ b/ext/pdo/pdo_stmt.c
@@ -2111,9 +2111,10 @@ static PHP_METHOD(PDOStatement, debugDumpParams)
/* show parsed SQL if emulated prepares enabled */
/* pointers will be equal if PDO::query() was invoked */
if (stmt->active_query_string != NULL && stmt->active_query_string !=
stmt->query_string) {
- php_stream_printf(out, "Sent SQL: [%zd] %.*s\n",
- stmt->active_query_stringlen,
- (int) stmt->active_query_stringlen, stmt->active_query_string);
+ /* break into multiple operations so query string won't be truncated at
FORMAT_CONV_MAX_PRECISION */
+ php_stream_printf(out, "Sent SQL: [%zd] ", stmt->active_query_stringlen);
+ php_stream_write(out, stmt->active_query_string, stmt->active_query_stringlen);
+ php_stream_write(out, "\n", 1);
}
php_stream_printf(out, "Params: %d\n",