Skip to content

Commit

Permalink
MySQL 5.5 removed some dead code which includes last_used_con
Browse files Browse the repository at this point in the history
Summary:
last_used_con was used for replication within libmysqlclient but this
was never enabled or used. MySQL developers killed it all in 5.5.0.

Use an #ifdef for now in case we're using some experimental stuff somewhere.

Test Plan:
Built against MySQL 5.5 and our external version

DiffCamp Revision: 177173
Reviewed By: hzhao
CC: hzhao, hphp-diffs@lists
Revert Plan:
Ok
  • Loading branch information
macvicar authored and edv4rd0 committed Mar 19, 2011
1 parent 9096063 commit 24935cc
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/runtime/ext/ext_mysql.cpp
Expand Up @@ -709,7 +709,10 @@ static bool php_mysql_read_rows(MYSQL *mysql, CVarRef result) {
}

static Variant php_mysql_localize_result(MYSQL *mysql) {
#if MYSQL_VERSION_ID < 50500
mysql = mysql->last_used_con;
#endif

if (!mysql->fields) return true;
if (mysql->status != MYSQL_STATUS_GET_RESULT) {
// consistent with php_mysql_do_query_general
Expand Down

0 comments on commit 24935cc

Please sign in to comment.