Commit 9fe4e2a4 authored by unknown's avatar unknown
Browse files

Merge three.local.lan:/home/matthias/Arbeit/mysql-5.0/src

into three.local.lan:/home/matthias/Arbeit/mysql-5.0/src-WL1420

parents fe07d436 6520c161
Loading
Loading
Loading
Loading
+3 −5
Original line number Diff line number Diff line
@@ -1130,15 +1130,15 @@ static int dump_local_log_entries(const char* logname)
    }
    check_header(file, &description_event);
  }
  else // reading from stdin; TODO: check that it works
  else // reading from stdin;
  {
    if (init_io_cache(file, fileno(result_file), 0, READ_CACHE, (my_off_t) 0,
    if (init_io_cache(file, fileno(stdin), 0, READ_CACHE, (my_off_t) 0,
		      0, MYF(MY_WME | MY_NABP | MY_DONT_CHECK_FILESIZE)))
      return 1;
    check_header(file, &description_event);
    if (start_position)
    {
      /* skip 'start_position' characters from stdout */
      /* skip 'start_position' characters from stdin */
      byte buff[IO_SIZE];
      my_off_t length,tmp;
      for (length= start_position_mot ; length > 0 ; length-=tmp)
@@ -1151,8 +1151,6 @@ static int dump_local_log_entries(const char* logname)
        }
      }
    }
    file->pos_in_file= start_position_mot;
    file->seek_not_done=0;
  }

  if (!description_event || !description_event->is_valid())
+2 −0
Original line number Diff line number Diff line
@@ -2379,6 +2379,8 @@ void usage()

#include <help_end.h>

#include <help_end.h>


static my_bool
get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
+22 −0
Original line number Diff line number Diff line
@@ -1809,6 +1809,18 @@ static my_bool my_realloc_str(NET *net, ulong length)
}


/* Clear possible error statee of struct NET */

static void net_clear_error(NET *net)
{
  if (net->last_errno)
  {
    net->last_errno= 0;
    net->last_error[0]= '\0';
    strmov(net->sqlstate, not_error_sqlstate);
  }
}

/*
  Set statement error code, sqlstate, and error message
  from given errcode and sqlstate.
@@ -2499,6 +2511,11 @@ int cli_stmt_execute(MYSQL_STMT *stmt)
      set_stmt_error(stmt, CR_PARAMS_NOT_BOUND, unknown_sqlstate);
      DBUG_RETURN(1);
    }
    if (stmt->mysql->status != MYSQL_STATUS_READY)
    {
      set_stmt_error(stmt, CR_COMMANDS_OUT_OF_SYNC, unknown_sqlstate);
      DBUG_RETURN(1);
    }

    net_clear(net);				/* Sets net->write_pos */
    /* Reserve place for null-marker bytes */
@@ -4858,6 +4875,11 @@ my_bool STDCALL mysql_stmt_close(MYSQL_STMT *stmt)
  if (mysql)
  {
    mysql->stmts= list_delete(mysql->stmts, &stmt->list);
    /*
      Clear NET error state: if the following commands come through
      successfully, connection will still be usable for other commands.
    */
    net_clear_error(&mysql->net);
    if ((int) stmt->state > (int) MYSQL_STMT_INIT_DONE)
    {
      char buff[MYSQL_STMT_HEADER];             /* 4 bytes - stmt id */
+5 −5
Original line number Diff line number Diff line
@@ -194,8 +194,8 @@ MY_LOG_DIR="$MYSQL_TEST_DIR/var/log"
#
# Set LD_LIBRARY_PATH if we are using shared libraries
#
LD_LIBRARY_PATH="$BASEDIR/lib:$BASEDIR/libmysql/.libs:$LD_LIBRARY_PATH"
DYLD_LIBRARY_PATH="$BASEDIR/lib:$BASEDIR/libmysql/.libs:$DYLD_LIBRARY_PATH"
LD_LIBRARY_PATH="$BASEDIR/lib:$BASEDIR/libmysql/.libs:$BASEDIR/zlib/.libs:$LD_LIBRARY_PATH"
DYLD_LIBRARY_PATH="$BASEDIR/lib:$BASEDIR/libmysql/.libs:$BASEDIR/zlib/.libs:$DYLD_LIBRARY_PATH"
export LD_LIBRARY_PATH DYLD_LIBRARY_PATH

#
@@ -692,6 +692,7 @@ then
fi

MYSQL_CLIENT_TEST="$MYSQL_CLIENT_TEST --no-defaults --testcase --user=root --socket=$MASTER_MYSOCK --port=$MYSQL_TCP_PORT --silent"
MYSQL_DUMP="$MYSQL_DUMP --no-defaults -uroot --socket=$MASTER_MYSOCK --password=$DBPASSWD $EXTRA_MYSQLDUMP_OPT"
MYSQL_BINLOG="$MYSQL_BINLOG --no-defaults --local-load=$MYSQL_TMP_DIR  --character-sets-dir=$CHARSETSDIR $EXTRA_MYSQLBINLOG_OPT"
MYSQL_FIX_SYSTEM_TABLES="$MYSQL_FIX_SYSTEM_TABLES --no-defaults --host=localhost --port=$MASTER_MYPORT --socket=$MASTER_MYSOCK --user=root --password=$DBPASSWD --basedir=$BASEDIR --bindir=$CLIENT_BINDIR --verbose"
MYSQL="$MYSQL --host=localhost --port=$MASTER_MYPORT --socket=$MASTER_MYSOCK --user=root --password=$DBPASSWD"
@@ -1151,8 +1152,7 @@ start_master()
  fi
  if [ -n "$EXTRA_MASTER_MYSQLD_TRACE" ] 
  then
    EXTRA_MASTER_MYSQLD_OPT="$EXTRA_MASTER_MYSQLD_OPT \
        $EXTRA_MASTER_MYSQLD_TRACE$1"
      CURR_MASTER_MYSQLD_TRACE="$EXTRA_MASTER_MYSQLD_TRACE$1"
  fi
  if [ -z "$DO_BENCH" ]
  then
@@ -1177,7 +1177,7 @@ start_master()
	   $MASTER_40_ARGS \
           $SMALL_SERVER \
           $EXTRA_MASTER_OPT $EXTRA_MASTER_MYSQLD_OPT \
           $NOT_FIRST_MASTER_EXTRA_OPTS"
           $NOT_FIRST_MASTER_EXTRA_OPTS $CURR_MASTER_MYSQLD_TRACE"
  else
    master_args="--no-defaults --log-bin=$MYSQL_TEST_DIR/var/log/master-bin$1 \
          --server-id=$id --rpl-recovery-rank=1 \
+2 −2
Original line number Diff line number Diff line
@@ -655,9 +655,9 @@ insert into t1 (a,b) values (1,2),(1,3),(2,5);
select a, 0.1*0+1 r2, sum(1) r1 from t1 where a = 1 group  by a having r1>1 and r2=1;
a	r2	r1
1	1.0	2
select a, rand()*0+1 r2, sum(1) r1 from t1 where a = 1 group  by a having r1>1 and r2=1;
select a, round(rand(100)*10) r2, sum(1) r1 from t1 where a = 1 group  by a having r1>1 and r2<=2;
a	r2	r1
1	1	2
1	2	2
select a,sum(b) from t1 where a=1 group by c;
a	sum(b)
1	5
Loading