diff options
-rw-r--r-- | mysql-test/r/no_binlog.result | 2 | ||||
-rw-r--r-- | mysql-test/t/no_binlog.test | 4 | ||||
-rw-r--r-- | sql/sql_repl.cc | 2 |
3 files changed, 7 insertions, 1 deletions
diff --git a/mysql-test/r/no_binlog.result b/mysql-test/r/no_binlog.result new file mode 100644 index 00000000000..6ae267664fd --- /dev/null +++ b/mysql-test/r/no_binlog.result @@ -0,0 +1,2 @@ +SHOW BINARY LOGS; +ERROR HY000: You are not using binary logging diff --git a/mysql-test/t/no_binlog.test b/mysql-test/t/no_binlog.test new file mode 100644 index 00000000000..628a4ab8351 --- /dev/null +++ b/mysql-test/t/no_binlog.test @@ -0,0 +1,4 @@ +# BUG#50780: 'show binary logs' debug assertion when binary logging is disabled + +-- error ER_NO_BINARY_LOGGING +SHOW BINARY LOGS; diff --git a/sql/sql_repl.cc b/sql/sql_repl.cc index 4b10d284611..ae995ea5ed3 100644 --- a/sql/sql_repl.cc +++ b/sql/sql_repl.cc @@ -1606,7 +1606,7 @@ bool show_binlogs(THD* thd) if (!mysql_bin_log.is_open()) { my_message(ER_NO_BINARY_LOGGING, ER(ER_NO_BINARY_LOGGING), MYF(0)); - return 1; + DBUG_RETURN(TRUE); } field_list.push_back(new Item_empty_string("Log_name", 255)); |