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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
f4661f34
Commit
f4661f34
authored
Apr 09, 2008
by
msvensson@shellback.(none)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix return code from check-warnings to indicate if test failed or not.
No more string matching
parent
d348362d
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
16 deletions
+18
-16
mysql-test/include/check-warnings.test
mysql-test/include/check-warnings.test
+5
-1
mysql-test/include/mtr_check.sql
mysql-test/include/mtr_check.sql
+1
-1
mysql-test/include/mtr_warnings.sql
mysql-test/include/mtr_warnings.sql
+6
-2
mysql-test/mysql-test-run.pl
mysql-test/mysql-test-run.pl
+6
-12
No files found.
mysql-test/include/check-warnings.test
View file @
f4661f34
...
...
@@ -4,5 +4,9 @@
# for unexpected warnings found in the servers error log
#
--
disable_query_log
call
mtr
.
check_warnings
();
call
mtr
.
check_warnings
(
@
result
);
if
(
`select @result = 0`
){
skip
OK
;
}
echo
Found
warnings
;
--
enable_query_log
mysql-test/include/mtr_check.sql
View file @
f4661f34
...
...
@@ -19,7 +19,7 @@ BEGIN
SELECT
*
FROM
INFORMATION_SCHEMA
.
SCHEMATA
;
-- The test database should not contain any tables
SELECT
table_name
FROM
INFORMATION_SCHEMA
.
TABLES
SELECT
table_name
AS
tables_in_test
FROM
INFORMATION_SCHEMA
.
TABLES
WHERE
table_schema
=
'test'
;
-- Show "mysql" database, tables and columns
...
...
mysql-test/include/mtr_warnings.sql
View file @
f4661f34
...
...
@@ -208,7 +208,7 @@ INSERT INTO global_supressions VALUES
-- Procedure that uses the above created tables to check
-- the servers error log for warnings
--
CREATE
DEFINER
=
root
@
localhost
PROCEDURE
check_warnings
()
CREATE
DEFINER
=
root
@
localhost
PROCEDURE
check_warnings
(
OUT
result
INT
)
BEGIN
-- Don't write these queries to binlog
...
...
@@ -225,6 +225,7 @@ BEGIN
FROM
information_schema
.
global_variables
WHERE
variable_name
=
'LOG_ERROR'
;
SET
@@
session
.
max_allowed_packet
=
1024
*
1024
*
1024
;
SET
@
text
=
load_file
(
@
log_error
);
-- select @text;
...
...
@@ -269,8 +270,11 @@ BEGIN
SELECT
line
as
log_error
FROM
suspect_lines
WHERE
supressed
=
0
;
SELECT
*
FROM
test_supressions
;
-- Return 2 -> check failed
SELECT
2
INTO
result
;
ELSE
SELECT
"OK"
;
-- Return 0 -> OK
SELECT
0
INTO
RESULT
;
END
IF
;
-- Cleanup for next test
...
...
mysql-test/mysql-test-run.pl
View file @
f4661f34
...
...
@@ -2568,22 +2568,16 @@ sub run_check_warnings ($$) {
if
(
$res
==
0
)
{
my
$report
=
mtr_grab_file
(
$errfile
);
if
(
$report
ne
"
OK
\n
OK
\n
")
{
# Log to var/log/warnings file
mtr_tofile
("
$opt_vardir
/log/warnings
",
# Log to var/log/warnings file
mtr_tofile
("
$opt_vardir
/log/warnings
",
$tname
.
"
\n
",
$report
);
$res
=
1
;
$tinfo
->
{'
warnings
'}
.=
$report
;
}
$res
=
1
;
$tinfo
->
{'
warnings
'}
.=
$report
;
}
elsif
(
$res
==
62
)
{
# One of the features needed to run check_warnings.test was not
# available, check skipped
elsif
(
$res
==
62
)
{
# Test case was ok and called "skip"
$res
=
0
;
}
elsif
(
$res
)
...
...
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