Loading Docs/manual.texi +3 −0 Original line number Diff line number Diff line Loading @@ -46890,6 +46890,9 @@ not yet 100% confident in this code. @appendixsubsec Changes in release 3.23.49 @itemize @bullet @item Don't give warning for statement that is only a comment; This is needed for @code{mysqldump --disable-keys} to work. @item Fixed unlikely caching bug when doing a join without keys. In this case the last used field for a table always returned @code{NULL}. @item mysql-test/t/comments.test +2 −1 Original line number Diff line number Diff line Loading @@ -5,7 +5,7 @@ select 1+2/*hello*/+3; select 1 /* long multi line comment */; !$1065 /* empty query */; !$1065 ; select 1 /*!32301 +1 */; select 1 /*!52301 +1 */; select 1--1; Loading @@ -15,3 +15,4 @@ select 1 --2 +1; select 1 # The rest of the row will be ignored ; /* line with only comment */; sql/mysql_priv.h +2 −1 Original line number Diff line number Diff line Loading @@ -158,7 +158,8 @@ void kill_one_thread(THD *thd, ulong id); #define OPTION_LOW_PRIORITY_UPDATES 8192 #define OPTION_WARNINGS 16384 #define OPTION_AUTO_IS_NULL 32768 #define OPTION_SAFE_UPDATES 65536L*2 #define OPTION_FOUND_COMMENT 65536L #define OPTION_SAFE_UPDATES OPTION_FOUND_COMMENT*2 #define OPTION_BUFFER_RESULT OPTION_SAFE_UPDATES*2 #define OPTION_BIN_LOG OPTION_BUFFER_RESULT*2 #define OPTION_NOT_AUTO_COMMIT OPTION_BIN_LOG*2 Loading sql/sql_lex.cc +2 −0 Original line number Diff line number Diff line Loading @@ -734,6 +734,7 @@ int yylex(void *arg) return(TEXT_STRING); case STATE_COMMENT: // Comment lex->options|= OPTION_FOUND_COMMENT; while ((c = yyGet()) != '\n' && c) ; yyUnget(); // Safety against eof state = STATE_START; // Try again Loading @@ -745,6 +746,7 @@ int yylex(void *arg) break; } yySkip(); // Skip '*' lex->options|= OPTION_FOUND_COMMENT; if (yyPeek() == '!') // MySQL command in comment { ulong version=MYSQL_VERSION_ID; Loading sql/sql_lex.h +1 −1 Original line number Diff line number Diff line Loading @@ -53,7 +53,7 @@ enum enum_sql_command { SQLCOM_BEGIN, SQLCOM_LOAD_MASTER_TABLE, SQLCOM_CHANGE_MASTER, SQLCOM_RENAME_TABLE, SQLCOM_BACKUP_TABLE, SQLCOM_RESTORE_TABLE, SQLCOM_RESET, SQLCOM_PURGE, SQLCOM_SHOW_BINLOGS, SQLCOM_SHOW_OPEN_TABLES, SQLCOM_DO, SQLCOM_SHOW_OPEN_TABLES, SQLCOM_DO, SQLCOM_EMPTY_QUERY, SQLCOM_END }; Loading Loading
Docs/manual.texi +3 −0 Original line number Diff line number Diff line Loading @@ -46890,6 +46890,9 @@ not yet 100% confident in this code. @appendixsubsec Changes in release 3.23.49 @itemize @bullet @item Don't give warning for statement that is only a comment; This is needed for @code{mysqldump --disable-keys} to work. @item Fixed unlikely caching bug when doing a join without keys. In this case the last used field for a table always returned @code{NULL}. @item
mysql-test/t/comments.test +2 −1 Original line number Diff line number Diff line Loading @@ -5,7 +5,7 @@ select 1+2/*hello*/+3; select 1 /* long multi line comment */; !$1065 /* empty query */; !$1065 ; select 1 /*!32301 +1 */; select 1 /*!52301 +1 */; select 1--1; Loading @@ -15,3 +15,4 @@ select 1 --2 +1; select 1 # The rest of the row will be ignored ; /* line with only comment */;
sql/mysql_priv.h +2 −1 Original line number Diff line number Diff line Loading @@ -158,7 +158,8 @@ void kill_one_thread(THD *thd, ulong id); #define OPTION_LOW_PRIORITY_UPDATES 8192 #define OPTION_WARNINGS 16384 #define OPTION_AUTO_IS_NULL 32768 #define OPTION_SAFE_UPDATES 65536L*2 #define OPTION_FOUND_COMMENT 65536L #define OPTION_SAFE_UPDATES OPTION_FOUND_COMMENT*2 #define OPTION_BUFFER_RESULT OPTION_SAFE_UPDATES*2 #define OPTION_BIN_LOG OPTION_BUFFER_RESULT*2 #define OPTION_NOT_AUTO_COMMIT OPTION_BIN_LOG*2 Loading
sql/sql_lex.cc +2 −0 Original line number Diff line number Diff line Loading @@ -734,6 +734,7 @@ int yylex(void *arg) return(TEXT_STRING); case STATE_COMMENT: // Comment lex->options|= OPTION_FOUND_COMMENT; while ((c = yyGet()) != '\n' && c) ; yyUnget(); // Safety against eof state = STATE_START; // Try again Loading @@ -745,6 +746,7 @@ int yylex(void *arg) break; } yySkip(); // Skip '*' lex->options|= OPTION_FOUND_COMMENT; if (yyPeek() == '!') // MySQL command in comment { ulong version=MYSQL_VERSION_ID; Loading
sql/sql_lex.h +1 −1 Original line number Diff line number Diff line Loading @@ -53,7 +53,7 @@ enum enum_sql_command { SQLCOM_BEGIN, SQLCOM_LOAD_MASTER_TABLE, SQLCOM_CHANGE_MASTER, SQLCOM_RENAME_TABLE, SQLCOM_BACKUP_TABLE, SQLCOM_RESTORE_TABLE, SQLCOM_RESET, SQLCOM_PURGE, SQLCOM_SHOW_BINLOGS, SQLCOM_SHOW_OPEN_TABLES, SQLCOM_DO, SQLCOM_SHOW_OPEN_TABLES, SQLCOM_DO, SQLCOM_EMPTY_QUERY, SQLCOM_END }; Loading