Skip to content

Commit 2959cc5

Browse files
author
tnurnberg@mysql.com/white.intern.koehntopp.de
committed
Bug #31177: Server variables can't be set to their current values
fixes for SLES10
1 parent 5cab4a7 commit 2959cc5

File tree

4 files changed

+14
-5
lines changed

4 files changed

+14
-5
lines changed

mysql-test/r/change_user.result

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@ SELECT @@session.sql_big_selects;
44
1
55
SELECT @@global.max_join_size;
66
@@global.max_join_size
7-
-1
7+
18446744073709551615
88
change_user
99
SELECT @@session.sql_big_selects;
1010
@@session.sql_big_selects
1111
1
1212
SELECT @@global.max_join_size;
1313
@@global.max_join_size
14-
-1
14+
18446744073709551615
1515
SET @@global.max_join_size = 10000;
1616
SET @@session.max_join_size = default;
1717
change_user

mysys/my_getopt.c

-2
Original file line numberDiff line numberDiff line change
@@ -892,8 +892,6 @@ ulonglong getopt_ull_limit_value(ulonglong num, const struct my_option *optp,
892892
num= ((ulonglong) ULONG_MAX);
893893
adjusted= TRUE;
894894
}
895-
#else
896-
num= min(num, LONG_MAX);
897895
#endif
898896
break;
899897
default:

sql/set_var.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1551,7 +1551,7 @@ Item *sys_var::item(THD *thd, enum_var_type var_type, LEX_STRING *base)
15511551
pthread_mutex_lock(&LOCK_global_system_variables);
15521552
value= *(ha_rows*) value_ptr(thd, var_type, base);
15531553
pthread_mutex_unlock(&LOCK_global_system_variables);
1554-
return new Item_int((longlong) value);
1554+
return new Item_int((ulonglong) value);
15551555
}
15561556
case SHOW_MY_BOOL:
15571557
{

tests/mysql_client_test.c

+11
Original file line numberDiff line numberDiff line change
@@ -16990,6 +16990,12 @@ static void test_bug20023()
1699016990
Check that SQL_BIG_SELECTS will be the original one.
1699116991
***********************************************************************/
1699216992

16993+
#if NOT_USED
16994+
/*
16995+
max_join_size is a ulong or better.
16996+
my_snprintf() only goes up to ul.
16997+
*/
16998+
1699316999
/* Restore MAX_JOIN_SIZE. */
1699417000

1699517001
my_snprintf(query_buffer,
@@ -16998,6 +17004,11 @@ static void test_bug20023()
1699817004
(int) max_join_size_orig);
1699917005

1700017006
DIE_IF(mysql_query(&con, query_buffer));
17007+
17008+
#else
17009+
DIE_IF(mysql_query(&con, "SET @@global.max_join_size = -1"));
17010+
#endif
17011+
1700117012
DIE_IF(mysql_query(&con, "SET @@session.max_join_size = default"));
1700217013

1700317014
/* Issue COM_CHANGE_USER. */

0 commit comments

Comments
 (0)