Commit e2965fb2 authored by unknown's avatar unknown
Browse files

mysqltest improvements, updates after merge + test for 5.0


client/mysqltest.c:
  Fixes after merge
mysql-test/r/type_newdecimal.result:
  Update results after correction of testcase
mysql-test/t/flush_read_lock_kill.test:
  Found extra delimiter
mysql-test/t/kill.test:
  Found extra delimiter
mysql-test/t/rpl_loaddata.test:
  Found extra delimiter
mysql-test/t/rpl_sp.test:
  Found extra delimiter
mysql-test/t/strict.test:
  Convert "!$1292" to "--error 1292"
mysql-test/t/type_newdecimal.test:
  Missing ;
parent 7bc1d892
Loading
Loading
Loading
Loading
+8 −8
Original line number Diff line number Diff line
@@ -837,9 +837,9 @@ int var_set(const char *var_name, const char *var_name_end,

int open_file(const char *name)
{
  char buff[FN_REFLEN];
  DBUG_ENTER("open_file");
  DBUG_PRINT("enter", ("name: %s", name));
  char buff[FN_REFLEN];
  if (!test_if_hard_path(name))
  {
    strxmov(buff, opt_basedir, name, NullS);
@@ -868,9 +868,9 @@ int open_file(const char *name)

int check_eol_junk(const char *eol)
{
  const char *p= eol;
  DBUG_ENTER("check_eol_junk");
  DBUG_PRINT("enter", ("eol: %s", eol));
  const char *p= eol;
  /* Remove all spacing chars except new line */
  while (*p && my_isspace(charset_info, *p) && (*p != '\n'))
    p++;
@@ -1665,7 +1665,7 @@ static uint get_errcodes(match_err *to,struct st_query *q)
	}
      }
      if (!e->name)
	die("Unknown SQL error '%s'\n", start);
	die("Unknown SQL error '%s'", start);
    }
    else
    {
@@ -2089,7 +2089,7 @@ int connect_n_handle_errors(struct st_query *q, MYSQL* con, const char* host,
  if (record)
  {
    if (!q->record_file[0] && !result_file)
      die("At line %u: Missing result file", start_lineno);
      die("Missing result file");
    if (!result_file)
      str_to_file(q->record_file, ds->str, ds->length);
  }
@@ -2235,7 +2235,7 @@ int do_block(enum block_cmd cmd, struct st_query* q)
  char *p= q->first_argument;
  const char *expr_start, *expr_end;
  VAR v;
  const char *cmd_name= (cmd == Q_WHILE ? "while" : "if");
  const char *cmd_name= (cmd == cmd_while ? "while" : "if");

  /* Check stack overflow */
  if (cur_block == block_stack_end)
@@ -3092,7 +3092,7 @@ static int run_query_normal(MYSQL* mysql, struct st_query* q, int flags)
	  warn_res= mysql_store_result(mysql);
	}
	if (!warn_res)
	  verbose_msg("Warning count is %u but didn't get any warnings\n",
	  verbose_msg("Warning count is %u but didn't get any warnings",
		      count);
	else
	{
@@ -3183,7 +3183,7 @@ static int normal_handle_error(const char *query, struct st_query *q,
    abort_not_supported_test();

  if (q->abort_on_error)
    die("At line %u: query '%s' failed: %d: %s", start_lineno, query,
    die("query '%s' failed: %d: %s", query,
        mysql_errno(mysql), mysql_error(mysql));
  else
  {
@@ -3710,7 +3710,7 @@ static void run_query_stmt_handle_warnings(MYSQL *mysql, DYNAMIC_STRING *ds)
    {
      MYSQL_RES *warn_res= mysql_store_result(mysql);
      if (!warn_res)
        verbose_msg("Warning count is %u but didn't get any warnings\n",
        verbose_msg("Warning count is %u but didn't get any warnings",
                    count);
      else
      {
+0 −2
Original line number Diff line number Diff line
@@ -684,9 +684,7 @@ set v1 = 1; set v2 = 2; set v3 = 1000000000000; set v4 = 2000000000000; set v5 =
while v5 < 100000 do
set v1 = v1 + 0.000000000001; set v2 = v2 - 0.000000000001; set v3 = v3 + 1; set v4 = v4 - 1; set v5 = v5 + 1; 
end while; select v1, v2, v3 * 0.000000000001, v4 * 0.000000000001; end;//
#
call p1()//
#
v1	v2	v3 * 0.000000000001	v4 * 0.000000000001
1.000000100000	1.999999900000	1.000000100000	1.999999900000
drop procedure p1;
+1 −1
Original line number Diff line number Diff line
@@ -34,7 +34,7 @@ send flush tables with read lock;
connection con2;
select ((@id := kill_id) - kill_id) from t1; 

--sleep 2; # leave time for FLUSH to block
--sleep 2 # leave time for FLUSH to block
kill connection @id;

connection con1;
+1 −1
Original line number Diff line number Diff line
@@ -47,7 +47,7 @@ select get_lock("a", 10);
connection con2;
let $ID= `select connection_id()`;
send select get_lock("a", 10);
--real_sleep 2;
real_sleep 2;
connection con1;
disable_query_log;
eval kill query $ID;
+1 −1
Original line number Diff line number Diff line
@@ -140,7 +140,7 @@ select * from t2;
alter table t2 drop key day;
connection master;
delete from t2;
--error 1062;
--error 1062
load data infile '../../std_data/rpl_loaddata2.dat' into table t2 fields
terminated by ',' optionally enclosed by '%' escaped by '@' lines terminated by
'\n##\n' starting by '>' ignore 1 lines;
Loading