From 92ea1722c00a0fadd530e893b4d3cf91d9ae417f Mon Sep 17 00:00:00 2001
From: Horst Hunger <horst@mysql.com>
Date: Fri, 3 Apr 2009 11:37:48 +0200
Subject: [PATCH] Fix belonging to bug#42838: Though this bug is only for 6.0 I
 put in some updated result files for 6.0 and this are the corrsponding resul
 files for 5.1, so that sys_vars should then run successfully also in 5.1.

---
 .../r/binlog_cache_size_basic_64.result       |  2 +-
 .../r/bulk_insert_buffer_size_basic_64.result |  4 +++
 .../r/delayed_insert_limit_basic_64.result    |  2 +-
 .../r/delayed_queue_size_basic_64.result      |  2 +-
 .../r/join_buffer_size_basic_64.result        |  4 +--
 .../r/key_buffer_size_basic_64.result         |  2 --
 .../sys_vars/r/log_warnings_basic_64.result   |  4 +++
 .../r/max_binlog_cache_size_basic_64.result   |  6 ++--
 .../r/max_connect_errors_basic_64.result      |  4 +--
 .../r/max_heap_table_size_basic_64.result     |  6 ++--
 .../r/max_seeks_for_key_basic_64.result       |  4 +--
 .../sys_vars/r/max_tmp_tables_basic_64.result |  8 ++---
 .../r/max_write_lock_count_basic_64.result    |  4 +--
 .../r/min_examined_row_limit_basic_64.result  |  4 +++
 .../r/multi_range_count_basic_64.result       |  4 +--
 .../myisam_max_sort_file_size_basic_64.result |  8 ++++-
 .../r/myisam_repair_threads_basic_64.result   |  4 +--
 .../r/myisam_sort_buffer_size_basic_64.result |  4 +--
 .../r/net_retry_count_basic_64.result         |  4 +--
 .../r/query_alloc_block_size_basic_64.result  |  4 +--
 .../r/query_cache_limit_basic_64.result       |  4 +++
 .../query_cache_min_res_unit_basic_64.result  |  4 +++
 .../r/query_cache_size_basic_64.result        |  4 +++
 .../r/query_prealloc_size_basic_64.result     | 34 +++----------------
 .../r/range_alloc_block_size_basic_64.result  |  4 +--
 .../r/rpl_recovery_rank_basic_64.result       |  6 ++++
 .../slave_transaction_retries_basic_64.result |  2 ++
 .../sys_vars/r/sync_binlog_basic_64.result    |  4 +++
 ...ansaction_alloc_block_size_basic_64.result |  2 +-
 .../transaction_prealloc_size_basic_64.result |  2 +-
 .../sys_vars/r/wait_timeout_basic_64.result   |  2 +-
 31 files changed, 84 insertions(+), 68 deletions(-)

diff --git a/mysql-test/suite/sys_vars/r/binlog_cache_size_basic_64.result b/mysql-test/suite/sys_vars/r/binlog_cache_size_basic_64.result
index 45ed43589a3..3858df0f4d6 100644
--- a/mysql-test/suite/sys_vars/r/binlog_cache_size_basic_64.result
+++ b/mysql-test/suite/sys_vars/r/binlog_cache_size_basic_64.result
@@ -44,7 +44,7 @@ SET @@global.binlog_cache_size = 10000.01;
 ERROR 42000: Incorrect argument type to variable 'binlog_cache_size'
 SET @@global.binlog_cache_size = -1024;
 Warnings:
-Warning	1292	Truncated incorrect binlog_cache_size value: '0'
+Warning	1292	Truncated incorrect binlog_cache_size value: '-1024'
 SELECT @@global.binlog_cache_size;
 @@global.binlog_cache_size
 4096
diff --git a/mysql-test/suite/sys_vars/r/bulk_insert_buffer_size_basic_64.result b/mysql-test/suite/sys_vars/r/bulk_insert_buffer_size_basic_64.result
index 9e0e8e07470..320290fbca1 100644
--- a/mysql-test/suite/sys_vars/r/bulk_insert_buffer_size_basic_64.result
+++ b/mysql-test/suite/sys_vars/r/bulk_insert_buffer_size_basic_64.result
@@ -66,6 +66,8 @@ SELECT @@global.bulk_insert_buffer_size;
 @@global.bulk_insert_buffer_size
 42949672950
 SET @@global.bulk_insert_buffer_size = -1024;
+Warnings:
+Warning	1292	Truncated incorrect bulk_insert_buffer_size value: '-1024'
 SELECT @@global.bulk_insert_buffer_size;
 @@global.bulk_insert_buffer_size
 0
@@ -80,6 +82,8 @@ SELECT @@session.bulk_insert_buffer_size;
 @@session.bulk_insert_buffer_size
 42949672950
 SET @@session.bulk_insert_buffer_size = -2;
+Warnings:
+Warning	1292	Truncated incorrect bulk_insert_buffer_size value: '-2'
 SELECT @@session.bulk_insert_buffer_size;
 @@session.bulk_insert_buffer_size
 0
diff --git a/mysql-test/suite/sys_vars/r/delayed_insert_limit_basic_64.result b/mysql-test/suite/sys_vars/r/delayed_insert_limit_basic_64.result
index 246bf0e8734..1f7d0a52e72 100644
--- a/mysql-test/suite/sys_vars/r/delayed_insert_limit_basic_64.result
+++ b/mysql-test/suite/sys_vars/r/delayed_insert_limit_basic_64.result
@@ -35,7 +35,7 @@ SELECT @@global.delayed_insert_limit;
 1
 SET @@global.delayed_insert_limit = -1024;
 Warnings:
-Warning	1292	Truncated incorrect delayed_insert_limit value: '0'
+Warning	1292	Truncated incorrect delayed_insert_limit value: '-1024'
 SELECT @@global.delayed_insert_limit;
 @@global.delayed_insert_limit
 1
diff --git a/mysql-test/suite/sys_vars/r/delayed_queue_size_basic_64.result b/mysql-test/suite/sys_vars/r/delayed_queue_size_basic_64.result
index d575626b0a1..ed866b7e0b4 100644
--- a/mysql-test/suite/sys_vars/r/delayed_queue_size_basic_64.result
+++ b/mysql-test/suite/sys_vars/r/delayed_queue_size_basic_64.result
@@ -35,7 +35,7 @@ SELECT @@global.delayed_queue_size;
 1
 SET @@global.delayed_queue_size = -1024;
 Warnings:
-Warning	1292	Truncated incorrect delayed_queue_size value: '0'
+Warning	1292	Truncated incorrect delayed_queue_size value: '-1024'
 SELECT @@global.delayed_queue_size;
 @@global.delayed_queue_size
 1
diff --git a/mysql-test/suite/sys_vars/r/join_buffer_size_basic_64.result b/mysql-test/suite/sys_vars/r/join_buffer_size_basic_64.result
index ed652af67d2..4811d4732df 100644
--- a/mysql-test/suite/sys_vars/r/join_buffer_size_basic_64.result
+++ b/mysql-test/suite/sys_vars/r/join_buffer_size_basic_64.result
@@ -71,7 +71,7 @@ SELECT @@global.join_buffer_size=8200 OR @@global.join_buffer_size= 8228;
 1
 SET @@global.join_buffer_size = -1024;
 Warnings:
-Warning	1292	Truncated incorrect join_buffer_size value: '0'
+Warning	1292	Truncated incorrect join_buffer_size value: '-1024'
 SELECT @@global.join_buffer_size=8200 OR @@global.join_buffer_size= 8228;
 @@global.join_buffer_size=8200 OR @@global.join_buffer_size= 8228
 1
@@ -103,7 +103,7 @@ SELECT @@session.join_buffer_size=8200 OR @@session.join_buffer_size= 8228;
 1
 SET @@session.join_buffer_size = -2;
 Warnings:
-Warning	1292	Truncated incorrect join_buffer_size value: '0'
+Warning	1292	Truncated incorrect join_buffer_size value: '-2'
 SELECT @@session.join_buffer_size=8200 OR @@session.join_buffer_size= 8228;
 @@session.join_buffer_size=8200 OR @@session.join_buffer_size= 8228
 1
diff --git a/mysql-test/suite/sys_vars/r/key_buffer_size_basic_64.result b/mysql-test/suite/sys_vars/r/key_buffer_size_basic_64.result
index 9ce1ab20993..eea782701bb 100644
--- a/mysql-test/suite/sys_vars/r/key_buffer_size_basic_64.result
+++ b/mysql-test/suite/sys_vars/r/key_buffer_size_basic_64.result
@@ -17,8 +17,6 @@ SELECT @@global.key_buffer_size BETWEEN 8 AND 36;
 @@global.key_buffer_size BETWEEN 8 AND 36
 1
 SET @@global.key_buffer_size = 1800;
-Warnings:
-Warning	1292	Truncated incorrect key_buffer_size value: '1800'
 SELECT @@global.key_buffer_size BETWEEN 8 AND 36;
 @@global.key_buffer_size BETWEEN 8 AND 36
 1
diff --git a/mysql-test/suite/sys_vars/r/log_warnings_basic_64.result b/mysql-test/suite/sys_vars/r/log_warnings_basic_64.result
index ba6671c87a4..6a94881dad0 100644
--- a/mysql-test/suite/sys_vars/r/log_warnings_basic_64.result
+++ b/mysql-test/suite/sys_vars/r/log_warnings_basic_64.result
@@ -74,6 +74,8 @@ SELECT @@global.log_warnings;
 @@global.log_warnings
 100000000000
 SET @@global.log_warnings = -1024;
+Warnings:
+Warning	1292	Truncated incorrect log_warnings value: '-1024'
 SELECT @@global.log_warnings;
 @@global.log_warnings
 0
@@ -92,6 +94,8 @@ SELECT @@session.log_warnings;
 @@session.log_warnings
 100000000000
 SET @@session.log_warnings = -2;
+Warnings:
+Warning	1292	Truncated incorrect log_warnings value: '-2'
 SELECT @@session.log_warnings;
 @@session.log_warnings
 0
diff --git a/mysql-test/suite/sys_vars/r/max_binlog_cache_size_basic_64.result b/mysql-test/suite/sys_vars/r/max_binlog_cache_size_basic_64.result
index 30db3f14dd4..10a42f6ab0e 100644
--- a/mysql-test/suite/sys_vars/r/max_binlog_cache_size_basic_64.result
+++ b/mysql-test/suite/sys_vars/r/max_binlog_cache_size_basic_64.result
@@ -1,7 +1,7 @@
 SET @start_value = @@global.max_binlog_cache_size;
 SELECT @start_value;
 @start_value
-18446744073709551615
+18446744073709547520
 '#--------------------FN_DYNVARS_072_01------------------------#'
 SET @@global.max_binlog_cache_size = 5000;
 SET @@global.max_binlog_cache_size = DEFAULT;
@@ -39,7 +39,7 @@ SELECT @@global.max_binlog_cache_size;
 '#--------------------FN_DYNVARS_072_04-------------------------#'
 SET @@global.max_binlog_cache_size = -1;
 Warnings:
-Warning	1292	Truncated incorrect max_binlog_cache_size value: '0'
+Warning	1292	Truncated incorrect max_binlog_cache_size value: '-1'
 SELECT @@global.max_binlog_cache_size;
 @@global.max_binlog_cache_size
 4096
@@ -54,7 +54,7 @@ SELECT @@global.max_binlog_cache_size;
 99999997952
 SET @@global.max_binlog_cache_size = -1024;
 Warnings:
-Warning	1292	Truncated incorrect max_binlog_cache_size value: '0'
+Warning	1292	Truncated incorrect max_binlog_cache_size value: '-1024'
 SELECT @@global.max_binlog_cache_size;
 @@global.max_binlog_cache_size
 4096
diff --git a/mysql-test/suite/sys_vars/r/max_connect_errors_basic_64.result b/mysql-test/suite/sys_vars/r/max_connect_errors_basic_64.result
index 8117b650651..762cfd14a3a 100644
--- a/mysql-test/suite/sys_vars/r/max_connect_errors_basic_64.result
+++ b/mysql-test/suite/sys_vars/r/max_connect_errors_basic_64.result
@@ -39,7 +39,7 @@ SELECT @@global.max_connect_errors;
 '#--------------------FN_DYNVARS_073_04-------------------------#'
 SET @@global.max_connect_errors = -1;
 Warnings:
-Warning	1292	Truncated incorrect max_connect_errors value: '0'
+Warning	1292	Truncated incorrect max_connect_errors value: '-1'
 SELECT @@global.max_connect_errors;
 @@global.max_connect_errors
 1
@@ -54,7 +54,7 @@ SELECT @@global.max_connect_errors;
 100000000000
 SET @@global.max_connect_errors = -1024;
 Warnings:
-Warning	1292	Truncated incorrect max_connect_errors value: '0'
+Warning	1292	Truncated incorrect max_connect_errors value: '-1024'
 SELECT @@global.max_connect_errors;
 @@global.max_connect_errors
 1
diff --git a/mysql-test/suite/sys_vars/r/max_heap_table_size_basic_64.result b/mysql-test/suite/sys_vars/r/max_heap_table_size_basic_64.result
index ebab80f376b..6642b6024b5 100644
--- a/mysql-test/suite/sys_vars/r/max_heap_table_size_basic_64.result
+++ b/mysql-test/suite/sys_vars/r/max_heap_table_size_basic_64.result
@@ -73,13 +73,13 @@ SELECT @@session.max_heap_table_size;
 '#------------------FN_DYNVARS_077_05-----------------------#'
 SET @@global.max_heap_table_size = -1;
 Warnings:
-Warning	1292	Truncated incorrect max_heap_table_size value: '0'
+Warning	1292	Truncated incorrect max_heap_table_size value: '-1'
 SELECT @@global.max_heap_table_size;
 @@global.max_heap_table_size
 16384
 SET @@global.max_heap_table_size = -1024;
 Warnings:
-Warning	1292	Truncated incorrect max_heap_table_size value: '0'
+Warning	1292	Truncated incorrect max_heap_table_size value: '-1024'
 SELECT @@global.max_heap_table_size;
 @@global.max_heap_table_size
 16384
@@ -111,7 +111,7 @@ SELECT @@global.max_heap_table_size;
 4294967296
 SET @@session.max_heap_table_size = -1;
 Warnings:
-Warning	1292	Truncated incorrect max_heap_table_size value: '0'
+Warning	1292	Truncated incorrect max_heap_table_size value: '-1'
 SELECT @@session.max_heap_table_size;
 @@session.max_heap_table_size
 16384
diff --git a/mysql-test/suite/sys_vars/r/max_seeks_for_key_basic_64.result b/mysql-test/suite/sys_vars/r/max_seeks_for_key_basic_64.result
index eefb829cdae..5b1e076c188 100644
--- a/mysql-test/suite/sys_vars/r/max_seeks_for_key_basic_64.result
+++ b/mysql-test/suite/sys_vars/r/max_seeks_for_key_basic_64.result
@@ -77,7 +77,7 @@ SELECT @@global.max_seeks_for_key;
 1
 SET @@global.max_seeks_for_key = -1024;
 Warnings:
-Warning	1292	Truncated incorrect max_seeks_for_key value: '0'
+Warning	1292	Truncated incorrect max_seeks_for_key value: '-1024'
 SELECT @@global.max_seeks_for_key;
 @@global.max_seeks_for_key
 1
@@ -103,7 +103,7 @@ SELECT @@session.max_seeks_for_key;
 1
 SET @@session.max_seeks_for_key = -2;
 Warnings:
-Warning	1292	Truncated incorrect max_seeks_for_key value: '0'
+Warning	1292	Truncated incorrect max_seeks_for_key value: '-2'
 SELECT @@session.max_seeks_for_key;
 @@session.max_seeks_for_key
 1
diff --git a/mysql-test/suite/sys_vars/r/max_tmp_tables_basic_64.result b/mysql-test/suite/sys_vars/r/max_tmp_tables_basic_64.result
index 4b9f68c509e..808e99b739d 100644
--- a/mysql-test/suite/sys_vars/r/max_tmp_tables_basic_64.result
+++ b/mysql-test/suite/sys_vars/r/max_tmp_tables_basic_64.result
@@ -71,7 +71,7 @@ SELECT @@session.max_tmp_tables;
 '#------------------FN_DYNVARS_086_05-----------------------#'
 SET @@global.max_tmp_tables = -1024;
 Warnings:
-Warning	1292	Truncated incorrect max_tmp_tables value: '0'
+Warning	1292	Truncated incorrect max_tmp_tables value: '-1024'
 SELECT @@global.max_tmp_tables;
 @@global.max_tmp_tables
 1
@@ -81,7 +81,7 @@ SELECT @@global.max_tmp_tables;
 4294967296
 SET @@global.max_tmp_tables = -1;
 Warnings:
-Warning	1292	Truncated incorrect max_tmp_tables value: '0'
+Warning	1292	Truncated incorrect max_tmp_tables value: '-1'
 SELECT @@global.max_tmp_tables;
 @@global.max_tmp_tables
 1
@@ -105,7 +105,7 @@ SELECT @@session.max_tmp_tables;
 4294967296
 SET @@session.max_tmp_tables = -1;
 Warnings:
-Warning	1292	Truncated incorrect max_tmp_tables value: '0'
+Warning	1292	Truncated incorrect max_tmp_tables value: '-1'
 SELECT @@session.max_tmp_tables;
 @@session.max_tmp_tables
 1
@@ -115,7 +115,7 @@ SELECT @@session.max_tmp_tables;
 429496729500
 SET @@session.max_tmp_tables = -001;
 Warnings:
-Warning	1292	Truncated incorrect max_tmp_tables value: '0'
+Warning	1292	Truncated incorrect max_tmp_tables value: '-1'
 SELECT @@session.max_tmp_tables;
 @@session.max_tmp_tables
 1
diff --git a/mysql-test/suite/sys_vars/r/max_write_lock_count_basic_64.result b/mysql-test/suite/sys_vars/r/max_write_lock_count_basic_64.result
index d74586841dd..934777e38d3 100644
--- a/mysql-test/suite/sys_vars/r/max_write_lock_count_basic_64.result
+++ b/mysql-test/suite/sys_vars/r/max_write_lock_count_basic_64.result
@@ -37,7 +37,7 @@ SELECT @@global.max_write_lock_count;
 '#------------------FN_DYNVARS_088_04-----------------------#'
 SET @@global.max_write_lock_count = -1024;
 Warnings:
-Warning	1292	Truncated incorrect max_write_lock_count value: '0'
+Warning	1292	Truncated incorrect max_write_lock_count value: '-1024'
 SELECT @@global.max_write_lock_count;
 @@global.max_write_lock_count
 1
@@ -47,7 +47,7 @@ SELECT @@global.max_write_lock_count;
 4294967296
 SET @@global.max_write_lock_count = -1;
 Warnings:
-Warning	1292	Truncated incorrect max_write_lock_count value: '0'
+Warning	1292	Truncated incorrect max_write_lock_count value: '-1'
 SELECT @@global.max_write_lock_count;
 @@global.max_write_lock_count
 1
diff --git a/mysql-test/suite/sys_vars/r/min_examined_row_limit_basic_64.result b/mysql-test/suite/sys_vars/r/min_examined_row_limit_basic_64.result
index fa11659c6c5..5cf77ed6dc8 100644
--- a/mysql-test/suite/sys_vars/r/min_examined_row_limit_basic_64.result
+++ b/mysql-test/suite/sys_vars/r/min_examined_row_limit_basic_64.result
@@ -82,6 +82,8 @@ SELECT @@global.min_examined_row_limit;
 @@global.min_examined_row_limit
 429496726
 SET @@global.min_examined_row_limit = -1024;
+Warnings:
+Warning	1292	Truncated incorrect min_examined_row_limit value: '-1024'
 SELECT @@global.min_examined_row_limit;
 @@global.min_examined_row_limit
 0
@@ -104,6 +106,8 @@ SELECT @@session.min_examined_row_limit;
 @@session.min_examined_row_limit
 4294967296
 SET @@session.min_examined_row_limit = -1;
+Warnings:
+Warning	1292	Truncated incorrect min_examined_row_limit value: '-1'
 SELECT @@session.min_examined_row_limit;
 @@session.min_examined_row_limit
 0
diff --git a/mysql-test/suite/sys_vars/r/multi_range_count_basic_64.result b/mysql-test/suite/sys_vars/r/multi_range_count_basic_64.result
index f2115aec2e2..29019ca5971 100644
--- a/mysql-test/suite/sys_vars/r/multi_range_count_basic_64.result
+++ b/mysql-test/suite/sys_vars/r/multi_range_count_basic_64.result
@@ -81,7 +81,7 @@ SELECT @@global.multi_range_count;
 4294967296
 SET @@global.multi_range_count = -1024;
 Warnings:
-Warning	1292	Truncated incorrect multi_range_count value: '0'
+Warning	1292	Truncated incorrect multi_range_count value: '-1024'
 SELECT @@global.multi_range_count;
 @@global.multi_range_count
 1
@@ -111,7 +111,7 @@ SELECT @@session.multi_range_count;
 4294967296
 SET @@session.multi_range_count = -1;
 Warnings:
-Warning	1292	Truncated incorrect multi_range_count value: '0'
+Warning	1292	Truncated incorrect multi_range_count value: '-1'
 SELECT @@session.multi_range_count;
 @@session.multi_range_count
 1
diff --git a/mysql-test/suite/sys_vars/r/myisam_max_sort_file_size_basic_64.result b/mysql-test/suite/sys_vars/r/myisam_max_sort_file_size_basic_64.result
index 00ff1dfc1ab..df2a49e4dd5 100644
--- a/mysql-test/suite/sys_vars/r/myisam_max_sort_file_size_basic_64.result
+++ b/mysql-test/suite/sys_vars/r/myisam_max_sort_file_size_basic_64.result
@@ -1,7 +1,7 @@
 SET @start_global_value = @@global.myisam_max_sort_file_size;
 SELECT @start_global_value;
 @start_global_value
-9223372036854775807
+9223372036853727232
 '#--------------------FN_DYNVARS_094_01-------------------------#'
 SET @@global.myisam_max_sort_file_size = 500000;
 SET @@global.myisam_max_sort_file_size = DEFAULT;
@@ -48,14 +48,20 @@ SET @@local.myisam_max_sort_file_size = 4;
 ERROR HY000: Variable 'myisam_max_sort_file_size' is a GLOBAL variable and should be set with SET GLOBAL
 '#------------------FN_DYNVARS_094_05-----------------------#'
 SET @@global.myisam_max_sort_file_size = -1;
+Warnings:
+Warning	1292	Truncated incorrect myisam_max_sort_file_size value: '-1'
 SELECT @@global.myisam_max_sort_file_size;
 @@global.myisam_max_sort_file_size
 0
 SET @@global.myisam_max_sort_file_size = -2147483648;
+Warnings:
+Warning	1292	Truncated incorrect myisam_max_sort_file_size value: '-2147483648'
 SELECT @@global.myisam_max_sort_file_size;
 @@global.myisam_max_sort_file_size
 0
 SET @@global.myisam_max_sort_file_size = -2147483649;
+Warnings:
+Warning	1292	Truncated incorrect myisam_max_sort_file_size value: '-2147483649'
 SELECT @@global.myisam_max_sort_file_size;
 @@global.myisam_max_sort_file_size
 0
diff --git a/mysql-test/suite/sys_vars/r/myisam_repair_threads_basic_64.result b/mysql-test/suite/sys_vars/r/myisam_repair_threads_basic_64.result
index 8271451cc9e..0a317d28b11 100644
--- a/mysql-test/suite/sys_vars/r/myisam_repair_threads_basic_64.result
+++ b/mysql-test/suite/sys_vars/r/myisam_repair_threads_basic_64.result
@@ -61,7 +61,7 @@ SELECT @@global.myisam_repair_threads ;
 1
 SET @@global.myisam_repair_threads  = -1024;
 Warnings:
-Warning	1292	Truncated incorrect myisam_repair_threads value: '0'
+Warning	1292	Truncated incorrect myisam_repair_threads value: '-1024'
 SELECT @@global.myisam_repair_threads ;
 @@global.myisam_repair_threads
 1
@@ -102,7 +102,7 @@ SELECT @@session.myisam_repair_threads ;
 1
 SET @@session.myisam_repair_threads  = -2;
 Warnings:
-Warning	1292	Truncated incorrect myisam_repair_threads value: '0'
+Warning	1292	Truncated incorrect myisam_repair_threads value: '-2'
 SELECT @@session.myisam_repair_threads ;
 @@session.myisam_repair_threads
 1
diff --git a/mysql-test/suite/sys_vars/r/myisam_sort_buffer_size_basic_64.result b/mysql-test/suite/sys_vars/r/myisam_sort_buffer_size_basic_64.result
index bfcada76a46..be9e415d830 100644
--- a/mysql-test/suite/sys_vars/r/myisam_sort_buffer_size_basic_64.result
+++ b/mysql-test/suite/sys_vars/r/myisam_sort_buffer_size_basic_64.result
@@ -61,7 +61,7 @@ SELECT @@global.myisam_sort_buffer_size  ;
 4
 SET @@global.myisam_sort_buffer_size   = -1024;
 Warnings:
-Warning	1292	Truncated incorrect myisam_sort_buffer_size value: '0'
+Warning	1292	Truncated incorrect myisam_sort_buffer_size value: '-1024'
 SELECT @@global.myisam_sort_buffer_size  ;
 @@global.myisam_sort_buffer_size
 4
@@ -102,7 +102,7 @@ SELECT @@session.myisam_sort_buffer_size  ;
 4
 SET @@session.myisam_sort_buffer_size   = -2;
 Warnings:
-Warning	1292	Truncated incorrect myisam_sort_buffer_size value: '0'
+Warning	1292	Truncated incorrect myisam_sort_buffer_size value: '-2'
 SELECT @@session.myisam_sort_buffer_size  ;
 @@session.myisam_sort_buffer_size
 4
diff --git a/mysql-test/suite/sys_vars/r/net_retry_count_basic_64.result b/mysql-test/suite/sys_vars/r/net_retry_count_basic_64.result
index db133d23f79..67dae3d1291 100644
--- a/mysql-test/suite/sys_vars/r/net_retry_count_basic_64.result
+++ b/mysql-test/suite/sys_vars/r/net_retry_count_basic_64.result
@@ -77,7 +77,7 @@ SELECT @@global.net_retry_count;
 1
 SET @@global.net_retry_count = -1024;
 Warnings:
-Warning	1292	Truncated incorrect net_retry_count value: '0'
+Warning	1292	Truncated incorrect net_retry_count value: '-1024'
 SELECT @@global.net_retry_count;
 @@global.net_retry_count
 1
@@ -107,7 +107,7 @@ SELECT @@session.net_retry_count;
 1
 SET @@session.net_retry_count = -2;
 Warnings:
-Warning	1292	Truncated incorrect net_retry_count value: '0'
+Warning	1292	Truncated incorrect net_retry_count value: '-2'
 SELECT @@session.net_retry_count;
 @@session.net_retry_count
 1
diff --git a/mysql-test/suite/sys_vars/r/query_alloc_block_size_basic_64.result b/mysql-test/suite/sys_vars/r/query_alloc_block_size_basic_64.result
index 57c96a8168a..7c573bdb7cb 100644
--- a/mysql-test/suite/sys_vars/r/query_alloc_block_size_basic_64.result
+++ b/mysql-test/suite/sys_vars/r/query_alloc_block_size_basic_64.result
@@ -78,7 +78,7 @@ SELECT @@global.query_alloc_block_size;
 1024
 SET @@global.query_alloc_block_size = -1;
 Warnings:
-Warning	1292	Truncated incorrect query_alloc_block_size value: '0'
+Warning	1292	Truncated incorrect query_alloc_block_size value: '-1'
 SELECT @@global.query_alloc_block_size;
 @@global.query_alloc_block_size
 1024
@@ -110,7 +110,7 @@ SELECT @@session.query_alloc_block_size;
 1024
 SET @@session.query_alloc_block_size = -2;
 Warnings:
-Warning	1292	Truncated incorrect query_alloc_block_size value: '0'
+Warning	1292	Truncated incorrect query_alloc_block_size value: '-2'
 SELECT @@session.query_alloc_block_size;
 @@session.query_alloc_block_size
 1024
diff --git a/mysql-test/suite/sys_vars/r/query_cache_limit_basic_64.result b/mysql-test/suite/sys_vars/r/query_cache_limit_basic_64.result
index a592883ef91..7b3e759deb4 100644
--- a/mysql-test/suite/sys_vars/r/query_cache_limit_basic_64.result
+++ b/mysql-test/suite/sys_vars/r/query_cache_limit_basic_64.result
@@ -32,6 +32,8 @@ SELECT @@global.query_cache_limit;
 1048575
 '#--------------------FN_DYNVARS_131_04-------------------------#'
 SET @@global.query_cache_limit = -1;
+Warnings:
+Warning	1292	Truncated incorrect query_cache_limit value: '-1'
 SELECT @@global.query_cache_limit;
 @@global.query_cache_limit
 0
@@ -49,6 +51,8 @@ SELECT @@global.query_cache_limit;
 @@global.query_cache_limit
 10240022115
 SET @@global.query_cache_limit = -1024;
+Warnings:
+Warning	1292	Truncated incorrect query_cache_limit value: '-1024'
 SELECT @@global.query_cache_limit;
 @@global.query_cache_limit
 0
diff --git a/mysql-test/suite/sys_vars/r/query_cache_min_res_unit_basic_64.result b/mysql-test/suite/sys_vars/r/query_cache_min_res_unit_basic_64.result
index e1c74d2bbc1..fdbbc71f108 100644
--- a/mysql-test/suite/sys_vars/r/query_cache_min_res_unit_basic_64.result
+++ b/mysql-test/suite/sys_vars/r/query_cache_min_res_unit_basic_64.result
@@ -42,6 +42,8 @@ SELECT @@global.query_cache_min_res_unit;
 1048576
 '#--------------------FN_DYNVARS_132_04-------------------------#'
 SET @@global.query_cache_min_res_unit = -1;
+Warnings:
+Warning	1292	Truncated incorrect query_cache_min_res_unit value: '-1'
 SELECT @@global.query_cache_min_res_unit;
 @@global.query_cache_min_res_unit
 512
@@ -59,6 +61,8 @@ SELECT @@global.query_cache_min_res_unit;
 @@global.query_cache_min_res_unit
 512
 SET @@global.query_cache_min_res_unit = -1024;
+Warnings:
+Warning	1292	Truncated incorrect query_cache_min_res_unit value: '-1024'
 SELECT @@global.query_cache_min_res_unit;
 @@global.query_cache_min_res_unit
 512
diff --git a/mysql-test/suite/sys_vars/r/query_cache_size_basic_64.result b/mysql-test/suite/sys_vars/r/query_cache_size_basic_64.result
index 0cc508b169e..c6d7999677f 100644
--- a/mysql-test/suite/sys_vars/r/query_cache_size_basic_64.result
+++ b/mysql-test/suite/sys_vars/r/query_cache_size_basic_64.result
@@ -41,6 +41,8 @@ SELECT @@global.query_cache_size;
 1047552
 '#--------------------FN_DYNVARS_133_04-------------------------#'
 SET @@global.query_cache_size = -1;
+Warnings:
+Warning	1292	Truncated incorrect query_cache_size value: '-1'
 SELECT @@global.query_cache_size;
 @@global.query_cache_size
 0
@@ -58,6 +60,8 @@ SELECT @@global.query_cache_size;
 @@global.query_cache_size
 0
 SET @@global.query_cache_size = -1024;
+Warnings:
+Warning	1292	Truncated incorrect query_cache_size value: '-1024'
 SELECT @@global.query_cache_size;
 @@global.query_cache_size
 0
diff --git a/mysql-test/suite/sys_vars/r/query_prealloc_size_basic_64.result b/mysql-test/suite/sys_vars/r/query_prealloc_size_basic_64.result
index 0e61fbcd4b5..a16c56f95c5 100644
--- a/mysql-test/suite/sys_vars/r/query_prealloc_size_basic_64.result
+++ b/mysql-test/suite/sys_vars/r/query_prealloc_size_basic_64.result
@@ -35,10 +35,6 @@ SET @@global.query_prealloc_size   = 8192;
 SELECT @@global.query_prealloc_size  ;
 @@global.query_prealloc_size
 8192
-SET @@global.query_prealloc_size   = 4294967295;
-SELECT @@global.query_prealloc_size  ;
-@@global.query_prealloc_size
-4294966272
 SET @@global.query_prealloc_size   = 655354;
 SELECT @@global.query_prealloc_size  ;
 @@global.query_prealloc_size
@@ -48,10 +44,6 @@ SET @@session.query_prealloc_size   = 8192;
 SELECT @@session.query_prealloc_size  ;
 @@session.query_prealloc_size
 8192
-SET @@session.query_prealloc_size   = 4294967295;
-SELECT @@session.query_prealloc_size  ;
-@@session.query_prealloc_size
-4294966272
 SET @@session.query_prealloc_size   = 655345;
 SELECT @@session.query_prealloc_size  ;
 @@session.query_prealloc_size
@@ -63,48 +55,32 @@ Warning	1292	Truncated incorrect query_prealloc_size value: '0'
 SELECT @@global.query_prealloc_size  ;
 @@global.query_prealloc_size
 8192
-SET @@global.query_prealloc_size   = -1024;
-Warnings:
-Warning	1292	Truncated incorrect query_prealloc_size value: '0'
-SELECT @@global.query_prealloc_size  ;
-@@global.query_prealloc_size
-8192
-SET @@global.query_prealloc_size   = 429496729533;
-SELECT @@global.query_prealloc_size  ;
-@@global.query_prealloc_size
-429496728576
 SET @@global.query_prealloc_size   = 65530.34.;
 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.' at line 1
 SELECT @@global.query_prealloc_size  ;
 @@global.query_prealloc_size
-429496728576
+8192
 SET @@global.query_prealloc_size   = test;
 ERROR 42000: Incorrect argument type to variable 'query_prealloc_size'
 SELECT @@global.query_prealloc_size  ;
 @@global.query_prealloc_size
-429496728576
+8192
 SET @@global.query_prealloc_size   = "test";
 ERROR 42000: Incorrect argument type to variable 'query_prealloc_size'
 SELECT @@global.query_prealloc_size  ;
 @@global.query_prealloc_size
-429496728576
+8192
 SET @@global.query_prealloc_size   = 'test';
 ERROR 42000: Incorrect argument type to variable 'query_prealloc_size'
 SELECT @@global.query_prealloc_size  ;
 @@global.query_prealloc_size
-429496728576
+8192
 SET @@global.query_prealloc_size   = ON;
 ERROR 42000: Incorrect argument type to variable 'query_prealloc_size'
 SELECT @@global.query_prealloc_size  ;
 @@global.query_prealloc_size
-429496728576
-SET @@session.query_prealloc_size   = 0;
-Warnings:
-Warning	1292	Truncated incorrect query_prealloc_size value: '0'
-SELECT @@session.query_prealloc_size  ;
-@@session.query_prealloc_size
 8192
-SET @@session.query_prealloc_size   = -2;
+SET @@session.query_prealloc_size   = 0;
 Warnings:
 Warning	1292	Truncated incorrect query_prealloc_size value: '0'
 SELECT @@session.query_prealloc_size  ;
diff --git a/mysql-test/suite/sys_vars/r/range_alloc_block_size_basic_64.result b/mysql-test/suite/sys_vars/r/range_alloc_block_size_basic_64.result
index 26ddfdd2bae..29bf939edac 100644
--- a/mysql-test/suite/sys_vars/r/range_alloc_block_size_basic_64.result
+++ b/mysql-test/suite/sys_vars/r/range_alloc_block_size_basic_64.result
@@ -71,7 +71,7 @@ SELECT @@global.range_alloc_block_size;
 4096
 SET @@global.range_alloc_block_size = -1024;
 Warnings:
-Warning	1292	Truncated incorrect range_alloc_block_size value: '0'
+Warning	1292	Truncated incorrect range_alloc_block_size value: '-1024'
 SELECT @@global.range_alloc_block_size;
 @@global.range_alloc_block_size
 4096
@@ -97,7 +97,7 @@ SELECT @@session.range_alloc_block_size;
 4096
 SET @@session.range_alloc_block_size = -2;
 Warnings:
-Warning	1292	Truncated incorrect range_alloc_block_size value: '0'
+Warning	1292	Truncated incorrect range_alloc_block_size value: '-2'
 SELECT @@session.range_alloc_block_size;
 @@session.range_alloc_block_size
 4096
diff --git a/mysql-test/suite/sys_vars/r/rpl_recovery_rank_basic_64.result b/mysql-test/suite/sys_vars/r/rpl_recovery_rank_basic_64.result
index 74a47fa0f08..9ec34c677e1 100644
--- a/mysql-test/suite/sys_vars/r/rpl_recovery_rank_basic_64.result
+++ b/mysql-test/suite/sys_vars/r/rpl_recovery_rank_basic_64.result
@@ -45,14 +45,20 @@ SET @@local.rpl_recovery_rank = 4;
 ERROR HY000: Variable 'rpl_recovery_rank' is a GLOBAL variable and should be set with SET GLOBAL
 '#------------------FN_DYNVARS_142_04-----------------------#'
 SET @@global.rpl_recovery_rank = -1;
+Warnings:
+Warning	1292	Truncated incorrect rpl_recovery_rank value: '-1'
 SELECT @@global.rpl_recovery_rank;
 @@global.rpl_recovery_rank
 0
 SET @@global.rpl_recovery_rank = -2147483648;
+Warnings:
+Warning	1292	Truncated incorrect rpl_recovery_rank value: '-2147483648'
 SELECT @@global.rpl_recovery_rank;
 @@global.rpl_recovery_rank
 0
 SET @@global.rpl_recovery_rank = -2147483649;
+Warnings:
+Warning	1292	Truncated incorrect rpl_recovery_rank value: '-2147483649'
 SELECT @@global.rpl_recovery_rank;
 @@global.rpl_recovery_rank
 0
diff --git a/mysql-test/suite/sys_vars/r/slave_transaction_retries_basic_64.result b/mysql-test/suite/sys_vars/r/slave_transaction_retries_basic_64.result
index 9434b14b238..6e0bc659f9e 100644
--- a/mysql-test/suite/sys_vars/r/slave_transaction_retries_basic_64.result
+++ b/mysql-test/suite/sys_vars/r/slave_transaction_retries_basic_64.result
@@ -55,6 +55,8 @@ SET @@local.slave_transaction_retries = 4;
 ERROR HY000: Variable 'slave_transaction_retries' is a GLOBAL variable and should be set with SET GLOBAL
 '#------------------FN_DYNVARS_149_05-----------------------#'
 SET @@global.slave_transaction_retries = -1;
+Warnings:
+Warning	1292	Truncated incorrect slave_transaction_retries value: '-1'
 SELECT @@global.slave_transaction_retries;
 @@global.slave_transaction_retries
 0
diff --git a/mysql-test/suite/sys_vars/r/sync_binlog_basic_64.result b/mysql-test/suite/sys_vars/r/sync_binlog_basic_64.result
index ffd1b3fc4f1..d3cc4e2a9c2 100644
--- a/mysql-test/suite/sys_vars/r/sync_binlog_basic_64.result
+++ b/mysql-test/suite/sys_vars/r/sync_binlog_basic_64.result
@@ -36,6 +36,8 @@ SELECT @@global.sync_binlog;
 65536
 '#--------------------FN_DYNVARS_168_04-------------------------#'
 SET @@global.sync_binlog = -1;
+Warnings:
+Warning	1292	Truncated incorrect sync_binlog value: '-1'
 SELECT @@global.sync_binlog;
 @@global.sync_binlog
 0
@@ -53,6 +55,8 @@ SELECT @@global.sync_binlog;
 @@global.sync_binlog
 10240022115
 SET @@global.sync_binlog = -1024;
+Warnings:
+Warning	1292	Truncated incorrect sync_binlog value: '-1024'
 SELECT @@global.sync_binlog;
 @@global.sync_binlog
 0
diff --git a/mysql-test/suite/sys_vars/r/transaction_alloc_block_size_basic_64.result b/mysql-test/suite/sys_vars/r/transaction_alloc_block_size_basic_64.result
index c968d6f108c..749df56c60b 100644
--- a/mysql-test/suite/sys_vars/r/transaction_alloc_block_size_basic_64.result
+++ b/mysql-test/suite/sys_vars/r/transaction_alloc_block_size_basic_64.result
@@ -67,7 +67,7 @@ SELECT @@global.transaction_alloc_block_size;
 1024
 SET @@global.transaction_alloc_block_size = -1024;
 Warnings:
-Warning	1292	Truncated incorrect transaction_alloc_block_size value: '0'
+Warning	1292	Truncated incorrect transaction_alloc_block_size value: '-1024'
 SELECT @@global.transaction_alloc_block_size;
 @@global.transaction_alloc_block_size
 1024
diff --git a/mysql-test/suite/sys_vars/r/transaction_prealloc_size_basic_64.result b/mysql-test/suite/sys_vars/r/transaction_prealloc_size_basic_64.result
index 2fb6451372f..3455b9479c0 100644
--- a/mysql-test/suite/sys_vars/r/transaction_prealloc_size_basic_64.result
+++ b/mysql-test/suite/sys_vars/r/transaction_prealloc_size_basic_64.result
@@ -66,7 +66,7 @@ SELECT @@global.transaction_prealloc_size;
 1024
 SET @@global.transaction_prealloc_size = -1024;
 Warnings:
-Warning	1292	Truncated incorrect transaction_prealloc_size value: '0'
+Warning	1292	Truncated incorrect transaction_prealloc_size value: '-1024'
 SELECT @@global.transaction_prealloc_size;
 @@global.transaction_prealloc_size
 1024
diff --git a/mysql-test/suite/sys_vars/r/wait_timeout_basic_64.result b/mysql-test/suite/sys_vars/r/wait_timeout_basic_64.result
index ae03e677e56..c9bffc61b6f 100644
--- a/mysql-test/suite/sys_vars/r/wait_timeout_basic_64.result
+++ b/mysql-test/suite/sys_vars/r/wait_timeout_basic_64.result
@@ -44,7 +44,7 @@ Warnings:
 Warning	1292	Truncated incorrect wait_timeout value: '0'
 SET @@global.wait_timeout = -1024;
 Warnings:
-Warning	1292	Truncated incorrect wait_timeout value: '0'
+Warning	1292	Truncated incorrect wait_timeout value: '-1024'
 'Bug # 34837: Errors are not coming on assigning invalid values to variable';
 SET @@global.wait_timeout = ON;
 ERROR 42000: Incorrect argument type to variable 'wait_timeout'