1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

Bug #31177: Server variables can't be set to their current values

fixes for SLES10


mysql-test/r/change_user.result:
  It's unsigned.
mysys/my_getopt.c:
  Failsafe no longer needed, we handle signedness correctly now.
sql/set_var.cc:
  ha_rows can be derived from all kinds of types, but
  they're all unsigned. Display it as such.
tests/mysql_client_test.c:
  cannot easily check this here due to types.
  check with Alik whether we need this on top
  of change_user.test.
This commit is contained in:
unknown
2007-12-10 08:12:41 +01:00
parent 85eed9de26
commit 1ebb563422
4 changed files with 14 additions and 5 deletions

View File

@ -4,14 +4,14 @@ SELECT @@session.sql_big_selects;
1 1
SELECT @@global.max_join_size; SELECT @@global.max_join_size;
@@global.max_join_size @@global.max_join_size
-1 18446744073709551615
change_user change_user
SELECT @@session.sql_big_selects; SELECT @@session.sql_big_selects;
@@session.sql_big_selects @@session.sql_big_selects
1 1
SELECT @@global.max_join_size; SELECT @@global.max_join_size;
@@global.max_join_size @@global.max_join_size
-1 18446744073709551615
SET @@global.max_join_size = 10000; SET @@global.max_join_size = 10000;
SET @@session.max_join_size = default; SET @@session.max_join_size = default;
change_user change_user

View File

@ -892,8 +892,6 @@ ulonglong getopt_ull_limit_value(ulonglong num, const struct my_option *optp,
num= ((ulonglong) ULONG_MAX); num= ((ulonglong) ULONG_MAX);
adjusted= TRUE; adjusted= TRUE;
} }
#else
num= min(num, LONG_MAX);
#endif #endif
break; break;
default: default:

View File

@ -1551,7 +1551,7 @@ Item *sys_var::item(THD *thd, enum_var_type var_type, LEX_STRING *base)
pthread_mutex_lock(&LOCK_global_system_variables); pthread_mutex_lock(&LOCK_global_system_variables);
value= *(ha_rows*) value_ptr(thd, var_type, base); value= *(ha_rows*) value_ptr(thd, var_type, base);
pthread_mutex_unlock(&LOCK_global_system_variables); pthread_mutex_unlock(&LOCK_global_system_variables);
return new Item_int((longlong) value); return new Item_int((ulonglong) value);
} }
case SHOW_MY_BOOL: case SHOW_MY_BOOL:
{ {

View File

@ -16990,6 +16990,12 @@ static void test_bug20023()
Check that SQL_BIG_SELECTS will be the original one. Check that SQL_BIG_SELECTS will be the original one.
***********************************************************************/ ***********************************************************************/
#if NOT_USED
/*
max_join_size is a ulong or better.
my_snprintf() only goes up to ul.
*/
/* Restore MAX_JOIN_SIZE. */ /* Restore MAX_JOIN_SIZE. */
my_snprintf(query_buffer, my_snprintf(query_buffer,
@ -16998,6 +17004,11 @@ static void test_bug20023()
(int) max_join_size_orig); (int) max_join_size_orig);
DIE_IF(mysql_query(&con, query_buffer)); DIE_IF(mysql_query(&con, query_buffer));
#else
DIE_IF(mysql_query(&con, "SET @@global.max_join_size = -1"));
#endif
DIE_IF(mysql_query(&con, "SET @@session.max_join_size = default")); DIE_IF(mysql_query(&con, "SET @@session.max_join_size = default"));
/* Issue COM_CHANGE_USER. */ /* Issue COM_CHANGE_USER. */