Commit 93c01808 authored by sasha@mysql.sashanet.com's avatar sasha@mysql.sashanet.com
Browse files

Merge work.mysql.com:/home/bk/mysql

into mysql.sashanet.com:/home/sasha/src/bk/mysql
parents d250a4ee f43e7910
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -280,3 +280,5 @@ mysql-test/rpl000011.test
mysql-test/var/lib/mysql-bin.007
sql/share/norwegian/errmsg.sys
sql/share/norwegian-ny/errmsg.sys
mysql-test/r/3.23/rpl000001.b.result.reject
mysql-test/r/3.23/rpl000012.result.reject
+27 −0
Original line number Diff line number Diff line
@@ -78,6 +78,7 @@ struct query
};

static void die(const char* fmt, ...);
int close_connection(struct query* q);


int hex_val(int c)
@@ -155,6 +156,30 @@ int select_connection(struct query* q)
  return 1;
}

int close_connection(struct query* q)
{
  char* p, *name;
  struct connection *con;
  p = (char*)q->q + q->first_word_len;
  while(*p && isspace(*p)) p++;
  if(!*p)
    die("Missing connection name in connect\n");
  name = p;
  while(*p && !isspace(*p))
    p++;
  *p = 0;
  
  for(con = cons; con < next_con; con++)
    if(!strcmp(con->name, name))
      {
	mysql_close(&con->mysql);
	return 0;
      }

  die("connection '%s' not found in connection pool", name);
  return 1;
}


/* this one now is a hack - we may want to improve in in the
   future to handle quotes. For now we assume that anything that is not
@@ -851,6 +876,8 @@ int main(int argc, char** argv)
	do_connect(&q);
      else if(check_first_word(&q, "connection", 10))
	select_connection(&q);
      else if(check_first_word(&q, "disconnect", 10))
	close_connection(&q);
      else if(check_first_word(&q, "source", 6))
	do_source(&q);
      else if(check_first_word(&q, "sleep", 5))
+4 −4
Original line number Diff line number Diff line
@@ -6,7 +6,7 @@
# to start mysqld yourself and run mysqltest -r

RESULT_DIR=r/3.23
if [ -z $EDITOR] then;
if [ -z $EDITOR] ; then
 EDITOR=vi
fi

@@ -26,7 +26,7 @@ test_name=$1

[ -z $test_name ] && usage

result_file=$result_dir/$test_name.result
result_file=$RESULT_DIR/$test_name.result

[ -f $result_file ] && die "result file $result_file  has already been created"

@@ -39,11 +39,11 @@ reject_file=$result_file.reject
if [ -f $reject_file ] ; then
  echo "Below are the contents of the reject file:"
  echo "-----start---------------------"
  cat $result_file.
  cat $reject_file
  echo "-----end-----------------------"
  echo "Is this the output you expected from your test case?(y/n)[n]"
  read yes_no
  if [ x$yes_no = xy ] then;
  if [ x$yes_no = xy ] ; then
    echo "Press any key to edit it in $EDITOR, or Ctrl-C to abort"
    read junk
    $EDITOR $reject_file
+7 −0
Original line number Diff line number Diff line
n	
1	
2	
3	
4	
5	
6	
+2 −0
Original line number Diff line number Diff line
Variable_name	Value	
Slave_open_temp_tables	0	
Loading