Commit a00d38e9 authored by unknown's avatar unknown
Browse files

bug #25890 (mysqltest_embedded crashes on start)

binlog_filter and rpl_filter are initialized in server's 'main' function
which doesn't work in the embedded server. So this code moved to
function working in both cases.


sql/mysqld.cc:
  rpl_filter/binlog_filter initializations moved to
  init_common_variables() function.
  That will be called by both 'standalone' and 'embedded' servers
parent 6db6be5a
Loading
Loading
Loading
Loading
+8 −8
Original line number Diff line number Diff line
@@ -2613,6 +2613,14 @@ static int init_common_variables(const char *conf_file_name, int argc,

  max_system_variables.pseudo_thread_id= (ulong)~0;
  start_time=time((time_t*) 0);
  rpl_filter= new Rpl_filter;
  binlog_filter= new Rpl_filter;
  if (!rpl_filter || !binlog_filter) 
  {
    sql_perror("Could not allocate replication and binlog filters");
    exit(1);
  }

  if (init_thread_environment())
    return 1;
  mysql_init_variables();
@@ -3473,14 +3481,6 @@ int main(int argc, char **argv)
  MY_INIT(argv[0]);		// init my_sys library & pthreads
  /* nothing should come before this line ^^^ */

  rpl_filter= new Rpl_filter;
  binlog_filter= new Rpl_filter;
  if (!rpl_filter || !binlog_filter) 
  {
    sql_perror("Could not allocate replication and binlog filters");
    exit(1);
  }

  /*
    Perform basic logger initialization logger. Should be called after
    MY_INIT, as it initializes mutexes. Log tables are inited later.