Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
b5064f14
Commit
b5064f14
authored
Jan 18, 2005
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge jamppa@bk-internal.mysql.com:/home/bk/mysql-5.0
into ua141d10.elisa.omakaista.fi:/home/my/bk/mysql-5.0
parents
764501e7
0420317c
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
46 additions
and
11 deletions
+46
-11
client/mysqltest.c
client/mysqltest.c
+43
-8
mysql-test/t/create.test
mysql-test/t/create.test
+1
-1
mysql-test/t/select.test
mysql-test/t/select.test
+2
-2
No files found.
client/mysqltest.c
View file @
b5064f14
...
@@ -123,6 +123,17 @@ typedef struct
...
@@ -123,6 +123,17 @@ typedef struct
}
code
;
}
code
;
}
match_err
;
}
match_err
;
typedef
struct
{
const
char
*
name
;
long
code
;
}
st_error
;
static
st_error
global_error
[]
=
{
#include <mysqld_ername.h>
{
0
,
0
}
};
static
match_err
global_expected_errno
[
MAX_EXPECTED_ERRORS
];
static
match_err
global_expected_errno
[
MAX_EXPECTED_ERRORS
];
static
uint
global_expected_errors
;
static
uint
global_expected_errors
;
...
@@ -1340,6 +1351,7 @@ static uint get_errcodes(match_err *to,struct st_query* q)
...
@@ -1340,6 +1351,7 @@ static uint get_errcodes(match_err *to,struct st_query* q)
{
{
char
*
p
=
q
->
first_argument
;
char
*
p
=
q
->
first_argument
;
uint
count
=
0
;
uint
count
=
0
;
DBUG_ENTER
(
"get_errcodes"
);
DBUG_ENTER
(
"get_errcodes"
);
if
(
!*
p
)
if
(
!*
p
)
...
@@ -1350,18 +1362,40 @@ static uint get_errcodes(match_err *to,struct st_query* q)
...
@@ -1350,18 +1362,40 @@ static uint get_errcodes(match_err *to,struct st_query* q)
if
(
*
p
==
'S'
)
if
(
*
p
==
'S'
)
{
{
/* SQLSTATE string */
/* SQLSTATE string */
int
i
;
char
*
end
=
++
p
+
SQLSTATE_LENGTH
;
p
++
;
char
*
to_ptr
=
to
[
count
].
code
.
sqlstate
;
for
(
i
=
0
;
my_isalnum
(
charset_info
,
*
p
)
&&
i
<
SQLSTATE_LENGTH
;
p
++
,
i
++
)
to
[
count
].
code
.
sqlstate
[
i
]
=
*
p
;
for
(;
my_isalnum
(
charset_info
,
*
p
)
&&
p
!=
end
;
p
++
)
to
[
count
].
code
.
sqlstate
[
i
]
=
'\0'
;
*
to_ptr
++=
*
p
;
*
to_ptr
=
0
;
to
[
count
].
type
=
ERR_SQLSTATE
;
to
[
count
].
type
=
ERR_SQLSTATE
;
}
}
else
if
(
*
p
==
'E'
)
{
/* SQL error as string */
st_error
*
e
=
global_error
;
char
*
start
=
p
++
;
for
(;
*
p
==
'_'
||
my_isalnum
(
charset_info
,
*
p
);
p
++
)
;
for
(;
e
->
name
;
e
++
)
{
if
(
!
strncmp
(
start
,
e
->
name
,
(
int
)
(
p
-
start
)))
{
to
[
count
].
code
.
errnum
=
(
uint
)
e
->
code
;
to
[
count
].
type
=
ERR_ERRNO
;
break
;
}
}
if
(
!
e
->
name
)
die
(
"Unknown SQL error '%s'
\n
"
,
start
);
}
else
else
{
{
long
val
;
long
val
;
p
=
str2int
(
p
,
10
,(
long
)
INT_MIN
,
(
long
)
INT_MAX
,
&
val
);
if
(
p
==
NULL
)
if
(
!
(
p
=
str2int
(
p
,
10
,(
long
)
INT_MIN
,
(
long
)
INT_MAX
,
&
val
))
)
die
(
"Invalid argument in %s
\n
"
,
q
->
query
);
die
(
"Invalid argument in %s
\n
"
,
q
->
query
);
to
[
count
].
code
.
errnum
=
(
uint
)
val
;
to
[
count
].
code
.
errnum
=
(
uint
)
val
;
to
[
count
].
type
=
ERR_ERRNO
;
to
[
count
].
type
=
ERR_ERRNO
;
...
@@ -2855,6 +2889,7 @@ static int normal_handle_error(const char *query, struct st_query *q,
...
@@ -2855,6 +2889,7 @@ static int normal_handle_error(const char *query, struct st_query *q,
mysql_error
(
mysql
));
mysql_error
(
mysql
));
DBUG_RETURN
(
0
);
DBUG_RETURN
(
0
);
}
}
return
0
;
/* Keep compiler happy */
}
}
...
...
mysql-test/t/create.test
View file @
b5064f14
...
@@ -294,7 +294,7 @@ select * from t2;
...
@@ -294,7 +294,7 @@ select * from t2;
create
table
t3
like
t1
;
create
table
t3
like
t1
;
--
error
1050
--
error
1050
create
table
t3
like
mysqltest
.
t3
;
create
table
t3
like
mysqltest
.
t3
;
--
error
1044
,
1
--
error
ER_DBACCESS_DENIED_ERROR
,
1
create
table
non_existing_database
.
t1
like
t1
;
create
table
non_existing_database
.
t1
like
t1
;
--
error
1051
--
error
1051
create
table
t3
like
non_existing_table
;
create
table
t3
like
non_existing_table
;
...
...
mysql-test/t/select.test
View file @
b5064f14
...
@@ -1761,9 +1761,9 @@ DO benchmark(100,1+1),1,1;
...
@@ -1761,9 +1761,9 @@ DO benchmark(100,1+1),1,1;
# Bug #6449: do default;
# Bug #6449: do default;
#
#
--
error
1064
--
error
ER_PARSE_ERROR
do
default
;
do
default
;
--
error
1054
--
error
ER_BAD_FIELD_ERROR
do
foobar
;
do
foobar
;
#
#
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment