Commit b0e567a4 authored by unknown's avatar unknown

for every deprecated feature say when it will be removed.

restore CREATE TABLE ... TYPE=engine until 5.2
parent b51baf6b
......@@ -6,26 +6,26 @@ Table Op Msg_type Msg_text
test.t4 backup error Failed copying .frm file (errno: X)
test.t4 backup status Operation failed
Warnings:
Warning 1540 The 'BACKUP TABLE' statement is deprecated and will be removed in MySQL 5.2. Please use client programs (e.g. mysqldump, mysql, MySQL Administrator) instead.
Warning 1540 The syntax 'BACKUP TABLE' is deprecated and will be removed in MySQL 5.2. Please use MySQL Administrator (mysqldump, mysql) instead.
Error 1 Can't create/write to file 'MYSQLTEST_VARDIR/bogus/t4.frm' (Errcode: X)
backup table t4 to '../tmp';
Table Op Msg_type Msg_text
test.t4 backup status OK
Warnings:
Warning 1540 The 'BACKUP TABLE' statement is deprecated and will be removed in MySQL 5.2. Please use client programs (e.g. mysqldump, mysql, MySQL Administrator) instead.
Warning 1540 The syntax 'BACKUP TABLE' is deprecated and will be removed in MySQL 5.2. Please use MySQL Administrator (mysqldump, mysql) instead.
backup table t4 to '../tmp';
Table Op Msg_type Msg_text
test.t4 backup error Failed copying .frm file (errno: X)
test.t4 backup status Operation failed
Warnings:
Warning 1540 The 'BACKUP TABLE' statement is deprecated and will be removed in MySQL 5.2. Please use client programs (e.g. mysqldump, mysql, MySQL Administrator) instead.
Warning 1540 The syntax 'BACKUP TABLE' is deprecated and will be removed in MySQL 5.2. Please use MySQL Administrator (mysqldump, mysql) instead.
Error 1 Can't create/write to file 'MYSQLTEST_VARDIR/tmp/t4.frm' (Errcode: X)
drop table t4;
restore table t4 from '../tmp';
Table Op Msg_type Msg_text
test.t4 restore status OK
Warnings:
Warning 1540 The 'RESTORE TABLE' statement is deprecated and will be removed in MySQL 5.2. Please use client programs (e.g. mysqldump, mysql, MySQL Administrator) instead.
Warning 1540 The syntax 'RESTORE TABLE' is deprecated and will be removed in MySQL 5.2. Please use MySQL Administrator (mysqldump, mysql) instead.
select count(*) from t4;
count(*)
0
......@@ -35,19 +35,19 @@ backup table t1 to '../tmp';
Table Op Msg_type Msg_text
test.t1 backup status OK
Warnings:
Warning 1540 The 'BACKUP TABLE' statement is deprecated and will be removed in MySQL 5.2. Please use client programs (e.g. mysqldump, mysql, MySQL Administrator) instead.
Warning 1540 The syntax 'BACKUP TABLE' is deprecated and will be removed in MySQL 5.2. Please use MySQL Administrator (mysqldump, mysql) instead.
drop table t1;
restore table t1 from '../bogus';
Table Op Msg_type Msg_text
t1 restore error Failed copying .frm file
Warnings:
Warning 1540 The 'RESTORE TABLE' statement is deprecated and will be removed in MySQL 5.2. Please use client programs (e.g. mysqldump, mysql, MySQL Administrator) instead.
Warning 1540 The syntax 'RESTORE TABLE' is deprecated and will be removed in MySQL 5.2. Please use MySQL Administrator (mysqldump, mysql) instead.
Error 29 File 'MYSQLTEST_VARDIR/bogus/t1.frm' not found (Errcode: X)
restore table t1 from '../tmp';
Table Op Msg_type Msg_text
test.t1 restore status OK
Warnings:
Warning 1540 The 'RESTORE TABLE' statement is deprecated and will be removed in MySQL 5.2. Please use client programs (e.g. mysqldump, mysql, MySQL Administrator) instead.
Warning 1540 The syntax 'RESTORE TABLE' is deprecated and will be removed in MySQL 5.2. Please use MySQL Administrator (mysqldump, mysql) instead.
select n from t1;
n
23
......@@ -62,7 +62,7 @@ Table Op Msg_type Msg_text
test.t2 backup status OK
test.t3 backup status OK
Warnings:
Warning 1540 The 'BACKUP TABLE' statement is deprecated and will be removed in MySQL 5.2. Please use client programs (e.g. mysqldump, mysql, MySQL Administrator) instead.
Warning 1540 The syntax 'BACKUP TABLE' is deprecated and will be removed in MySQL 5.2. Please use MySQL Administrator (mysqldump, mysql) instead.
drop table t1,t2,t3;
restore table t1,t2,t3 from '../tmp';
Table Op Msg_type Msg_text
......@@ -70,7 +70,7 @@ test.t1 restore status OK
test.t2 restore status OK
test.t3 restore status OK
Warnings:
Warning 1540 The 'RESTORE TABLE' statement is deprecated and will be removed in MySQL 5.2. Please use client programs (e.g. mysqldump, mysql, MySQL Administrator) instead.
Warning 1540 The syntax 'RESTORE TABLE' is deprecated and will be removed in MySQL 5.2. Please use MySQL Administrator (mysqldump, mysql) instead.
select n from t1;
n
23
......@@ -91,7 +91,7 @@ restore table t1 from '../tmp';
Table Op Msg_type Msg_text
test.t1 restore status OK
Warnings:
Warning 1540 The 'RESTORE TABLE' statement is deprecated and will be removed in MySQL 5.2. Please use client programs (e.g. mysqldump, mysql, MySQL Administrator) instead.
Warning 1540 The syntax 'RESTORE TABLE' is deprecated and will be removed in MySQL 5.2. Please use MySQL Administrator (mysqldump, mysql) instead.
rename table t1 to t5;
lock tables t5 write;
backup table t5 to '../tmp';
......@@ -99,5 +99,5 @@ unlock tables;
Table Op Msg_type Msg_text
test.t5 backup status OK
Warnings:
Warning 1540 The 'BACKUP TABLE' statement is deprecated and will be removed in MySQL 5.2. Please use client programs (e.g. mysqldump, mysql, MySQL Administrator) instead.
Warning 1540 The syntax 'BACKUP TABLE' is deprecated and will be removed in MySQL 5.2. Please use MySQL Administrator (mysqldump, mysql) instead.
drop table t5;
......@@ -319,7 +319,7 @@ use db_bug7787;
CREATE PROCEDURE p1()
SHOW INNODB STATUS;
Warnings:
Warning 1287 'SHOW INNODB STATUS' is deprecated; use 'SHOW ENGINE INNODB STATUS' instead
Warning 1540 The syntax 'SHOW INNODB STATUS' is deprecated and will be removed in MySQL 5.2. Please use 'SHOW ENGINE INNODB STATUS' instead.
GRANT EXECUTE ON PROCEDURE p1 TO user_bug7787@localhost;
DROP DATABASE db_bug7787;
use test;
......@@ -100,13 +100,13 @@ create table t1 (t2 timestamp(2), t4 timestamp(4), t6 timestamp(6),
t8 timestamp(8), t10 timestamp(10), t12 timestamp(12),
t14 timestamp(14));
Warnings:
Warning 1287 'TIMESTAMP(2)' is deprecated; use 'TIMESTAMP' instead
Warning 1287 'TIMESTAMP(4)' is deprecated; use 'TIMESTAMP' instead
Warning 1287 'TIMESTAMP(6)' is deprecated; use 'TIMESTAMP' instead
Warning 1287 'TIMESTAMP(8)' is deprecated; use 'TIMESTAMP' instead
Warning 1287 'TIMESTAMP(10)' is deprecated; use 'TIMESTAMP' instead
Warning 1287 'TIMESTAMP(12)' is deprecated; use 'TIMESTAMP' instead
Warning 1287 'TIMESTAMP(14)' is deprecated; use 'TIMESTAMP' instead
Warning 1540 The syntax 'TIMESTAMP(2)' is deprecated and will be removed in MySQL 5.2. Please use 'TIMESTAMP' instead.
Warning 1540 The syntax 'TIMESTAMP(4)' is deprecated and will be removed in MySQL 5.2. Please use 'TIMESTAMP' instead.
Warning 1540 The syntax 'TIMESTAMP(6)' is deprecated and will be removed in MySQL 5.2. Please use 'TIMESTAMP' instead.
Warning 1540 The syntax 'TIMESTAMP(8)' is deprecated and will be removed in MySQL 5.2. Please use 'TIMESTAMP' instead.
Warning 1540 The syntax 'TIMESTAMP(10)' is deprecated and will be removed in MySQL 5.2. Please use 'TIMESTAMP' instead.
Warning 1540 The syntax 'TIMESTAMP(12)' is deprecated and will be removed in MySQL 5.2. Please use 'TIMESTAMP' instead.
Warning 1540 The syntax 'TIMESTAMP(14)' is deprecated and will be removed in MySQL 5.2. Please use 'TIMESTAMP' instead.
insert t1 values (0,0,0,0,0,0,0),
("1997-12-31 23:47:59", "1997-12-31 23:47:59", "1997-12-31 23:47:59",
"1997-12-31 23:47:59", "1997-12-31 23:47:59", "1997-12-31 23:47:59",
......
......@@ -168,7 +168,7 @@ max_error_count 10
drop table t1;
set table_type=MYISAM;
Warnings:
Warning 1287 'table_type' is deprecated; use 'storage_engine' instead
Warning 1540 The syntax 'table_type' is deprecated and will be removed in MySQL 5.2. Please use 'storage_engine' instead.
create table t1 (a int);
insert into t1 (a) values (1), (2), (3), (4), (5), (6), (7), (8), (9), (10);
update t1 set a='abc';
......
......@@ -92,6 +92,15 @@ 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); \
push_warning_printf(((THD *)Thd), MYSQL_ERROR::WARN_LEVEL_WARN, \
ER_WARN_DEPRECATED, ER(ER_WARN_DEPRECATED), \
(Old), (Ver), (New)); \
} while(0)
extern CHARSET_INFO *system_charset_info, *files_charset_info ;
extern CHARSET_INFO *national_charset_info, *table_alias_charset;
......
......@@ -2775,7 +2775,7 @@ static bool set_log_update(THD *thd, set_var *var)
See sql/mysqld.cc/, comments in function init_server_components() for an
explaination of the different warnings we send below
*/
if (opt_sql_bin_update)
{
((sys_var_thd_bit*) var->var)->bit_flag|= (OPTION_BIN_LOG |
......@@ -3256,10 +3256,7 @@ bool sys_var_thd_storage_engine::update(THD *thd, set_var *var)
void sys_var_thd_table_type::warn_deprecated(THD *thd)
{
push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
ER_WARN_DEPRECATED_SYNTAX,
ER(ER_WARN_DEPRECATED_SYNTAX), "table_type",
"storage_engine");
WARN_DEPRECATED(thd, "5.2", "table_type", "'storage_engine'");
}
void sys_var_thd_table_type::set_default(THD *thd, enum_var_type type)
......@@ -3516,10 +3513,8 @@ bool process_key_caches(int (* func) (const char *name, KEY_CACHE *))
void sys_var_trust_routine_creators::warn_deprecated(THD *thd)
{
push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
ER_WARN_DEPRECATED_SYNTAX,
ER(ER_WARN_DEPRECATED_SYNTAX), "log_bin_trust_routine_creators",
"log_bin_trust_function_creators");
WARN_DEPRECATED(thd, "5.2", "log_bin_trust_routine_creators",
"'log_bin_trust_function_creators'");
}
void sys_var_trust_routine_creators::set_default(THD *thd, enum_var_type type)
......
......@@ -5018,7 +5018,7 @@ ER_UNKNOWN_STORAGE_ENGINE 42000
ger "Unbekannte Speicher-Engine '%s'"
por "Motor de tabela desconhecido '%s'"
spa "Desconocido motor de tabla '%s'"
ER_WARN_DEPRECATED_SYNTAX
ER_UNUSED_1
eng "'%s' is deprecated; use '%s' instead"
ger "'%s' ist veraltet. Bitte benutzen Sie '%s'"
por "'%s' desatualizado. Use '%s' em seu lugar"
......@@ -5810,8 +5810,8 @@ ER_ILLEGAL_HA_CREATE_OPTION
eng "Table storage engine '%-.64s' does not support the create option '%.64s'"
ER_CANT_CHANGE_TX_ISOLATION 25001
eng "Transaction isolation level can't be changed while a transaction is in progress"
ER_WARN_DEPRECATED_STATEMENT
eng "The '%s' statement is deprecated and will be removed in MySQL %s. Please use client programs (e.g. %s) instead."
ER_WARN_DEPRECATED
eng "The syntax '%s' is deprecated and will be removed in MySQL %s. Please use %s instead."
ER_SP_NO_AGGREGATE 42000
eng "AGGREGATE is not supported for stored functions"
ER_TEMP_TABLE_PREVENTS_SWITCH_OUT_OF_RBR
......
......@@ -5919,10 +5919,7 @@ bool add_field_to_list(THD *thd, char *field_name, enum_field_types type,
*/
char buf[32];
my_snprintf(buf, sizeof(buf), "TIMESTAMP(%s)", length);
push_warning_printf(thd,MYSQL_ERROR::WARN_LEVEL_WARN,
ER_WARN_DEPRECATED_SYNTAX,
ER(ER_WARN_DEPRECATED_SYNTAX),
buf, "TIMESTAMP");
WARN_DEPRECATED(thd, "5.2", buf, "'TIMESTAMP'");
}
if (!(new_field= new create_field()) ||
......
......@@ -48,12 +48,7 @@ const LEX_STRING null_lex_str={0,0};
#define yyoverflow(A,B,C,D,E,F) {ulong val= *(F); if (my_yyoverflow((B), (D), &val)) { yyerror((char*) (A)); return 2; } else { *(F)= (YYSIZE_T)val; }}
#define WARN_DEPRECATED(A,B) \
push_warning_printf(((THD *)yythd), MYSQL_ERROR::WARN_LEVEL_WARN, \
ER_WARN_DEPRECATED_SYNTAX, \
ER(ER_WARN_DEPRECATED_SYNTAX), (A), (B));
#define YYERROR_UNLESS(A) \
#define YYERROR_UNLESS(A) \
if (!(A)) \
{ \
yyerror(ER(ER_SYNTAX_ERROR)); \
......@@ -4006,6 +4001,13 @@ create_table_options:
create_table_option:
ENGINE_SYM opt_equal storage_engines { Lex->create_info.db_type= $3; Lex->create_info.used_fields|= HA_CREATE_USED_ENGINE; }
| TYPE_SYM opt_equal storage_engines
{
Lex->create_info.db_type= $3;
WARN_DEPRECATED(yythd, "5.2", "TYPE=storage_engine",
"'ENGINE=storage_engine'");
Lex->create_info.used_fields|= HA_CREATE_USED_ENGINE;
}
| MAX_ROWS opt_equal ulonglong_num { Lex->create_info.max_rows= $3; Lex->create_info.used_fields|= HA_CREATE_USED_MAX_ROWS;}
| MIN_ROWS opt_equal ulonglong_num { Lex->create_info.min_rows= $3; Lex->create_info.used_fields|= HA_CREATE_USED_MIN_ROWS;}
| AVG_ROW_LENGTH opt_equal ulong_num { Lex->create_info.avg_row_length=$3; Lex->create_info.used_fields|= HA_CREATE_USED_AVG_ROW_LENGTH;}
......@@ -5362,11 +5364,8 @@ restore:
RESTORE_SYM table_or_tables
{
Lex->sql_command = SQLCOM_RESTORE_TABLE;
push_warning_printf(((THD *)yythd), MYSQL_ERROR::WARN_LEVEL_WARN,
ER_WARN_DEPRECATED_STATEMENT,
ER(ER_WARN_DEPRECATED_STATEMENT),
"RESTORE TABLE", "5.2",
"mysqldump, mysql, MySQL Administrator");
WARN_DEPRECATED(yythd, "5.2", "RESTORE TABLE",
"MySQL Administrator (mysqldump, mysql)");
}
table_list FROM TEXT_STRING_sys
{
......@@ -5377,11 +5376,8 @@ backup:
BACKUP_SYM table_or_tables
{
Lex->sql_command = SQLCOM_BACKUP_TABLE;
push_warning_printf(((THD *)yythd), MYSQL_ERROR::WARN_LEVEL_WARN,
ER_WARN_DEPRECATED_STATEMENT,
ER(ER_WARN_DEPRECATED_STATEMENT),
"BACKUP TABLE", "5.2",
"mysqldump, mysql, MySQL Administrator");
WARN_DEPRECATED(yythd, "5.2", "BACKUP TABLE",
"MySQL Administrator (mysqldump, mysql)");
}
table_list TO_SYM TEXT_STRING_sys
{
......@@ -8224,7 +8220,7 @@ show_param:
{
LEX *lex=Lex;
lex->sql_command= SQLCOM_SHOW_STORAGE_ENGINES;
WARN_DEPRECATED("SHOW TABLE TYPES", "SHOW [STORAGE] ENGINES");
WARN_DEPRECATED(yythd, "5.2", "SHOW TABLE TYPES", "'SHOW [STORAGE] ENGINES'");
}
| opt_storage ENGINES_SYM
{
......@@ -8260,7 +8256,7 @@ show_param:
lex->option_type= $1;
if (prepare_schema_table(YYTHD, lex, 0, SCH_STATUS))
YYABORT;
}
}
| INNOBASE_SYM STATUS_SYM
{
LEX *lex= Lex;
......@@ -8271,19 +8267,19 @@ show_param:
my_error(ER_UNKNOWN_STORAGE_ENGINE, MYF(0), "InnoDB");
YYABORT;
}
WARN_DEPRECATED("SHOW INNODB STATUS", "SHOW ENGINE INNODB STATUS");
WARN_DEPRECATED(yythd, "5.2", "SHOW INNODB STATUS", "'SHOW ENGINE INNODB STATUS'");
}
| MUTEX_SYM STATUS_SYM
{
LEX *lex= Lex;
lex->sql_command = SQLCOM_SHOW_ENGINE_MUTEX;
lex->sql_command = SQLCOM_SHOW_ENGINE_MUTEX;
if (!(lex->create_info.db_type=
ha_resolve_by_legacy_type(YYTHD, DB_TYPE_INNODB)))
{
my_error(ER_UNKNOWN_STORAGE_ENGINE, MYF(0), "InnoDB");
YYABORT;
}
WARN_DEPRECATED("SHOW MUTEX STATUS", "SHOW ENGINE INNODB MUTEX");
WARN_DEPRECATED(yythd, "5.2", "SHOW MUTEX STATUS", "'SHOW ENGINE INNODB MUTEX'");
}
| opt_full PROCESSLIST_SYM
{ Lex->sql_command= SQLCOM_SHOW_PROCESSLIST;}
......@@ -8322,7 +8318,7 @@ show_param:
my_error(ER_UNKNOWN_STORAGE_ENGINE, MYF(0), "BerkeleyDB");
YYABORT;
}
WARN_DEPRECATED("SHOW BDB LOGS", "SHOW ENGINE BDB LOGS");
WARN_DEPRECATED(yythd, "5.2", "SHOW BDB LOGS", "'SHOW ENGINE BDB LOGS'");
}
| LOGS_SYM
{
......@@ -8334,7 +8330,7 @@ show_param:
my_error(ER_UNKNOWN_STORAGE_ENGINE, MYF(0), "BerkeleyDB");
YYABORT;
}
WARN_DEPRECATED("SHOW LOGS", "SHOW ENGINE BDB LOGS");
WARN_DEPRECATED(yythd, "5.2", "SHOW LOGS", "'SHOW ENGINE BDB LOGS'");
}
| GRANTS
{
......@@ -8688,11 +8684,8 @@ load: LOAD DATA_SYM
LOAD TABLE_SYM table_ident FROM MASTER_SYM
{
LEX *lex=Lex;
push_warning_printf(((THD *)yythd), MYSQL_ERROR::WARN_LEVEL_WARN,
ER_WARN_DEPRECATED_STATEMENT,
ER(ER_WARN_DEPRECATED_STATEMENT),
"LOAD TABLE FROM MASTER", "5.2",
"mysqldump, mysql, MySQL Administrator");
WARN_DEPRECATED(yythd, "5.2", "LOAD TABLE FROM MASTER",
"MySQL Administrator (mysqldump, mysql)");
if (lex->sphead)
{
my_error(ER_SP_BADSTATEMENT, MYF(0), "LOAD TABLE");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment