Merge lp:~linuxjedi/drizzle/trunk-bug-702582 into lp:drizzle/7.0

Proposed by Andrew Hutchings
Status: Merged
Approved by: Brian Aker
Approved revision: 2132
Merged at revision: 2132
Proposed branch: lp:~linuxjedi/drizzle/trunk-bug-702582
Merge into: lp:drizzle/7.0
Diff against target: 104 lines (+27/-3)
7 files modified
drizzled/error.cc (+1/-1)
drizzled/error_t.h (+2/-2)
drizzled/show.cc (+10/-0)
drizzled/show.h (+1/-0)
drizzled/sql_yacc.yy (+5/-0)
tests/r/show_check.result (+2/-0)
tests/t/show_check.test (+6/-0)
To merge this branch: bzr merge lp:~linuxjedi/drizzle/trunk-bug-702582
Reviewer Review Type Date Requested Status
Drizzle Developers Pending
Review via email: mp+48019@code.launchpad.net

Description of the change

Add error indicating the use of data_dictionary for SHOW engine_name STATUS

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'drizzled/error.cc'
2--- drizzled/error.cc 2011-01-29 23:08:49 +0000
3+++ drizzled/error.cc 2011-01-31 16:37:16 +0000
4@@ -580,7 +580,7 @@
5 ADD_ERROR_MESSAGE(ER_CATALOG_NO_LOCK, N_("Could not gain lock on '%s'."));
6 ADD_ERROR_MESSAGE(ER_CORRUPT_CATALOG_DEFINITION, N_("Corrupt or invalid catalog definition for '%s' : '%s'."));
7 ADD_ERROR_MESSAGE(ER_WRONG_NAME_FOR_CATALOG, N_("Invalid catalog name."));
8-
9+ ADD_ERROR_MESSAGE(ER_USE_DATA_DICTIONARY, N_("Engine status is now stored in the data_dictionary tables, please use these instead."));
10
11 }
12
13
14=== modified file 'drizzled/error_t.h'
15--- drizzled/error_t.h 2011-01-29 23:08:49 +0000
16+++ drizzled/error_t.h 2011-01-31 16:37:16 +0000
17@@ -864,10 +864,10 @@
18 ER_INVALID_TIME_VALUE,
19 ER_INVALID_DATE_VALUE,
20 ER_TRANSACTIONAL_DDL_NOT_SUPPORTED,
21-
22+ ER_USE_DATA_DICTIONARY,
23 // Leave ER_INVALID_BOOLEAN_VALUE as LAST, and force people to use tags
24 // instead of numbers in error messages in test.
25- ER_ERROR_LAST= ER_TRANSACTIONAL_DDL_NOT_SUPPORTED
26+ ER_ERROR_LAST= ER_USE_DATA_DICTIONARY
27 };
28
29
30
31=== modified file 'drizzled/show.cc'
32--- drizzled/show.cc 2011-01-25 07:18:43 +0000
33+++ drizzled/show.cc 2011-01-31 16:37:16 +0000
34@@ -305,6 +305,16 @@
35 return true;
36 }
37
38+bool buildEngineStatus(Session *session, LEX_STRING)
39+{
40+ session->getLex()->sql_command= SQLCOM_SELECT;
41+ drizzled::statement::Show *select= new statement::Show(session);
42+ session->getLex()->statement= select;
43+
44+ my_error(ER_USE_DATA_DICTIONARY);
45+ return false;
46+}
47+
48 bool buildColumns(Session *session, const char *schema_ident, Table_ident *table_ident)
49 {
50 session->getLex()->sql_command= SQLCOM_SELECT;
51
52=== modified file 'drizzled/show.h'
53--- drizzled/show.h 2011-01-26 19:15:55 +0000
54+++ drizzled/show.h 2011-01-31 16:37:16 +0000
55@@ -66,6 +66,7 @@
56 bool buildProcesslist(Session *session);
57 bool buildScemas(Session *session);
58 bool buildStatus(Session *session, const drizzled::sql_var_t is_global);
59+bool buildEngineStatus(Session *session, LEX_STRING);
60 bool buildTableStatus(Session *session, const char *ident);
61 bool buildTables(Session *session, const char *ident);
62 bool buildTemporaryTables(Session *session);
63
64=== modified file 'drizzled/sql_yacc.yy'
65--- drizzled/sql_yacc.yy 2011-01-28 02:32:26 +0000
66+++ drizzled/sql_yacc.yy 2011-01-31 16:37:16 +0000
67@@ -4591,6 +4591,11 @@
68 if (not show::buildStatus(YYSession, $1))
69 DRIZZLE_YYABORT;
70 }
71+ | engine_option_value STATUS_SYM
72+ {
73+ if (not show::buildEngineStatus(YYSession, $1))
74+ DRIZZLE_YYABORT;
75+ }
76 | CREATE TABLE_SYM table_ident
77 {
78 if (not show::buildCreateTable(YYSession, $3))
79
80=== modified file 'tests/r/show_check.result'
81--- tests/r/show_check.result 2011-01-08 10:35:13 +0000
82+++ tests/r/show_check.result 2011-01-31 16:37:16 +0000
83@@ -502,4 +502,6 @@
84 drop table `été`;
85 show columns from `#mysql50#????????`;
86 Got one of the listed errors
87+show innodb status;
88+ERROR HY000: Engine status is now stored in the data_dictionary tables, please use these instead.
89 End of 5.1 tests
90
91=== modified file 'tests/t/show_check.test'
92--- tests/t/show_check.test 2011-01-02 06:09:12 +0000
93+++ tests/t/show_check.test 2011-01-31 16:37:16 +0000
94@@ -351,4 +351,10 @@
95 --error ER_NO_SUCH_TABLE,ER_FILE_NOT_FOUND
96 show columns from `#mysql50#????????`;
97
98+#
99+# Test error output for SHOW engine_name STATUS
100+#
101+--error ER_USE_DATA_DICTIONARY
102+show innodb status;
103+
104 --echo End of 5.1 tests

Subscribers

People subscribed via source and target branches