Commit 1e80c3f3 authored by monty@donna.mysql.fi's avatar monty@donna.mysql.fi
Browse files

Don't use ranges on HEAP tables with LIKE

Don't reconnect client on close
parent 561c18c1
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -1657,6 +1657,7 @@ mysql_close(MYSQL *mysql)
    {
      free_old_query(mysql);
      mysql->status=MYSQL_STATUS_READY; /* Force command */
      mysql->reconnect=0;
      simple_command(mysql,COM_QUIT,NullS,0,1);
      end_server(mysql);
    }
+1 −1
Original line number Diff line number Diff line
@@ -79,7 +79,7 @@ f1 f2
12	ted
12	ted
table	type	possible_keys	key	key_len	ref	rows	Extra
t1	range	btn	btn	10	NULL	10	where used
t1	ALL	btn	NULL	NULL	NULL	14	where used
btn
table	type	possible_keys	key	key_len	ref	rows	Extra
t1	ALL	btn	NULL	NULL	NULL	14	where used
+1 −1
Original line number Diff line number Diff line
@@ -363,7 +363,7 @@ void Field::store_time(TIME *ltime,timestamp_type type)

bool Field::optimize_range()
{
  return test(table->file->option_flag() & HA_ONLY_WHOLE_INDEX);
  return test(table->file->option_flag() & HA_READ_NEXT);
}

/****************************************************************************
+0 −7
Original line number Diff line number Diff line
@@ -78,10 +78,3 @@ class ha_heap: public handler
			     enum thr_lock_type lock_type);

};






+5 −0
Original line number Diff line number Diff line
@@ -384,12 +384,16 @@ my_bool STDCALL mc_mysql_reconnect(MYSQL *mysql)
  MYSQL tmp_mysql;
  DBUG_ENTER("mc_mysql_reconnect");

  if (!mysql->reconnect)
    DBUG_RETURN(1);

  mc_mysql_init(&tmp_mysql);
  tmp_mysql.options=mysql->options;
  if (!mc_mysql_connect(&tmp_mysql,mysql->host,mysql->user,mysql->passwd,
			  mysql->db, mysql->port, mysql->unix_socket,
			  mysql->client_flag))
    {
      tmp_mysql.reconnect=0;
      mc_mysql_close(&tmp_mysql); 
      DBUG_RETURN(1);
    }
@@ -793,6 +797,7 @@ mc_mysql_close(MYSQL *mysql)
    {
      mc_free_old_query(mysql);
      mysql->status=MYSQL_STATUS_READY; /* Force command */
      mysql->reconnect=0;
      mc_simple_command(mysql,COM_QUIT,NullS,0,1);
      mc_end_server(mysql);
    }
Loading