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
600a74b0
Commit
600a74b0
authored
Dec 06, 2005
by
msvensson@neptunus.(none)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
WL#2930
- Updated after review
parent
a6031b64
Changes
8
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
146 additions
and
63 deletions
+146
-63
client/mysqltest.c
client/mysqltest.c
+93
-45
mysql-test/include/have_multi_ndb.inc
mysql-test/include/have_multi_ndb.inc
+4
-4
mysql-test/r/init_file.result
mysql-test/r/init_file.result
+1
-0
mysql-test/r/mysql_client_test.result
mysql-test/r/mysql_client_test.result
+1
-0
mysql-test/r/mysqltest.result
mysql-test/r/mysqltest.result
+4
-0
mysql-test/t/init_file.test
mysql-test/t/init_file.test
+1
-0
mysql-test/t/mysql_client_test.test
mysql-test/t/mysql_client_test.test
+2
-0
mysql-test/t/mysqltest.test
mysql-test/t/mysqltest.test
+40
-14
No files found.
client/mysqltest.c
View file @
600a74b0
This diff is collapsed.
Click to expand it.
mysql-test/include/have_multi_ndb.inc
View file @
600a74b0
...
...
@@ -9,8 +9,8 @@ disable_query_log;
drop
table
if
exists
t1
,
t2
;
--
enable_warnings
flush
tables
;
@
r
/
have_ndb
.
require
show
variables
like
"have_ndbcluster"
;
# @r/server_id.require show variables like "server_id
";
--
require
r
/
have_ndb
.
require
show
variables
like
"have_ndbcluster
"
;
enable_query_log
;
# Check that server2 has NDB support
...
...
@@ -20,8 +20,8 @@ disable_query_log;
drop
table
if
exists
t1
,
t2
;
--
enable_warnings
flush
tables
;
@
r
/
have_ndb
.
require
show
variables
like
"have_ndbcluster"
;
# @r/server_id1.require show variables like "server_id
";
--
require
r
/
have_ndb
.
require
show
variables
like
"have_ndbcluster
"
;
enable_query_log
;
# Set the default connection to 'server1'
...
...
mysql-test/r/init_file.result
0 → 100644
View file @
600a74b0
ok
mysql-test/r/mysql_client_test.result
0 → 100644
View file @
600a74b0
ok
mysql-test/r/mysqltest.result
View file @
600a74b0
...
...
@@ -331,6 +331,7 @@ mysqltest: At line 1: Wrong number of arguments to replace_result in 'replace_re
mysqltest: At line 1: Wrong number of arguments to replace_result in 'replace_result a;'
mysqltest: At line 1: Wrong number of arguments to replace_result in 'replace_result a'
mysqltest: At line 1: Wrong number of arguments to replace_result in 'replace_result a '
OK
mysqltest: At line 1: Wrong number of arguments to replace_result in 'replace_result a b c'
mysqltest: At line 1: Wrong number of arguments to replace_result in 'replace_result a b c '
select "a" as col1, "c" as col2;
...
...
@@ -356,6 +357,7 @@ mysqltest: At line 1: Missing connection db
mysqltest: At line 1: Could not open connection 'con2': Unknown database 'illegal_db'
mysqltest: At line 1: Illegal argument for port: 'illegal_port'
mysqltest: At line 1: Illegal option to connect: SMTP
OK
mysqltest: In included file "./var/tmp/con.sql": At line 7: Connection limit exhausted - increase MAX_CONS in mysqltest.c
mysqltest: In included file "./var/tmp/con.sql": At line 3: connection 'test_con1' not found in connection pool
mysqltest: In included file "./var/tmp/con.sql": At line 2: Connection test_con1 already exists
...
...
@@ -394,3 +396,5 @@ root@localhost
--------------------------------------------------------------------------------
this will be executed
this will be executed
mysqltest: Result length mismatch
mysqltest: The test didn't produce any output
mysql-test/t/init_file.test
View file @
600a74b0
...
...
@@ -7,3 +7,4 @@
#
# End of 4.1 tests
echo
ok
;
mysql-test/t/mysql_client_test.test
View file @
600a74b0
...
...
@@ -10,3 +10,5 @@
--
exec
$MYSQL_CLIENT_TEST
--
getopt
-
ll
-
test
=
25600
M
# End of 4.1 tests
echo
ok
;
mysql-test/t/mysqltest.test
View file @
600a74b0
...
...
@@ -368,10 +368,10 @@ select 3 from t1 ;
# Missing delimiter until eof
# The comment will be "sucked into" the sleep command since
# delimiter is missing
--
system
echo
"sleep 7"
>
var
/
log
/
mysqltest
.
sql
--
system
echo
"# Another comment"
>>
var
/
log
/
mysqltest
.
sql
--
system
echo
"sleep 7"
>
var
/
tmp
/
mysqltest
.
sql
--
system
echo
"# Another comment"
>>
var
/
tmp
/
mysqltest
.
sql
--
error
1
--
exec
$MYSQL_TEST
<
var
/
log
/
mysqltest
.
sql
2
>&
1
--
exec
$MYSQL_TEST
<
var
/
tmp
/
mysqltest
.
sql
2
>&
1
#
# Extra delimiter
...
...
@@ -737,20 +737,20 @@ while ($i)
--
error
1
--
exec
echo
"{;"
|
$MYSQL_TEST
2
>&
1
--
system
echo
"while (0)"
>
var
/
log
/
mysqltest
.
sql
--
system
echo
"echo hej;"
>>
var
/
log
/
mysqltest
.
sql
--
system
echo
"while (0)"
>
var
/
tmp
/
mysqltest
.
sql
--
system
echo
"echo hej;"
>>
var
/
tmp
/
mysqltest
.
sql
--
error
1
--
exec
$MYSQL_TEST
<
var
/
log
/
mysqltest
.
sql
2
>&
1
--
exec
$MYSQL_TEST
<
var
/
tmp
/
mysqltest
.
sql
2
>&
1
--
system
echo
"while (0)"
>
var
/
log
/
mysqltest
.
sql
--
system
echo
"{echo hej;"
>>
var
/
log
/
mysqltest
.
sql
--
system
echo
"while (0)"
>
var
/
tmp
/
mysqltest
.
sql
--
system
echo
"{echo hej;"
>>
var
/
tmp
/
mysqltest
.
sql
--
error
1
--
exec
$MYSQL_TEST
<
var
/
log
/
mysqltest
.
sql
2
>&
1
--
exec
$MYSQL_TEST
<
var
/
tmp
/
mysqltest
.
sql
2
>&
1
--
system
echo
"while (0){"
>
var
/
log
/
mysqltest
.
sql
--
system
echo
"echo hej;"
>>
var
/
log
/
mysqltest
.
sql
--
system
echo
"while (0){"
>
var
/
tmp
/
mysqltest
.
sql
--
system
echo
"echo hej;"
>>
var
/
tmp
/
mysqltest
.
sql
--
error
1
--
exec
$MYSQL_TEST
<
var
/
log
/
mysqltest
.
sql
2
>&
1
--
exec
$MYSQL_TEST
<
var
/
tmp
/
mysqltest
.
sql
2
>&
1
# ----------------------------------------------------------------------------
# Test error messages returned from comments starting with a command
...
...
@@ -778,7 +778,7 @@ select "a" as col1, "c" as col2;
--
exec
echo
"replace_result a;"
|
$MYSQL_TEST
2
>&
1
--
error
1
--
exec
echo
"replace_result a ;"
|
$MYSQL_TEST
2
>&
1
--
exec
echo
"replace_result a b;"
|
$MYSQL_TEST
2
>&
1
--
exec
echo
"replace_result a b;
echo OK;
"
|
$MYSQL_TEST
2
>&
1
--
error
1
--
exec
echo
"--replace_result a b c"
|
$MYSQL_TEST
2
>&
1
--
error
1
...
...
@@ -848,7 +848,7 @@ select "a" as col1, "c" as col2;
--
exec
echo
" disconnect test_con1; "
>>
var
/
tmp
/
con
.
sql
--
exec
echo
" dec
\$
i; "
>>
var
/
tmp
/
con
.
sql
--
exec
echo
"}"
>>
var
/
tmp
/
con
.
sql
--
exec
echo
"source var/tmp/con.sql;"
|
$MYSQL_TEST
2
>&
1
--
exec
echo
"source var/tmp/con.sql;
echo OK;
"
|
$MYSQL_TEST
2
>&
1
# Repeat connect/disconnect, exceed max number of connections
--
exec
echo
"let
\$
i=200;"
>
var
/
tmp
/
con
.
sql
...
...
@@ -954,3 +954,29 @@ select "this will not be executed";
--
enable_parsing
select
"this will be executed"
;
--
enable_query_log
#
# Test zero length result file. Should not pass
#
--
exec
touch
$MYSQL_TEST_DIR
/
var
/
tmp
/
zero_length_file
.
result
--
exec
echo
"echo ok;"
>
$MYSQL_TEST_DIR
/
var
/
tmp
/
query
.
sql
--
error
1
--
exec
$MYSQL_TEST
-
x
var
/
tmp
/
query
.
sql
-
R
var
/
tmp
/
zero_length_file
.
result
2
>&
1
#
# Test that a test file that does not generate any output fails.
#
--
exec
echo
"let
\$
i= 1;"
>
$MYSQL_TEST_DIR
/
var
/
tmp
/
query
.
sql
--
error
1
--
exec
$MYSQL_TEST
-
x
var
/
tmp
/
query
.
sql
2
>&
1
#
# Test that mysqltest fails when there are no queries executed
# but a result file exist
# NOTE! This will never happen as long as it's not allowed to have
# test files that does not produce any output
#--exec echo "something" > $MYSQL_TEST_DIR/var/tmp/result_file.result
#--exec echo "let \$i= 1;" > $MYSQL_TEST_DIR/var/tmp/query.sql
#--error 1
#--exec $MYSQL_TEST -x var/tmp/query.sql -R var/tmp/result_file.result 2>&1
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