Commit 6c09775a authored by unknown's avatar unknown
Browse files

Don't use the MYSQL* returned from mysql_real_connect to overwrite the already...

Don't use the MYSQL* returned from mysql_real_connect to overwrite the already initalised mysql variable


client/mysqlslap.c:
  Only use the MYSQL* returned from mysql_reqal_connect as an indicator wether the connect was successfull or not.
  As the manual says about the return value from mysql_real_connect: "A MYSQL* connection handle if the connection
  was successful, NULL if the connection was unsuccessful. For a successful connection, the 
  return value is the same as the value of the first parameter."
parent ee326fd8
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -1132,7 +1132,7 @@ run_task(thread_context *con)
  my_lock(lock_file, F_RDLCK, 0, F_TO_EOF, MYF(0));
  if (!opt_only_print)
  {
    if (!(mysql= mysql_real_connect(mysql, host, user, opt_password,
    if (!(mysql_real_connect(mysql, host, user, opt_password,
                             create_schema_string,
                             opt_mysql_port,
                             opt_mysql_unix_port,