summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mysql-test/r/change_user.result4
-rw-r--r--mysys/my_getopt.c2
-rw-r--r--sql/set_var.cc2
-rw-r--r--tests/mysql_client_test.c11
4 files changed, 14 insertions, 5 deletions
diff --git a/mysql-test/r/change_user.result b/mysql-test/r/change_user.result
index cb409621d56..28b55dfd5e5 100644
--- a/mysql-test/r/change_user.result
+++ b/mysql-test/r/change_user.result
@@ -4,14 +4,14 @@ SELECT @@session.sql_big_selects;
1
SELECT @@global.max_join_size;
@@global.max_join_size
--1
+18446744073709551615
change_user
SELECT @@session.sql_big_selects;
@@session.sql_big_selects
1
SELECT @@global.max_join_size;
@@global.max_join_size
--1
+18446744073709551615
SET @@global.max_join_size = 10000;
SET @@session.max_join_size = default;
change_user
diff --git a/mysys/my_getopt.c b/mysys/my_getopt.c
index 7691472b76a..5132ac820b8 100644
--- a/mysys/my_getopt.c
+++ b/mysys/my_getopt.c
@@ -892,8 +892,6 @@ ulonglong getopt_ull_limit_value(ulonglong num, const struct my_option *optp,
num= ((ulonglong) ULONG_MAX);
adjusted= TRUE;
}
-#else
- num= min(num, LONG_MAX);
#endif
break;
default:
diff --git a/sql/set_var.cc b/sql/set_var.cc
index d78a691768e..8a6f0ac6285 100644
--- a/sql/set_var.cc
+++ b/sql/set_var.cc
@@ -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);
value= *(ha_rows*) value_ptr(thd, var_type, base);
pthread_mutex_unlock(&LOCK_global_system_variables);
- return new Item_int((longlong) value);
+ return new Item_int((ulonglong) value);
}
case SHOW_MY_BOOL:
{
diff --git a/tests/mysql_client_test.c b/tests/mysql_client_test.c
index 409d67faf90..9b7812838bd 100644
--- a/tests/mysql_client_test.c
+++ b/tests/mysql_client_test.c
@@ -16990,6 +16990,12 @@ static void test_bug20023()
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. */
my_snprintf(query_buffer,
@@ -16998,6 +17004,11 @@ static void test_bug20023()
(int) max_join_size_orig);
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"));
/* Issue COM_CHANGE_USER. */