diff options
author | Kristofer Pettersson <kristofer.pettersson@sun.com> | 2009-03-05 13:37:46 +0100 |
---|---|---|
committer | Kristofer Pettersson <kristofer.pettersson@sun.com> | 2009-03-05 13:37:46 +0100 |
commit | ac821c65701d38ced2d3167cf9c54559599d4f52 (patch) | |
tree | c453f5c554b4d43af9407ad8722bd8a72695c86b /sql | |
parent | 0ed8e66e4b4440097d718f0e5ab91e930e763688 (diff) | |
download | mariadb-git-ac821c65701d38ced2d3167cf9c54559599d4f52.tar.gz |
Bug#40363 Bug 20023 is not fixed on 5.0
This is a back port from 5.1 to 5.0.
Fix for BUG 20023: mysql_change_user() resets the value
of SQL_BIG_SELECTS.
The bug was that SQL_BIG_SELECTS was not properly set
in COM_CHANGE_USER.
The fix is to update SQL_BIG_SELECTS properly.
sql/sql_class.cc:
Update THD::options with the respect to SQL_BIG_SELECTS
in COM_CHANGE_USER.
tests/mysql_client_test.c:
Add a test case BUG#20023.
Diffstat (limited to 'sql')
-rw-r--r-- | sql/sql_class.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sql/sql_class.cc b/sql/sql_class.cc index 883291ec460..e00323ebab1 100644 --- a/sql/sql_class.cc +++ b/sql/sql_class.cc @@ -341,6 +341,12 @@ void THD::init(void) if (variables.sql_mode & MODE_NO_BACKSLASH_ESCAPES) server_status|= SERVER_STATUS_NO_BACKSLASH_ESCAPES; options= thd_startup_options; + + if (variables.max_join_size == HA_POS_ERROR) + options |= OPTION_BIG_SELECTS; + else + options &= ~OPTION_BIG_SELECTS; + transaction.all.modified_non_trans_table= transaction.stmt.modified_non_trans_table= FALSE; open_options=ha_open_options; update_lock_default= (variables.low_priority_updates ? |