summaryrefslogtreecommitdiff
path: root/sql/sql_yacc.yy
diff options
context:
space:
mode:
authoranozdrin/alik@quad. <>2008-02-22 13:30:33 +0300
committeranozdrin/alik@quad. <>2008-02-22 13:30:33 +0300
commit340906f46d5f3befc43daa71e1406475a0e24dd7 (patch)
tree3addb17d5ad1fc4ed36a5cfc04608c6864c99630 /sql/sql_yacc.yy
parent10dca4fd8df94bb45257f159a81ba765a7aff74c (diff)
downloadmariadb-git-340906f46d5f3befc43daa71e1406475a0e24dd7.tar.gz
Fix for Bug#30217: Views: changes in metadata behaviour
between 5.0 and 5.1. The problem was that in the patch for Bug#11986 it was decided to store original query in UTF8 encoding for the INFORMATION_SCHEMA. This approach however turned out to be quite difficult to implement properly. The main problem is to preserve the same IS-output after dump/restore. So, the fix is to rollback to the previous functionality, but also to fix it to support multi-character-set-queries properly. The idea is to generate INFORMATION_SCHEMA-query from the item-tree after parsing view declaration. The IS-query should: - be completely in UTF8; - not contain character set introducers. For more information, see WL4052.
Diffstat (limited to 'sql/sql_yacc.yy')
-rw-r--r--sql/sql_yacc.yy22
1 files changed, 1 insertions, 21 deletions
diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy
index f1689b28719..7c669851db4 100644
--- a/sql/sql_yacc.yy
+++ b/sql/sql_yacc.yy
@@ -12005,27 +12005,7 @@ view_tail:
if (!lex->select_lex.add_table_to_list(thd, $3, NULL, TL_OPTION_UPDATING))
MYSQL_YYABORT;
}
- view_list_opt AS
- {
- THD *thd= YYTHD;
- Lex_input_stream *lip= thd->m_lip;
-
- lip->body_utf8_start(thd, lip->get_cpp_ptr());
- }
- view_select
- {
- THD *thd= YYTHD;
- LEX *lex= thd->lex;
- Lex_input_stream *lip= thd->m_lip;
-
- lip->body_utf8_append(lip->get_cpp_ptr());
-
- lex->view_body_utf8.str= thd->strmake(lip->get_body_utf8_str(),
- lip->get_body_utf8_length());
- lex->view_body_utf8.length= lip->get_body_utf8_length();
-
- trim_whitespace(&my_charset_utf8_general_ci, &lex->view_body_utf8);
- }
+ view_list_opt AS view_select
;
view_list_opt: