Below is the list of changes that have just been committed into a local
4.1 repository of msvensson. When msvensson does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet
1.2330 05/08/31 18:10:26 msvensson@neptunus.(none) +3 -0
Remove syntax !$<err_no> to set an expected error code
Use !<err_no> instead
mysql-test/t/mysqltest.test
1.7 05/08/31 18:10:23 msvensson@neptunus.(none) +4 -2
Uncomment tests for the deprecated syntax
mysql-test/r/mysqltest.result
1.7 05/08/31 18:10:23 msvensson@neptunus.(none) +0 -5
Update test result
client/mysqltest.c
1.173 05/08/31 18:10:23 msvensson@neptunus.(none) +5 -35
Remove syntax !$<err_no> to set an expected error code
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: msvensson
# Host: neptunus.(none)
# Root: /home/msvensson/mysql/bug11316/my41-bug11316
--- 1.6/mysql-test/r/mysqltest.result 2005-08-31 17:16:01 +02:00
+++ 1.7/mysql-test/r/mysqltest.result 2005-08-31 18:10:23 +02:00
@@ -13,12 +13,7 @@
select otto from (select 1 as otto) as t1;
otto
1
-select otto from (select 1 as otto) as t1;
-otto
-1
mysqltest: At line 1: query 'select otto from (select 1 as otto) as t1' succeeded - should have failed with sqlstate 42S22...
-select friedrich from (select 1 as otto) as t1;
-ERROR 42S22: Unknown column 'friedrich' in 'field list'
select friedrich from (select 1 as otto) as t1;
ERROR 42S22: Unknown column 'friedrich' in 'field list'
mysqltest: At line 1: query 'select friedrich from (select 1 as otto) as t1' failed with wrong sqlstate 42S22 instead of 00000...
--- 1.6/mysql-test/t/mysqltest.test 2005-08-31 17:16:01 +02:00
+++ 1.7/mysql-test/t/mysqltest.test 2005-08-31 18:10:23 +02:00
@@ -75,8 +75,9 @@
# Positive case(statement)
# ----------------------------------------------------------------------------
+# This syntax not allowed anymore, use --error S00000, see below
# expectation = response
-!S00000 select otto from (select 1 as otto) as t1;
+#!S00000 select otto from (select 1 as otto) as t1;
--error S00000
select otto from (select 1 as otto) as t1;
@@ -94,8 +95,9 @@
# Negative case(statement)
# ----------------------------------------------------------------------------
+# This syntax not allowed anymore, use --error S42S22, see below
# expectation = response
-!S42S22 select friedrich from (select 1 as otto) as t1;
+#!S42S22 select friedrich from (select 1 as otto) as t1;
--error S42S22
select friedrich from (select 1 as otto) as t1;
--- 1.172/client/mysqltest.c 2005-08-31 17:16:01 +02:00
+++ 1.173/client/mysqltest.c 2005-08-31 18:10:23 +02:00
@@ -104,12 +104,11 @@
/* ************************************************************************ */
/*
- A line that starts with !$ or $S, and the list of error codes to
- --error are stored in an internal array of structs. This struct can
- hold numeric SQL error codes or SQLSTATE codes as strings. The
- element next to the last active element in the list is set to type
- ERR_EMPTY. When an SQL statement return an error we use this list to
- check if this is an expected error.
+ The list of error codes to --error are stored in an internal array of
+ structs. This struct can hold numeric SQL error codes or SQLSTATE codes
+ as strings. The element next to the last active element in the list is
+ set to type ERR_EMPTY. When an SQL statement return an error we use
+ this list to check if this is an expected error.
*/
enum match_err_type
@@ -2338,8 +2337,6 @@
Converts lines returned by read_line into a query, this involves
parsing the first word in the read line to find the query type.
- If the line starts with !$<num> or !S<alphanum> the query is setup
- to expect that result when query is executed.
A -- comment may contain a valid query as the first word after the
comment start. Thus it's always checked to see if that is the case.
@@ -2397,33 +2394,6 @@
}
else
{
- if (*p == '!')
- {
- q->abort_on_error= 0;
- p++;
- if (*p == '$')
- {
- int expected_errno= 0;
- p++;
- for (; my_isdigit(charset_info, *p); p++)
- expected_errno = expected_errno * 10 + *p - '0';
- q->expected_errno[0].code.errnum= expected_errno;
- q->expected_errno[0].type= ERR_ERRNO;
- q->expected_errno[1].type= ERR_EMPTY;
- q->expected_errors= 1;
- }
- else if (*p == 'S') /* SQLSTATE */
- {
- int i;
- p++;
- for (i = 0; my_isalnum(charset_info, *p) && i < SQLSTATE_LENGTH; p++, i++)
- q->expected_errno[0].code.sqlstate[i]= *p;
- q->expected_errno[0].code.sqlstate[i]= '\0';
- q->expected_errno[0].type= ERR_SQLSTATE;
- q->expected_errno[1].type= ERR_EMPTY;
- q->expected_errors= 1;
- }
- }
while (*p && my_isspace(charset_info, *p))
p++ ;
if (*p == '@')
| Thread |
|---|
| • bk commit into 4.1 tree (msvensson:1.2330) | msvensson | 31 Aug |