List:Commits« Previous MessageNext Message »
From:Harin Vadodaria Date:September 27 2012 10:49am
Subject:bzr push into mysql-trunk branch (harin.vadodaria:4574 to 4575) Bug#14658683
View as plain text  
 4575 Harin Vadodaria	2012-09-27 [merge]
      Bug#14658683: INTRODUCE DEPRECATION WARNINGS FOR SYSTEM
                    VARIABLES RELATED TO PROFILING
            
      Description: Merge from mysql-5.6 to mysql-trunk.

    modified:
      mysql-test/r/show_profile.result
      mysql-test/r/wl6443_deprecation.result
      mysql-test/suite/sys_vars/r/have_profiling_basic.result
      mysql-test/suite/sys_vars/r/profiling_basic.result
      mysql-test/suite/sys_vars/r/profiling_h_size_basic.result
      mysql-test/t/profiling.test
      mysql-test/t/wl6443_deprecation.test
      sql/sys_vars.cc
 4574 Venkatesh Duggirala	2012-09-27 [merge]
      Null-merge from 5.6 for BUG#12776842

=== modified file 'mysql-test/r/show_profile.result'
--- a/mysql-test/r/show_profile.result	2012-08-31 21:54:56 +0000
+++ b/mysql-test/r/show_profile.result	2012-09-27 10:48:50 +0000
@@ -1,12 +1,17 @@
 SET profiling = 1;
+Warnings:
+Warning	1287	'@@profiling' is deprecated and will be removed in a future release.
 SELECT 1;
 1
 1
 SHOW PROFILES;
 Query_ID	Duration	Query
-1	#	SELECT 1
+1	#	SHOW WARNINGS
+2	#	SELECT 1
 Warnings:
 Warning	#	'SHOW PROFILES' is deprecated and will be removed in a future release. Please use Performance Schema instead
 SHOW PROFILE FOR QUERY 1;
 SHOW PROFILE CPU FOR QUERY 1;
 SET profiling = 0;
+Warnings:
+Warning	1287	'@@profiling' is deprecated and will be removed in a future release.

=== modified file 'mysql-test/r/wl6443_deprecation.result'
--- a/mysql-test/r/wl6443_deprecation.result	2012-08-31 21:54:56 +0000
+++ b/mysql-test/r/wl6443_deprecation.result	2012-09-27 10:48:50 +0000
@@ -40,6 +40,42 @@ Warning	1287	'@@max_tmp_tables' is depre
 set @@global.max_tmp_tables= @default_max_tmp_tables;
 Warnings:
 Warning	1287	'@@max_tmp_tables' is deprecated and will be removed in a future release.
+select @@global.profiling;
+@@global.profiling
+0
+Warnings:
+Warning	1287	'@@profiling' is deprecated and will be removed in a future release.
+select @@local.profiling;
+@@local.profiling
+0
+Warnings:
+Warning	1287	'@@profiling' is deprecated and will be removed in a future release.
+select @@global.profiling_history_size;
+@@global.profiling_history_size
+15
+Warnings:
+Warning	1287	'@@profiling_history_size' is deprecated and will be removed in a future release.
+select @@local.profiling_history_size;
+@@local.profiling_history_size
+15
+Warnings:
+Warning	1287	'@@profiling_history_size' is deprecated and will be removed in a future release.
+select @@global.have_profiling;
+@@global.have_profiling
+YES
+Warnings:
+Warning	1287	'@@have_profiling' is deprecated and will be removed in a future release.
+set @@local.profiling= @@global.profiling;
+Warnings:
+Warning	1287	'@@profiling' is deprecated and will be removed in a future release.
+Warning	1287	'@@profiling' is deprecated and will be removed in a future release.
+set @@local.profiling_history_size= @@global.profiling_history_size;
+Warnings:
+Warning	1287	'@@profiling_history_size' is deprecated and will be removed in a future release.
+Warning	1287	'@@profiling_history_size' is deprecated and will be removed in a future release.
+set @wl6443_have_profiling= @@global.have_profiling;
+Warnings:
+Warning	1287	'@@have_profiling' is deprecated and will be removed in a future release.
 # SHOW PROFILE and SHOW PROFILES
 SHOW PROFILE;
 Status	Duration

=== modified file 'mysql-test/suite/sys_vars/r/have_profiling_basic.result'
--- a/mysql-test/suite/sys_vars/r/have_profiling_basic.result	2009-12-22 09:35:56 +0000
+++ b/mysql-test/suite/sys_vars/r/have_profiling_basic.result	2012-09-27 10:47:43 +0000
@@ -1,6 +1,8 @@
 select @@global.have_profiling="1";
 @@global.have_profiling="1"
 0
+Warnings:
+Warning	1287	'@@have_profiling' is deprecated and will be removed in a future release.
 select @@session.have_profiling;
 ERROR HY000: Variable 'have_profiling' is a GLOBAL variable
 show global variables like 'have_profiling';

=== modified file 'mysql-test/suite/sys_vars/r/profiling_basic.result'
--- a/mysql-test/suite/sys_vars/r/profiling_basic.result	2010-01-29 06:33:00 +0000
+++ b/mysql-test/suite/sys_vars/r/profiling_basic.result	2012-09-27 10:47:43 +0000
@@ -1,13 +1,19 @@
 SET @start_global_value = @@global.profiling;
+Warnings:
+Warning	1287	'@@profiling' is deprecated and will be removed in a future release.
 SELECT @start_global_value;
 @start_global_value
 0
 select @@global.profiling;
 @@global.profiling
 0
+Warnings:
+Warning	1287	'@@profiling' is deprecated and will be removed in a future release.
 select @@session.profiling;
 @@session.profiling
 0
+Warnings:
+Warning	1287	'@@profiling' is deprecated and will be removed in a future release.
 show global variables like 'profiling';
 Variable_name	Value
 profiling	OFF
@@ -21,13 +27,21 @@ select * from information_schema.session
 VARIABLE_NAME	VARIABLE_VALUE
 PROFILING	OFF
 set global profiling=1;
+Warnings:
+Warning	1287	'@@profiling' is deprecated and will be removed in a future release.
 set session profiling=ON;
+Warnings:
+Warning	1287	'@@profiling' is deprecated and will be removed in a future release.
 select @@global.profiling;
 @@global.profiling
 1
+Warnings:
+Warning	1287	'@@profiling' is deprecated and will be removed in a future release.
 select @@session.profiling;
 @@session.profiling
 1
+Warnings:
+Warning	1287	'@@profiling' is deprecated and will be removed in a future release.
 show global variables like 'profiling';
 Variable_name	Value
 profiling	ON
@@ -41,13 +55,21 @@ select * from information_schema.session
 VARIABLE_NAME	VARIABLE_VALUE
 PROFILING	ON
 set global profiling=0;
+Warnings:
+Warning	1287	'@@profiling' is deprecated and will be removed in a future release.
 set session profiling=OFF;
+Warnings:
+Warning	1287	'@@profiling' is deprecated and will be removed in a future release.
 select @@global.profiling;
 @@global.profiling
 0
+Warnings:
+Warning	1287	'@@profiling' is deprecated and will be removed in a future release.
 select @@session.profiling;
 @@session.profiling
 0
+Warnings:
+Warning	1287	'@@profiling' is deprecated and will be removed in a future release.
 show global variables like 'profiling';
 Variable_name	Value
 profiling	OFF
@@ -67,6 +89,10 @@ ERROR 42000: Incorrect argument type to
 set global profiling="foo";
 ERROR 42000: Variable 'profiling' can't be set to the value of 'foo'
 SET @@global.profiling = @start_global_value;
+Warnings:
+Warning	1287	'@@profiling' is deprecated and will be removed in a future release.
 SELECT @@global.profiling;
 @@global.profiling
 0
+Warnings:
+Warning	1287	'@@profiling' is deprecated and will be removed in a future release.

=== modified file 'mysql-test/suite/sys_vars/r/profiling_h_size_basic.result'
--- a/mysql-test/suite/sys_vars/r/profiling_h_size_basic.result	2012-07-05 09:48:23 +0000
+++ b/mysql-test/suite/sys_vars/r/profiling_h_size_basic.result	2012-09-27 10:47:43 +0000
@@ -1,13 +1,19 @@
 SET @start_global_value = @@global.profiling_history_size;
+Warnings:
+Warning	1287	'@@profiling_history_size' is deprecated and will be removed in a future release.
 SELECT @start_global_value;
 @start_global_value
 15
 select @@global.profiling_history_size;
 @@global.profiling_history_size
 15
+Warnings:
+Warning	1287	'@@profiling_history_size' is deprecated and will be removed in a future release.
 select @@session.profiling_history_size;
 @@session.profiling_history_size
 15
+Warnings:
+Warning	1287	'@@profiling_history_size' is deprecated and will be removed in a future release.
 show global variables like 'profiling_history_size';
 Variable_name	Value
 profiling_history_size	15
@@ -21,13 +27,21 @@ select * from information_schema.session
 VARIABLE_NAME	VARIABLE_VALUE
 PROFILING_HISTORY_SIZE	15
 set global profiling_history_size=10;
+Warnings:
+Warning	1287	'@@profiling_history_size' is deprecated and will be removed in a future release.
 set session profiling_history_size=20;
+Warnings:
+Warning	1287	'@@profiling_history_size' is deprecated and will be removed in a future release.
 select @@global.profiling_history_size;
 @@global.profiling_history_size
 10
+Warnings:
+Warning	1287	'@@profiling_history_size' is deprecated and will be removed in a future release.
 select @@session.profiling_history_size;
 @@session.profiling_history_size
 20
+Warnings:
+Warning	1287	'@@profiling_history_size' is deprecated and will be removed in a future release.
 show global variables like 'profiling_history_size';
 Variable_name	Value
 profiling_history_size	10
@@ -47,16 +61,27 @@ ERROR 42000: Incorrect argument type to
 set global profiling_history_size="foo";
 ERROR 42000: Incorrect argument type to variable 'profiling_history_size'
 set session profiling_history_size=0;
+Warnings:
+Warning	1287	'@@profiling_history_size' is deprecated and will be removed in a future release.
 select @@profiling_history_size;
 @@profiling_history_size
 0
+Warnings:
+Warning	1287	'@@profiling_history_size' is deprecated and will be removed in a future release.
 set session profiling_history_size=101;
 Warnings:
+Warning	1287	'@@profiling_history_size' is deprecated and will be removed in a future release.
 Warning	1292	Truncated incorrect profiling_history_size value: '101'
 select @@profiling_history_size;
 @@profiling_history_size
 100
+Warnings:
+Warning	1287	'@@profiling_history_size' is deprecated and will be removed in a future release.
 SET @@global.profiling_history_size = @start_global_value;
+Warnings:
+Warning	1287	'@@profiling_history_size' is deprecated and will be removed in a future release.
 SELECT @@global.profiling_history_size;
 @@global.profiling_history_size
 15
+Warnings:
+Warning	1287	'@@profiling_history_size' is deprecated and will be removed in a future release.

=== modified file 'mysql-test/t/profiling.test'
--- a/mysql-test/t/profiling.test	2012-08-31 21:54:56 +0000
+++ b/mysql-test/t/profiling.test	2012-09-27 10:48:50 +0000
@@ -9,20 +9,28 @@ show profile all;
 
 # default is OFF
 show session variables like 'profil%';
+--disable_warnings
 select @@profiling;
+--enable_warnings
 
 # But size is okay
+--disable_warnings
 set @start_value= @@global.profiling_history_size;
 set global profiling_history_size=100;
+--enable_warnings
 show global variables like 'profil%';
 
 # turn on for testing
+--disable_warnings
 set session profiling = ON;
 set session profiling_history_size=30;  # small enough to overflow
+--enable_warnings
 
 # verify it is active
 show session variables like 'profil%';
+--disable_warnings
 select @@profiling;
+--enable_warnings
 
 #   Profiling is a descriptive look into the way the server operated
 #   in retrospect.  Chad doesn't think it's wise to include the result
@@ -142,14 +150,22 @@ show profiles;
 ##  Verify that the various juggling of THD contexts doesn't affect profiling.
 
 ##  Functions and procedures
+--disable_warnings
 set session profiling = ON;
 select @@profiling;
+--enable_warnings
 create function f1() returns varchar(50) return 'hello';
+--disable_warnings
 select @@profiling;
+--enable_warnings
 select * from t1 where id <> f1();
+--disable_warnings
 select @@profiling;
+--enable_warnings
 
+--disable_warnings
 set session profiling = OFF;
+--enable_warnings
 drop table if exists profile_log;
 create table profile_log (how_many int);
 
@@ -208,49 +224,75 @@ drop procedure if exists p3;
 drop table if exists profile_log;
 
 ##  Triggers
+--disable_warnings
 set session profiling = ON;
+--enable_warnings
 drop table if exists t2;
 create table t2 (id int not null);
 create trigger t2_bi before insert on t2 for each row set @x=0;
+--disable_warnings
 select @@profiling;
+--enable_warnings
 insert into t2 values (1), (2), (3);
+--disable_warnings
 select @@profiling;
+--enable_warnings
 
 ##  ALTER TABLE
+--disable_warnings
 set session profiling = ON;
+--enable_warnings
 drop table if exists t1, t2;
 create table t1 (id int not null primary key);
 create table t2 (id int not null primary key, id1 int not null);
+--disable_warnings
 select @@profiling;
+--enable_warnings
 alter table t2 add foreign key (id1) references t1 (id) on delete cascade;
+--disable_warnings
 select @@profiling;
+--enable_warnings
 
 ##  Table LOCKing
 lock table t1 write; 
+--disable_warnings
 select @@profiling;
+--enable_warnings
 unlock table; 
+--disable_warnings
 select @@profiling;
+--enable_warnings
 
 ##  Transactions
 set autocommit=0;
+--disable_warnings
 select @@profiling, @@autocommit;
+--enable_warnings
 begin;
+--disable_warnings
 select @@profiling;
+--enable_warnings
 insert into t1 values (1);
 insert into t2 values (1,1);
 --echo testing referential integrity cascade
 delete from t1 where id = 1;
+--disable_warnings
 select @@profiling;
+--enable_warnings
 --echo testing rollback
 --disable_warnings
 rollback;
---enable_warnings
 select @@profiling;
+--enable_warnings
 --echo testing commit
 begin;
+--disable_warnings
 select @@profiling;
+--enable_warnings
 commit;
+--disable_warnings
 select @@profiling;
+--enable_warnings
 
 drop table if exists t1, t2, t3;
 drop view if exists v1;
@@ -263,7 +305,9 @@ drop function if exists f1;
 
 
 ## last thing in the file
+--disable_warnings
 set session profiling = OFF;
 set global profiling_history_size= @start_value;
+--enable_warnings
 ##
 --echo End of 5.0 tests

=== modified file 'mysql-test/t/wl6443_deprecation.test'
--- a/mysql-test/t/wl6443_deprecation.test	2012-08-31 21:54:56 +0000
+++ b/mysql-test/t/wl6443_deprecation.test	2012-09-27 10:48:50 +0000
@@ -16,6 +16,14 @@ select @@global.datetime_format;
 set @@global.max_tmp_tables= 64;
 set @@global.max_tmp_tables= @@global.max_tmp_tables;
 set @@global.max_tmp_tables= @default_max_tmp_tables;
+select @@global.profiling;
+select @@local.profiling;
+select @@global.profiling_history_size;
+select @@local.profiling_history_size;
+select @@global.have_profiling;
+set @@local.profiling= @@global.profiling;
+set @@local.profiling_history_size= @@global.profiling_history_size;
+set @wl6443_have_profiling= @@global.have_profiling;
 
 --echo # SHOW PROFILE and SHOW PROFILES
 

=== modified file 'sql/sys_vars.cc'
--- a/sql/sys_vars.cc	2012-08-31 21:54:56 +0000
+++ b/sql/sys_vars.cc	2012-09-27 10:48:50 +0000
@@ -3289,12 +3289,14 @@ static Sys_var_bit Sys_unique_checks(
 static Sys_var_bit Sys_profiling(
        "profiling", "profiling",
        SESSION_VAR(option_bits), NO_CMD_LINE, OPTION_PROFILING,
-       DEFAULT(FALSE));
+       DEFAULT(FALSE), NO_MUTEX_GUARD, NOT_IN_BINLOG, ON_CHECK(0),
+       ON_UPDATE(0), DEPRECATED(""));
 
 static Sys_var_ulong Sys_profiling_history_size(
        "profiling_history_size", "Limit of query profiling memory",
        SESSION_VAR(profiling_history_size), CMD_LINE(REQUIRED_ARG),
-       VALID_RANGE(0, 100), DEFAULT(15), BLOCK_SIZE(1));
+       VALID_RANGE(0, 100), DEFAULT(15), BLOCK_SIZE(1), NO_MUTEX_GUARD,
+       NOT_IN_BINLOG, ON_CHECK(0), ON_UPDATE(0), DEPRECATED(""));
 #endif
 
 static Sys_var_harows Sys_select_limit(
@@ -3677,7 +3679,8 @@ static Sys_var_have Sys_have_openssl(
 
 static Sys_var_have Sys_have_profiling(
        "have_profiling", "have_profiling",
-       READ_ONLY GLOBAL_VAR(have_profiling), NO_CMD_LINE);
+       READ_ONLY GLOBAL_VAR(have_profiling), NO_CMD_LINE, NO_MUTEX_GUARD,
+       NOT_IN_BINLOG, ON_CHECK(0), ON_UPDATE(0), DEPRECATED(""));
 
 static Sys_var_have Sys_have_query_cache(
        "have_query_cache", "have_query_cache",

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-trunk branch (harin.vadodaria:4574 to 4575) Bug#14658683Harin Vadodaria27 Sep