diff options
author | Andrei Elkin <aelkin@mysql.com> | 2009-12-01 21:07:18 +0200 |
---|---|---|
committer | Andrei Elkin <aelkin@mysql.com> | 2009-12-01 21:07:18 +0200 |
commit | 0eda48463ce9c60408515819f9d954fd48567d4f (patch) | |
tree | 39a60b9bbefbde5c02b040d381c8fd5d0c0dc0ea /sql/mysql_priv.h | |
parent | 3c11750e363da6e1017d5bc86e9e7e03b2c4e101 (diff) | |
parent | 80cb81069b43978da39ad99cf7d23fc52deb95d6 (diff) | |
download | mariadb-git-0eda48463ce9c60408515819f9d954fd48567d4f.tar.gz |
Manual resolving for the following files
Text conflict in mysql-test/collections/default.experimental
Text conflict in mysql-test/r/show_check.result
Text conflict in mysql-test/r/sp-code.result
Text conflict in mysql-test/suite/binlog/r/binlog_tmp_table.result
Text conflict in mysql-test/suite/rpl/t/disabled.def
Text conflict in mysql-test/t/show_check.test
Text conflict in mysys/my_delete.c
Text conflict in sql/item.h
Text conflict in sql/item_cmpfunc.h
Text conflict in sql/log.cc
Text conflict in sql/mysqld.cc
Text conflict in sql/repl_failsafe.cc
Text conflict in sql/slave.cc
Text conflict in sql/sql_parse.cc
Text conflict in sql/sql_table.cc
Text conflict in sql/sql_yacc.yy
Text conflict in storage/myisam/ha_myisam.cc
Corrected results for
stm_auto_increment_bug33029.reject 2009-12-01
20:01:49.000000000 +0300
<andrei> @@ -42,9 +42,6 @@
<andrei> RETURN i;
<andrei> END//
<andrei> CALL p1();
<andrei> -Warnings:
<andrei> -Note 1592 Statement may not be safe to log in statement
format.
<andrei> -Note 1592 Statement may not be safe to log in statement
format.
There should be indeed no Note present because there is in fact autoincrement
top-level query in sp() that triggers inserting in yet another auto-inc table.
(todo: alert DaoGang to improve the test).
Diffstat (limited to 'sql/mysql_priv.h')
-rw-r--r-- | sql/mysql_priv.h | 39 |
1 files changed, 29 insertions, 10 deletions
diff --git a/sql/mysql_priv.h b/sql/mysql_priv.h index c6454679e28..43546334199 100644 --- a/sql/mysql_priv.h +++ b/sql/mysql_priv.h @@ -121,16 +121,35 @@ char* query_table_status(THD *thd,const char *db,const char *table_name); #define PREV_BITS(type,A) ((type) (((type) 1 << (A)) -1)) #define all_bits_set(A,B) ((A) & (B) != (B)) -#define WARN_DEPRECATED(Thd,Ver,Old,New) \ - do { \ - DBUG_ASSERT(strncmp(Ver, MYSQL_SERVER_VERSION, sizeof(Ver)-1) > 0); \ - if (((uchar*)Thd) != NULL) \ - push_warning_printf(((THD *)Thd), MYSQL_ERROR::WARN_LEVEL_WARN, \ - ER_WARN_DEPRECATED_SYNTAX, ER(ER_WARN_DEPRECATED_SYNTAX_WITH_VER), \ - (Old), (Ver), (New)); \ - else \ - sql_print_warning("The syntax '%s' is deprecated and will be removed " \ - "in MySQL %s. Please use %s instead.", (Old), (Ver), (New)); \ +/* + Generates a warning that a feature is deprecated. After a specified + version asserts that the feature is removed. + + Using it as + + WARN_DEPRECATED(thd, 6,2, "BAD", "'GOOD'"); + + Will result in a warning + + "The syntax 'BAD' is deprecated and will be removed in MySQL 6.2. Please + use 'GOOD' instead" + + Note that in macro arguments BAD is not quoted, while 'GOOD' is. + Note that the version is TWO numbers, separated with a comma + (two macro arguments, that is) +*/ +#define WARN_DEPRECATED(Thd,VerHi,VerLo,Old,New) \ + do { \ + compile_time_assert(MYSQL_VERSION_ID < VerHi * 10000 + VerLo * 100); \ + if (((THD *) Thd) != NULL) \ + push_warning_printf(((THD *) Thd), MYSQL_ERROR::WARN_LEVEL_WARN, \ + ER_WARN_DEPRECATED_SYNTAX, \ + ER(ER_WARN_DEPRECATED_SYNTAX_WITH_VER), \ + (Old), #VerHi "." #VerLo, (New)); \ + else \ + sql_print_warning("The syntax '%s' is deprecated and will be removed " \ + "in MySQL %s. Please use %s instead.", \ + (Old), #VerHi "." #VerLo, (New)); \ } while(0) extern MYSQL_PLUGIN_IMPORT CHARSET_INFO *system_charset_info; |