diff options
author | unknown <bell@sanja.is.com.ua> | 2005-12-02 21:18:12 +0200 |
---|---|---|
committer | unknown <bell@sanja.is.com.ua> | 2005-12-02 21:18:12 +0200 |
commit | 4202271065969a00c310f832cd496cb6f3c095e5 (patch) | |
tree | 68ef4b9d68ef96bb3c8739f3c040c31da4baf232 /sql/sql_view.cc | |
parent | 84da27f67a99a4bbf1bc50712841f33dcb0a0458 (diff) | |
download | mariadb-git-4202271065969a00c310f832cd496cb6f3c095e5.tar.gz |
Now we shall store only position (index of first character)
of SELECT from query begining, to be independet of query buffer
allocation.
Correct procedure used to find beginning of the current statement
during parsing (BUG#14885).
mysql-test/r/view.result:
BUG#14885 test suite.
mysql-test/t/view.test:
BUG#14885 test suite.
sql/sp_head.cc:
The debug print statement fixed to prevent crash in case of NULL
in m_next_cached_sp.
sql/sql_lex.h:
Now we shall store only position (index of first character)
of SELECT from query beginning.
sql/sql_view.cc:
Position of the SELECT used to output it to .frm.
sql/sql_yacc.yy:
Now we shall store only position (index of first character)
of SELECT from query beginning.
Correct procedure used to find beginning of the current statement
during parsing.
Diffstat (limited to 'sql/sql_view.cc')
-rw-r--r-- | sql/sql_view.cc | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sql/sql_view.cc b/sql/sql_view.cc index e03d3b22b89..3ca592dfd44 100644 --- a/sql/sql_view.cc +++ b/sql/sql_view.cc @@ -641,10 +641,9 @@ static int mysql_register_view(THD *thd, TABLE_LIST *view, /* fill structure */ view->query.str= (char*)str.ptr(); view->query.length= str.length()-1; // we do not need last \0 - view->source.str= thd->lex->create_view_select_start; + view->source.str= thd->query + thd->lex->create_view_select_start; view->source.length= (thd->query_length - - (thd->lex->create_view_select_start - - thd->lex->create_view_start)); + thd->lex->create_view_select_start); view->file_version= 1; view->calc_md5(md5); view->md5.str= md5; |