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
67951fde
Commit
67951fde
authored
Nov 04, 2001
by
monty@hundin.mysql.fi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix error messages
mysqltest now also writes failed error messages to log
parent
2ac4ad69
Changes
29
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
29 changed files
with
174 additions
and
208 deletions
+174
-208
Docs/manual.texi
Docs/manual.texi
+113
-145
client/mysqltest.c
client/mysqltest.c
+20
-8
mysql-test/include/master-slave.inc
mysql-test/include/master-slave.inc
+1
-0
mysql-test/r/alter_table.result
mysql-test/r/alter_table.result
+10
-10
mysql-test/r/rpl000001.result
mysql-test/r/rpl000001.result
+11
-11
mysql-test/r/rpl000003.result
mysql-test/r/rpl000003.result
+1
-0
mysql-test/r/rpl000015.result
mysql-test/r/rpl000015.result
+1
-1
mysql-test/r/rpl000016.result
mysql-test/r/rpl000016.result
+7
-4
mysql-test/t/drop.test
mysql-test/t/drop.test
+2
-2
mysql-test/t/union.test
mysql-test/t/union.test
+7
-7
sql/share/czech/errmsg.txt
sql/share/czech/errmsg.txt
+0
-1
sql/share/danish/errmsg.txt
sql/share/danish/errmsg.txt
+0
-1
sql/share/english/errmsg.txt
sql/share/english/errmsg.txt
+0
-1
sql/share/french/errmsg.txt
sql/share/french/errmsg.txt
+0
-1
sql/share/german/errmsg.txt
sql/share/german/errmsg.txt
+0
-1
sql/share/greek/errmsg.txt
sql/share/greek/errmsg.txt
+0
-1
sql/share/hungarian/errmsg.txt
sql/share/hungarian/errmsg.txt
+0
-1
sql/share/italian/errmsg.txt
sql/share/italian/errmsg.txt
+0
-1
sql/share/japanese/errmsg.txt
sql/share/japanese/errmsg.txt
+0
-1
sql/share/korean/errmsg.txt
sql/share/korean/errmsg.txt
+0
-1
sql/share/norwegian-ny/errmsg.txt
sql/share/norwegian-ny/errmsg.txt
+0
-1
sql/share/norwegian/errmsg.txt
sql/share/norwegian/errmsg.txt
+0
-1
sql/share/polish/errmsg.txt
sql/share/polish/errmsg.txt
+0
-1
sql/share/portuguese/errmsg.txt
sql/share/portuguese/errmsg.txt
+0
-1
sql/share/romanian/errmsg.txt
sql/share/romanian/errmsg.txt
+0
-1
sql/share/slovak/errmsg.txt
sql/share/slovak/errmsg.txt
+0
-1
sql/share/spanish/errmsg.txt
sql/share/spanish/errmsg.txt
+0
-1
sql/share/swedish/errmsg.txt
sql/share/swedish/errmsg.txt
+0
-1
sql/share/ukrainian/errmsg.txt
sql/share/ukrainian/errmsg.txt
+1
-2
No files found.
Docs/manual.texi
View file @
67951fde
This diff is collapsed.
Click to expand it.
client/mysqltest.c
View file @
67951fde
...
...
@@ -113,7 +113,7 @@ static int block_stack[BLOCK_STACK_DEPTH];
static
int
block_ok_stack
[
BLOCK_STACK_DEPTH
];
static
uint
global_expected_errno
[
MAX_EXPECTED_ERRORS
];
static
uint
global_expected_errno
[
MAX_EXPECTED_ERRORS
]
,
global_expected_errors
;
DYNAMIC_ARRAY
q_lines
;
...
...
@@ -194,6 +194,7 @@ struct st_query
int
first_word_len
;
my_bool
abort_on_error
,
require_file
;
uint
expected_errno
[
MAX_EXPECTED_ERRORS
];
uint
expected_errors
;
char
record_file
[
FN_REFLEN
];
enum
enum_commands
type
;
};
...
...
@@ -1011,10 +1012,11 @@ static void get_file_name(char *filename, struct st_query* q)
}
static
void
get_ints
(
uint
*
to
,
struct
st_query
*
q
)
static
uint
get_ints
(
uint
*
to
,
struct
st_query
*
q
)
{
char
*
p
=
q
->
first_argument
;
long
val
;
uint
count
=
0
;
DBUG_ENTER
(
"get_ints"
);
if
(
!*
p
)
...
...
@@ -1022,12 +1024,13 @@ static void get_ints(uint *to,struct st_query* q)
for
(;
(
p
=
str2int
(
p
,
10
,(
long
)
INT_MIN
,
(
long
)
INT_MAX
,
&
val
))
;
p
++
)
{
count
++
;
*
to
++=
(
uint
)
val
;
if
(
*
p
!=
','
)
break
;
}
*
to
++=
0
;
/* End of data */
DBUG_
VOID_RETURN
;
DBUG_
RETURN
(
count
)
;
}
/*
...
...
@@ -1583,8 +1586,11 @@ int read_query(struct st_query** q_ptr)
q
->
first_word_len
=
0
;
memcpy
((
gptr
)
q
->
expected_errno
,
(
gptr
)
global_expected_errno
,
sizeof
(
global_expected_errno
));
q
->
expected_errors
=
global_expected_errors
;
q
->
abort_on_error
=
global_expected_errno
[
0
]
==
0
;
bzero
((
gptr
)
global_expected_errno
,
sizeof
(
global_expected_errno
));
global_expected_errors
=
0
;
q
->
type
=
Q_UNKNOWN
;
q
->
query_buf
=
q
->
query
=
0
;
if
(
read_line
(
read_query_buf
,
sizeof
(
read_query_buf
)))
...
...
@@ -1613,6 +1619,7 @@ int read_query(struct st_query** q_ptr)
expected_errno
=
expected_errno
*
10
+
*
p
-
'0'
;
q
->
expected_errno
[
0
]
=
expected_errno
;
q
->
expected_errno
[
1
]
=
0
;
q
->
expected_errors
=
1
;
}
}
...
...
@@ -1962,28 +1969,33 @@ int run_query(MYSQL* mysql, struct st_query* q, int flags)
mysql_errno
(
mysql
),
mysql_error
(
mysql
));
else
{
for
(
i
=
0
;
q
->
expected_errno
[
i
]
;
i
++
)
for
(
i
=
0
;
(
uint
)
i
<
q
->
expected_errors
;
i
++
)
{
if
((
q
->
expected_errno
[
i
]
==
mysql_errno
(
mysql
)))
{
if
(
i
==
0
&&
q
->
expected_err
no
[
1
]
==
0
)
if
(
i
==
0
&&
q
->
expected_err
ors
==
1
)
{
/* Only log error if there is one possible error */
dynstr_append
(
ds
,
mysql_error
(
mysql
));
dynstr_append_mem
(
ds
,
"
\n
"
,
1
);
}
else
/* Don't log error if we may not get an error */
else
if
(
q
->
expected_errno
[
0
]
!=
0
)
dynstr_append
(
ds
,
"Got one of the listed errors
\n
"
);
goto
end
;
/* Ok */
}
}
if
(
i
)
{
dynstr_append
(
ds
,
mysql_error
(
mysql
));
dynstr_append_mem
(
ds
,
"
\n
"
,
1
);
verbose_msg
(
"query '%s' failed with wrong errno %d instead of %d..."
,
q
->
query
,
mysql_errno
(
mysql
),
q
->
expected_errno
[
0
]);
error
=
1
;
goto
end
;
}
dynstr_append
(
ds
,
mysql_error
(
mysql
));
dynstr_append_mem
(
ds
,
"
\n
"
,
1
);
verbose_msg
(
"query '%s' failed: %d: %s"
,
q
->
query
,
mysql_errno
(
mysql
),
mysql_error
(
mysql
));
/*
...
...
@@ -2262,7 +2274,7 @@ int main(int argc, char** argv)
case
Q_EVAL_RESULT
:
eval_result
=
1
;
break
;
case
Q_EVAL
:
if
(
q
->
query
==
q
->
query_buf
)
q
->
query
+=
q
->
first_word_len
;
q
->
query
=
q
->
first_argument
;
/* fall through */
case
Q_QUERY
:
case
Q_REAP
:
...
...
@@ -2308,7 +2320,7 @@ int main(int argc, char** argv)
require_file
=
0
;
break
;
case
Q_ERROR
:
get_ints
(
global_expected_errno
,
q
);
g
lobal_expected_errors
=
g
et_ints
(
global_expected_errno
,
q
);
break
;
case
Q_REQUIRE
:
get_file_name
(
save_file
,
q
);
...
...
mysql-test/include/master-slave.inc
View file @
67951fde
...
...
@@ -3,6 +3,7 @@ connect (master1,localhost,root,,test,0,master.sock);
connect
(
slave
,
localhost
,
root
,,
test
,
0
,
slave
.
sock
);
connect
(
slave1
,
localhost
,
root
,,
test
,
0
,
slave
.
sock
);
connection
slave
;
--
error
0
,
1199
!
slave
stop
;
@
r
/
slave
-
stopped
.
result
show
status
like
'Slave_running'
;
connection
master
;
...
...
mysql-test/r/alter_table.result
View file @
67951fde
...
...
@@ -92,16 +92,16 @@ key (n2, n3, n4, n1),
key (n3, n4, n1, n2),
key (n4, n1, n2, n3) );
alter table t1 disable keys;
insert into t1 values(10,RAND()*1000,RAND()*1000,RAND());
insert into t1 values(9,RAND()*1000,RAND()*1000,RAND());
insert into t1 values(8,RAND()*1000,RAND()*1000,RAND());
insert into t1 values(7,RAND()*1000,RAND()*1000,RAND());
insert into t1 values(6,RAND()*1000,RAND()*1000,RAND());
insert into t1 values(5,RAND()*1000,RAND()*1000,RAND());
insert into t1 values(4,RAND()*1000,RAND()*1000,RAND());
insert into t1 values(3,RAND()*1000,RAND()*1000,RAND());
insert into t1 values(2,RAND()*1000,RAND()*1000,RAND());
insert into t1 values(1,RAND()*1000,RAND()*1000,RAND());
insert into t1 values(10,RAND()*1000,RAND()*1000,RAND());
insert into t1 values(9,RAND()*1000,RAND()*1000,RAND());
insert into t1 values(8,RAND()*1000,RAND()*1000,RAND());
insert into t1 values(7,RAND()*1000,RAND()*1000,RAND());
insert into t1 values(6,RAND()*1000,RAND()*1000,RAND());
insert into t1 values(5,RAND()*1000,RAND()*1000,RAND());
insert into t1 values(4,RAND()*1000,RAND()*1000,RAND());
insert into t1 values(3,RAND()*1000,RAND()*1000,RAND());
insert into t1 values(2,RAND()*1000,RAND()*1000,RAND());
insert into t1 values(1,RAND()*1000,RAND()*1000,RAND());
alter table t1 enable keys;
drop table t1;
create table t1 (i int unsigned not null auto_increment primary key);
...
...
mysql-test/r/rpl000001.result
View file @
67951fde
...
...
@@ -7,7 +7,7 @@ use test;
drop table if exists t1,t3;
create table t1 (word char(20) not null);
load data infile '../../std_data/words.dat' into table t1;
load data local infile '$MYSQL_TEST_DIR/std_data/words.dat' into table t1;
load data local infile '$MYSQL_TEST_DIR/std_data/words.dat' into table t1;
select * from t1;
word
Aarhus
...
...
@@ -47,16 +47,16 @@ reset master;
reset slave;
drop table if exists t1,t2;
create table t1(n int);
insert into t1 values(10);
insert into t1 values(9);
insert into t1 values(8);
insert into t1 values(7);
insert into t1 values(6);
insert into t1 values(5);
insert into t1 values(4);
insert into t1 values(3);
insert into t1 values(2);
insert into t1 values(1);
insert into t1 values(10);
insert into t1 values(9);
insert into t1 values(8);
insert into t1 values(7);
insert into t1 values(6);
insert into t1 values(5);
insert into t1 values(4);
insert into t1 values(3);
insert into t1 values(2);
insert into t1 values(1);
create table t2(id int);
insert into t2 values(connection_id());
create temporary table t1_temp(n int);
...
...
mysql-test/r/rpl000003.result
View file @
67951fde
...
...
@@ -6,6 +6,7 @@ slave start;
drop table if exists t1;
create table t1(n int primary key);
insert into t1 values (1),(2),(2);
Duplicate entry '2' for key 1
insert into t1 values (3);
select * from t1;
n
...
...
mysql-test/r/rpl000015.result
View file @
67951fde
...
...
@@ -10,7 +10,7 @@ change master to master_host='127.0.0.1';
show slave status;
Master_Host Master_User Master_Port Connect_retry Log_File Pos Slave_Running Replicate_do_db Replicate_ignore_db Last_errno Last_error Skip_counter Last_log_seq
127.0.0.1 test 9998 60 4 No 0 0 0
change master to master_host='127.0.0.1',master_user='root',
change master to master_host='127.0.0.1',master_user='root',
master_password='',master_port=$MASTER_MYPORT;
show slave status;
Master_Host Master_User Master_Port Connect_retry Log_File Pos Slave_Running Replicate_do_db Replicate_ignore_db Last_errno Last_error Skip_counter Last_log_seq
...
...
mysql-test/r/rpl000016.result
View file @
67951fde
slave start;
Could not initialize master info structure, check permisions on master.info
slave start;
change master to master_host='127.0.0.1',master_port=$MASTER_MYPORT,
Could not initialize master info structure, check permisions on master.info
change master to master_host='127.0.0.1',master_port=$MASTER_MYPORT,
master_user='root';
Could not initialize master info
reset slave;
change master to master_host='127.0.0.1',master_port=$MASTER_MYPORT,
change master to master_host='127.0.0.1',master_port=$MASTER_MYPORT,
master_user='root';
reset master;
slave start;
...
...
@@ -57,12 +60,12 @@ master-bin.005
master-bin.006
show master status;
File Position Binlog_do_db Binlog_ignore_db
master-bin.006 7
2
0
master-bin.006 7
1
0
slave stop;
slave start;
show slave status;
Master_Host Master_User Master_Port Connect_retry Log_File Pos Slave_Running Replicate_do_db Replicate_ignore_db Last_errno Last_error Skip_counter Last_log_seq
127.0.0.1 root 9999 60 master-bin.006 7
2
0 Yes 0 0 11
127.0.0.1 root 9999 60 master-bin.006 7
1
0 Yes 0 0 11
lock tables t3 read;
select count(*) from t3 where n >= 4;
count(*)
...
...
mysql-test/t/drop.test
View file @
67951fde
...
...
@@ -28,13 +28,13 @@ drop database foo;
# test drop/create database and FLUSH TABLES WITH READ LOCK
drop
database
if
exists
foo
;
flush
tables
with
read
lock
;
--
error
1209
,
12
19
;
--
error
1209
,
12
23
;
create
database
foo
;
unlock
tables
;
create
database
foo
;
show
databases
;
flush
tables
with
read
lock
;
--
error
1208
,
12
19
;
--
error
1208
,
12
23
;
drop
database
foo
;
unlock
tables
;
drop
database
foo
;
...
...
mysql-test/t/union.test
View file @
67951fde
...
...
@@ -22,25 +22,25 @@ select 't1',b,count(*) from t1 group by b UNION select 't2',b,count(*) from t2 g
# Test some error conditions with UNION
explain
select
a
,
b
from
t1
union
all
select
a
,
b
from
t2
;
--
error
12
17
--
error
12
21
select
a
,
b
from
t1
into
outfile
'skr'
union
select
a
,
b
from
t2
;
--
error
12
17
--
error
12
21
select
a
,
b
from
t1
order
by
a
union
select
a
,
b
from
t2
;
--
error
12
17
--
error
12
21
insert
into
t3
select
a
from
t1
order
by
a
union
select
a
from
t2
;
--
error
12
18
--
error
12
22
create
table
t3
select
a
,
b
from
t1
union
select
a
from
t2
;
--
error
12
18
--
error
12
22
select
a
,
b
from
t1
union
select
a
from
t2
;
--
error
12
18
--
error
12
22
select
*
from
t1
union
select
a
from
t2
;
--
error
12
18
--
error
12
22
select
a
from
t1
union
select
*
from
t2
;
# Test CREATE, INSERT and REPLACE
...
...
sql/share/czech/errmsg.txt
View file @
67951fde
...
...
@@ -236,4 +236,3 @@
"Can't execute the query because you have a conflicting read lock",
"Mixing of transactional and non-transactional tables is disabled",
"Option '%s' used twice in statement",
"The used table type doesn't support FULLTEXT indexes",
sql/share/danish/errmsg.txt
View file @
67951fde
...
...
@@ -230,4 +230,3 @@
"Can't execute the query because you have a conflicting read lock",
"Mixing of transactional and non-transactional tables is disabled",
"Option '%s' used twice in statement",
"The used table type doesn't support FULLTEXT indexes",
sql/share/english/errmsg.txt
View file @
67951fde
...
...
@@ -227,4 +227,3 @@
"Can't execute the query because you have a conflicting read lock",
"Mixing of transactional and non-transactional tables is disabled",
"Option '%s' used twice in statement",
"The used table type doesn't support FULLTEXT indexes",
sql/share/french/errmsg.txt
View file @
67951fde
...
...
@@ -227,4 +227,3 @@
"Can't execute the query because you have a conflicting read lock",
"Mixing of transactional and non-transactional tables is disabled",
"Option '%s' used twice in statement",
"The used table type doesn't support FULLTEXT indexes",
sql/share/german/errmsg.txt
View file @
67951fde
...
...
@@ -230,4 +230,3 @@
"Can't execute the query because you have a conflicting read lock",
"Mixing of transactional and non-transactional tables is disabled",
"Option '%s' used twice in statement",
"Der verwendete Tabellentyp unterstützt keine FULLTEXT-Indexe",
sql/share/greek/errmsg.txt
View file @
67951fde
...
...
@@ -227,4 +227,3 @@
"Can't execute the query because you have a conflicting read lock",
"Mixing of transactional and non-transactional tables is disabled",
"Option '%s' used twice in statement",
"The used table type doesn't support FULLTEXT indexes",
sql/share/hungarian/errmsg.txt
View file @
67951fde
...
...
@@ -229,4 +229,3 @@
"Can't execute the query because you have a conflicting read lock",
"Mixing of transactional and non-transactional tables is disabled",
"Option '%s' used twice in statement",
"The used table type doesn't support FULLTEXT indexes",
sql/share/italian/errmsg.txt
View file @
67951fde
...
...
@@ -227,4 +227,3 @@
"Can't execute the query because you have a conflicting read lock",
"Mixing of transactional and non-transactional tables is disabled",
"Option '%s' used twice in statement",
"The used table type doesn't support FULLTEXT indexes",
sql/share/japanese/errmsg.txt
View file @
67951fde
...
...
@@ -229,4 +229,3 @@
"Can't execute the query because you have a conflicting read lock",
"Mixing of transactional and non-transactional tables is disabled",
"Option '%s' used twice in statement",
"The used table type doesn't support FULLTEXT indexes",
sql/share/korean/errmsg.txt
View file @
67951fde
...
...
@@ -227,4 +227,3 @@
"Can't execute the query because you have a conflicting read lock",
"Mixing of transactional and non-transactional tables is disabled",
"Option '%s' used twice in statement",
"The used table type doesn't support FULLTEXT indexes",
sql/share/norwegian-ny/errmsg.txt
View file @
67951fde
...
...
@@ -229,4 +229,3 @@
"Can't execute the query because you have a conflicting read lock",
"Mixing of transactional and non-transactional tables is disabled",
"Option '%s' used twice in statement",
"The used table type doesn't support FULLTEXT indexes",
sql/share/norwegian/errmsg.txt
View file @
67951fde
...
...
@@ -229,4 +229,3 @@
"Can't execute the query because you have a conflicting read lock",
"Mixing of transactional and non-transactional tables is disabled",
"Option '%s' used twice in statement",
"The used table type doesn't support FULLTEXT indexes",
sql/share/polish/errmsg.txt
View file @
67951fde
...
...
@@ -231,4 +231,3 @@
"Can't execute the query because you have a conflicting read lock",
"Mixing of transactional and non-transactional tables is disabled",
"Option '%s' used twice in statement",
"The used table type doesn't support FULLTEXT indexes",
sql/share/portuguese/errmsg.txt
View file @
67951fde
...
...
@@ -227,4 +227,3 @@
"Can't execute the query because you have a conflicting read lock",
"Mixing of transactional and non-transactional tables is disabled",
"Option '%s' used twice in statement",
"The used table type doesn't support FULLTEXT indexes",
sql/share/romanian/errmsg.txt
View file @
67951fde
...
...
@@ -231,4 +231,3 @@
"Can't execute the query because you have a conflicting read lock",
"Mixing of transactional and non-transactional tables is disabled",
"Option '%s' used twice in statement",
"The used table type doesn't support FULLTEXT indexes",
sql/share/slovak/errmsg.txt
View file @
67951fde
...
...
@@ -235,4 +235,3 @@
"Can't execute the query because you have a conflicting read lock",
"Mixing of transactional and non-transactional tables is disabled",
"Option '%s' used twice in statement",
"The used table type doesn't support FULLTEXT indexes",
sql/share/spanish/errmsg.txt
View file @
67951fde
...
...
@@ -228,4 +228,3 @@
"Can't execute the query because you have a conflicting read lock",
"Mixing of transactional and non-transactional tables is disabled",
"Option '%s' used twice in statement",
"The used table type doesn't support FULLTEXT indexes",
sql/share/swedish/errmsg.txt
View file @
67951fde
...
...
@@ -227,4 +227,3 @@
"Kan inte utföra kommandot emedan du har ett READ lås",
"Blandning av transaktionella och icke-transaktionella tabeller är inaktiverat",
"Option '%s' användes två gånger",
"The used table type doesn't support FULLTEXT indexes",
sql/share/ukrainian/errmsg.txt
View file @
67951fde
...
...
@@ -220,7 +220,7 @@
" %-.32s@%-.64s ަ",
"Incorrect table definition; All MERGE tables must be in the same database",
"Deadlock found when trying to get lock; Try restarting transaction",
"
The used table type doesn't support FULLTEXT indexes
",
"
æ Цդ FULLTEXT Ӧ
",
"Cannot add foreign key constraint",
"Cannot add a child row: a foreign key constraint fails",
"Cannot delete a parent row: a foreign key constraint fails",
...
...
@@ -232,4 +232,3 @@
"Can't execute the query because you have a conflicting read lock",
"Mixing of transactional and non-transactional tables is disabled",
"Option '%s' used twice in statement",
" æ Цդ FULLTEXT Ӧ",
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