Loading Docs/manual.texi +4 −2 Original line number Diff line number Diff line Loading @@ -24953,10 +24953,12 @@ summary of commands: @tab Stops the slave thread. (Slave) @item @code{SET SQL_LOG_BIN=0} @tab Disables update logging (Master) @tab Disables update logging if the user has process privilege. Ignored otherwise (Master) @item @code{SET SQL_LOG_BIN=1} @tab Re-enable update logging (Master) @tab Re-enable update logging if the user has process privilege. Ignored otherwise (Master) @item @code{RESET MASTER} @tab Deletes all binary logs listed in the index file, resetting the binlog client/mysqltest.c +29 −2 Original line number Diff line number Diff line Loading @@ -73,6 +73,7 @@ struct query int has_result_set; int first_word_len; int abort_on_error; uint expected_errno; char record_file[MAX_RECORD_FILE]; }; Loading Loading @@ -382,19 +383,28 @@ int read_query(struct query* q) { char buf[MAX_QUERY]; char* p = buf,* p1 ; int c; int c, expected_errno; q->record_file[0] = 0; q->abort_on_error = 1; q->has_result_set = 0; q->first_word_len = 0; q->expected_errno = 0; if(read_line(buf, sizeof(buf))) return 1; if(buf[0] == '!') if(*p == '!') { q->abort_on_error = 0; p++; if(*p == '$') { expected_errno = 0; p++; for(;isdigit(*p);p++) expected_errno = expected_errno * 10 + *p - '0'; q->expected_errno = expected_errno; } } while(*p && isspace(*p)) p++ ; Loading Loading @@ -629,6 +639,15 @@ int run_query(MYSQL* mysql, struct query* q) die("query '%s' failed: %s", q->q, mysql_error(mysql)); else { if(q->expected_errno) { error = (q->expected_errno != mysql_errno(mysql)); if(error) verbose_msg("query '%s' failed with wrong errno\ %d instead of %d", q->q, mysql_errno(mysql), q->expected_errno); goto end; } verbose_msg("query '%s' failed: %s", q->q, mysql_error(mysql)); /* if we do not abort on error, failure to run the query does not fail the whole test case Loading @@ -637,6 +656,14 @@ int run_query(MYSQL* mysql, struct query* q) } } if(q->expected_errno) { error = 1; verbose_msg("query '%s' succeeded - should have failed with errno %d", q->q, q->expected_errno); goto end; } if(!q->has_result_set) goto end; Loading Loading
Docs/manual.texi +4 −2 Original line number Diff line number Diff line Loading @@ -24953,10 +24953,12 @@ summary of commands: @tab Stops the slave thread. (Slave) @item @code{SET SQL_LOG_BIN=0} @tab Disables update logging (Master) @tab Disables update logging if the user has process privilege. Ignored otherwise (Master) @item @code{SET SQL_LOG_BIN=1} @tab Re-enable update logging (Master) @tab Re-enable update logging if the user has process privilege. Ignored otherwise (Master) @item @code{RESET MASTER} @tab Deletes all binary logs listed in the index file, resetting the binlog
client/mysqltest.c +29 −2 Original line number Diff line number Diff line Loading @@ -73,6 +73,7 @@ struct query int has_result_set; int first_word_len; int abort_on_error; uint expected_errno; char record_file[MAX_RECORD_FILE]; }; Loading Loading @@ -382,19 +383,28 @@ int read_query(struct query* q) { char buf[MAX_QUERY]; char* p = buf,* p1 ; int c; int c, expected_errno; q->record_file[0] = 0; q->abort_on_error = 1; q->has_result_set = 0; q->first_word_len = 0; q->expected_errno = 0; if(read_line(buf, sizeof(buf))) return 1; if(buf[0] == '!') if(*p == '!') { q->abort_on_error = 0; p++; if(*p == '$') { expected_errno = 0; p++; for(;isdigit(*p);p++) expected_errno = expected_errno * 10 + *p - '0'; q->expected_errno = expected_errno; } } while(*p && isspace(*p)) p++ ; Loading Loading @@ -629,6 +639,15 @@ int run_query(MYSQL* mysql, struct query* q) die("query '%s' failed: %s", q->q, mysql_error(mysql)); else { if(q->expected_errno) { error = (q->expected_errno != mysql_errno(mysql)); if(error) verbose_msg("query '%s' failed with wrong errno\ %d instead of %d", q->q, mysql_errno(mysql), q->expected_errno); goto end; } verbose_msg("query '%s' failed: %s", q->q, mysql_error(mysql)); /* if we do not abort on error, failure to run the query does not fail the whole test case Loading @@ -637,6 +656,14 @@ int run_query(MYSQL* mysql, struct query* q) } } if(q->expected_errno) { error = 1; verbose_msg("query '%s' succeeded - should have failed with errno %d", q->q, q->expected_errno); goto end; } if(!q->has_result_set) goto end; Loading