Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change default value for PDO_Mysql driver ATTR_EMULATE_PREPARES to off #108

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions NEWS
Expand Up @@ -50,6 +50,9 @@ PHP NEWS
. Deprecated the /e modifier
(https://wiki.php.net/rfc/remove_preg_replace_eval_modifier). (Nikita Popov)

- PDO_MySQL:
. Changed default value for ATTR_EMULATE_PREPARES to 0. (Anthony Ferrara)

- pgsql
. Added pg_escape_literal() and pg_escape_identifier() (Yasuo)

Expand Down
3 changes: 2 additions & 1 deletion ext/pdo_mysql/mysql_driver.c
Expand Up @@ -587,7 +587,8 @@ static int pdo_mysql_handle_factory(pdo_dbh_t *dbh, zval *driver_options TSRMLS_
H->max_buffer_size = 1024*1024;
#endif

H->buffered = H->emulate_prepare = 1;
H->buffered = 1;
H->emulate_prepare = 0;

/* handle MySQL options */
if (driver_options) {
Expand Down