Bug #40363 Bug #20023 is not fixed on 5.0
Submitted: 28 Oct 2008 1:13 Modified: 11 Mar 2009 1:17
Reporter: Mikiya Okuno Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: General Severity:S3 (Non-critical)
Version:5.0 OS:Any
Assigned to: Kristofer Pettersson CPU Architecture:Any

[28 Oct 2008 1:13] Mikiya Okuno
Description:
The following change could be applicable to MySQL 5.0, but it has been only made on 5.1. Why don't you fix the bug on MySQL 5.0?

diff -Nrup a/sql/sql_class.cc b/sql/sql_class.cc
--- a/sql/sql_class.cc	2007-08-31 22:13:22 +04:00
+++ b/sql/sql_class.cc	2007-10-10 17:56:58 +04:00
@@ -585,6 +585,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;
+

How to repeat:
N/A

Suggested fix:
Refer to bug #20023
[5 Mar 2009 12:25] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/68371

2712 Kristofer Pettersson	2009-03-05
      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.
[9 Mar 2009 8:43] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/68591

2837 He Zhenxing	2009-03-09 [merge]
      Auto merge
[9 Mar 2009 8:44] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/68592

2768 He Zhenxing	2009-03-09 [merge]
      Auto merge
[9 Mar 2009 14:12] Bugs System
Pushed into 5.0.79 (revid:joro@sun.com-20090309135922-a0di9ebkxoj4d4wv) (version source revid:zhenxing.he@sun.com-20090309084418-d3q0f21q2f8jv09i) (merge vers: 5.0.79) (pib:6)
[11 Mar 2009 1:17] Paul DuBois
Noted in 5.0.79 changelog.

The mysql_change_user() C API function changed the value of the
sql_big_selects session variable.
[13 Mar 2009 19:07] Bugs System
Pushed into 5.1.33 (revid:joro@sun.com-20090313111355-7bsi1hgkvrg8pdds) (version source revid:zhou.li@sun.com-20090311061050-ihp0g77znonq1tuq) (merge vers: 5.1.33) (pib:6)
[18 Mar 2009 13:17] Bugs System
Pushed into 6.0.11-alpha (revid:joro@sun.com-20090318122208-1b5kvg6zeb4hxwp9) (version source revid:matthias.leich@sun.com-20090310140952-gwtoq87wykhji3zi) (merge vers: 6.0.11-alpha) (pib:6)
[9 May 2009 16:46] Bugs System
Pushed into 5.1.34-ndb-6.2.18 (revid:jonas@mysql.com-20090508185236-p9b3as7qyauybefl) (version source revid:jonas@mysql.com-20090508100057-30ote4xggi4nq14v) (merge vers: 5.1.33-ndb-6.2.18) (pib:6)
[9 May 2009 17:42] Bugs System
Pushed into 5.1.34-ndb-6.3.25 (revid:jonas@mysql.com-20090509063138-1u3q3v09wnn2txyt) (version source revid:jonas@mysql.com-20090508175813-s6yele2z3oh6o99z) (merge vers: 5.1.33-ndb-6.3.25) (pib:6)
[9 May 2009 18:40] Bugs System
Pushed into 5.1.34-ndb-7.0.6 (revid:jonas@mysql.com-20090509154927-im9a7g846c6u1hzc) (version source revid:jonas@mysql.com-20090509073226-09bljakh9eppogec) (merge vers: 5.1.33-ndb-7.0.6) (pib:6)