summaryrefslogtreecommitdiff
path: root/sql/sql_lex.cc
diff options
context:
space:
mode:
authorunknown <rburnett@bk-internal.mysql.com>2006-08-03 16:54:06 +0200
committerunknown <rburnett@bk-internal.mysql.com>2006-08-03 16:54:06 +0200
commit6017f911e33c3a44e6b7b090215446300c38b7be (patch)
tree2e0b33c7cd3f1083dce485137fd952b52a37dfbd /sql/sql_lex.cc
parent6e5d9284ed35fbf8dbe1af01e45923c3109aa7ad (diff)
parent3c8150b79bf5302879897e0d1ebd594798bb419e (diff)
downloadmariadb-git-6017f911e33c3a44e6b7b090215446300c38b7be.tar.gz
Merge bk-internal.mysql.com:/data0/bk/mysql-5.0
into bk-internal.mysql.com:/data0/bk/mysql-5.0-kt client/mysql.cc: Auto merged mysql-test/r/im_life_cycle.result: Auto merged mysql-test/t/im_life_cycle.imtest: Auto merged sql/sql_lex.cc: Auto merged sql/sql_show.cc: Auto merged sql/sql_view.cc: Auto merged sql/table.h: Auto merged
Diffstat (limited to 'sql/sql_lex.cc')
-rw-r--r--sql/sql_lex.cc25
1 files changed, 25 insertions, 0 deletions
diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc
index 5a355cedca5..563ebce4ff7 100644
--- a/sql/sql_lex.cc
+++ b/sql/sql_lex.cc
@@ -126,6 +126,7 @@ void lex_start(THD *thd, uchar *buf,uint length)
lex->param_list.empty();
lex->view_list.empty();
lex->prepared_stmt_params.empty();
+ lex->auxiliary_table_list.empty();
lex->unit.next= lex->unit.master=
lex->unit.link_next= lex->unit.return_to= 0;
lex->unit.prev= lex->unit.link_prev= 0;
@@ -1050,6 +1051,30 @@ int MYSQLlex(void *arg, void *yythd)
}
}
+
+/*
+ Skip comment in the end of statement.
+
+ SYNOPSIS
+ skip_rear_comments()
+ begin pointer to the beginning of statement
+ end pointer to the end of statement
+
+ DESCRIPTION
+ The function is intended to trim comments at the end of the statement.
+
+ RETURN
+ Pointer to the last non-comment symbol of the statement.
+*/
+
+uchar *skip_rear_comments(uchar *begin, uchar *end)
+{
+ while (begin < end && (end[-1] <= ' ' || end[-1] == '*' ||
+ end[-1] == '/' || end[-1] == ';'))
+ end-= 1;
+ return end;
+}
+
/*
st_select_lex structures initialisations
*/