1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Added MariaDB executable comment syntax: /*M!##### */

client/mysql.cc:
  Don't remove MariaDB executable comments.
mysql-test/r/comments.result:
  Test MariaDB executable comments.
mysql-test/r/mysql.result:
  Test MariaDB executable comments.
mysql-test/t/comments.test:
  Test MariaDB executable comments.
mysql-test/t/mysql.test:
  Test MariaDB executable comments.
sql/sql_cache.cc:
  Don't delete MariaDB executable comments.
sql/sql_lex.cc:
  Handle MariaDB executable comments
This commit is contained in:
Michael Widenius
2011-08-29 18:14:14 +03:00
parent 2df1914791
commit 282c303746
7 changed files with 62 additions and 21 deletions

View File

@ -491,11 +491,12 @@ static void make_base_query(String *new_query,
continue; // Continue with next symbol
case '/': // Start of comment ?
/*
Comment of format /#!number #/, must be skipped.
Comment of format /#!number #/ or /#M!number #/, must be skipped.
These may include '"' and other comments, but it should
be safe to parse the content as a normal string.
*/
if (query[0] != '*' || query[1] == '!')
if (query[0] != '*' || query[1] == '!' ||
(query[1] == 'M' && query[2] == '!'))
break;
query++; // skip "/"