summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authormsvensson@neptunus.(none) <>2005-08-31 18:10:26 +0200
committermsvensson@neptunus.(none) <>2005-08-31 18:10:26 +0200
commitd692f0c0455aa8936cf1404df74b45619d9b9cf1 (patch)
tree450e65282d317ce0e08e603712ed37d0e581452c /client
parent2fc6ef3a409a7ace9ba0083882a43fd74e86ccb2 (diff)
downloadmariadb-git-d692f0c0455aa8936cf1404df74b45619d9b9cf1.tar.gz
Remove syntax !$<err_no> to set an expected error code
Use !<err_no> instead
Diffstat (limited to 'client')
-rw-r--r--client/mysqltest.c40
1 files changed, 5 insertions, 35 deletions
diff --git a/client/mysqltest.c b/client/mysqltest.c
index d12eba2c7d1..bd467e821ab 100644
--- a/client/mysqltest.c
+++ b/client/mysqltest.c
@@ -104,12 +104,11 @@ enum {OPT_MANAGER_USER=256,OPT_MANAGER_HOST,OPT_MANAGER_PASSWD,
/* ************************************************************************ */
/*
- 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 @@ int read_line(char *buf, int size)
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 @@ int read_query(struct st_query** q_ptr)
}
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 == '@')