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
ff0ee38b
Commit
ff0ee38b
authored
Apr 04, 2007
by
msvensson@pilot.blaudden
Browse files
Options
Browse Files
Download
Plain Diff
Merge pilot.blaudden:/home/msvensson/mysql/mysql-5.0-maint
into pilot.blaudden:/home/msvensson/mysql/mysql-5.1-maint
parents
f2501d2e
678a3587
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
65 additions
and
13 deletions
+65
-13
client/mysqltest.c
client/mysqltest.c
+13
-4
mysql-test/lib/mtr_report.pl
mysql-test/lib/mtr_report.pl
+12
-0
mysql-test/mysql-test-run.pl
mysql-test/mysql-test-run.pl
+2
-6
mysql-test/r/mysqltest.result
mysql-test/r/mysqltest.result
+3
-0
mysql-test/t/fix_priv_tables.test
mysql-test/t/fix_priv_tables.test
+7
-0
mysql-test/t/mysqltest.test
mysql-test/t/mysqltest.test
+15
-0
mysql-test/t/system_mysql_db_fix30020.test
mysql-test/t/system_mysql_db_fix30020.test
+6
-3
mysql-test/t/system_mysql_db_fix40123.test
mysql-test/t/system_mysql_db_fix40123.test
+7
-0
No files found.
client/mysqltest.c
View file @
ff0ee38b
...
...
@@ -278,7 +278,7 @@ enum enum_commands {
Q_IF
,
Q_DISABLE_PARSING
,
Q_ENABLE_PARSING
,
Q_REPLACE_REGEX
,
Q_REMOVE_FILE
,
Q_FILE_EXIST
,
Q_WRITE_FILE
,
Q_COPY_FILE
,
Q_PERL
,
Q_DIE
,
Q_EXIT
,
Q_WRITE_FILE
,
Q_COPY_FILE
,
Q_PERL
,
Q_DIE
,
Q_EXIT
,
Q_SKIP
,
Q_CHMOD_FILE
,
Q_APPEND_FILE
,
Q_CAT_FILE
,
Q_DIFF_FILES
,
Q_UNKNOWN
,
/* Unknown command. */
...
...
@@ -360,6 +360,7 @@ const char *command_names[]=
"die"
,
/* Don't execute any more commands, compare result */
"exit"
,
"skip"
,
"chmod"
,
"append_file"
,
"cat_file"
,
...
...
@@ -1352,6 +1353,7 @@ void var_query_set(VAR *var, const char *query, const char** query_end)
MYSQL_RES
*
res
;
MYSQL_ROW
row
;
MYSQL
*
mysql
=
&
cur_con
->
mysql
;
DYNAMIC_STRING
ds_query
;
DBUG_ENTER
(
"var_query_set"
);
LINT_INIT
(
res
);
...
...
@@ -1361,13 +1363,17 @@ void var_query_set(VAR *var, const char *query, const char** query_end)
die
(
"Syntax error in query, missing '`'"
);
++
query
;
if
(
mysql_real_query
(
mysql
,
query
,
(
int
)(
end
-
query
))
||
/* Eval the query, thus replacing all environment variables */
init_dynamic_string
(
&
ds_query
,
0
,
(
end
-
query
)
+
32
,
256
);
do_eval
(
&
ds_query
,
query
,
end
,
FALSE
);
if
(
mysql_real_query
(
mysql
,
ds_query
.
str
,
ds_query
.
length
)
||
!
(
res
=
mysql_store_result
(
mysql
)))
{
*
end
=
0
;
die
(
"Error running query '%s': %d %s"
,
query
,
die
(
"Error running query '%s': %d %s"
,
ds_query
.
str
,
mysql_errno
(
mysql
),
mysql_error
(
mysql
));
}
dynstr_free
(
&
ds_query
);
if
((
row
=
mysql_fetch_row
(
res
))
&&
row
[
0
])
{
...
...
@@ -6287,6 +6293,9 @@ int main(int argc, char **argv)
/* Stop processing any more commands */
abort_flag
=
1
;
break
;
case
Q_SKIP
:
abort_not_supported_test
(
"%s"
,
command
->
first_argument
);
break
;
case
Q_RESULT
:
die
(
"result, deprecated command"
);
...
...
mysql-test/lib/mtr_report.pl
View file @
ff0ee38b
...
...
@@ -296,6 +296,18 @@ sub mtr_report_stats ($) {
}
}
}
if
(
$::opt_check_testcases
)
{
# Look for warnings produced by mysqltest in testname.warnings
foreach
my
$test_warning_file
(
glob
("
$::glob_mysql_test_dir/r/*.warnings
")
)
{
$found_problems
=
1
;
print
WARN
"
Check myqltest warnings in
$test_warning_file
\n
";
}
}
if
(
$found_problems
)
{
mtr_warning
("
Got errors/warnings while running tests, please examine
",
...
...
mysql-test/mysql-test-run.pl
View file @
ff0ee38b
...
...
@@ -725,8 +725,6 @@ sub command_line_setup () {
{
$mysqld_variables
{'
port
'}
=
3306
;
$mysqld_variables
{'
master-port
'}
=
3306
;
$opt_skip_ndbcluster
=
1
;
$opt_skip_im
=
1
;
}
if
(
$opt_comment
)
...
...
@@ -1236,6 +1234,7 @@ sub command_line_setup () {
{
# Turn off features not supported when running with extern server
$opt_skip_rpl
=
1
;
$opt_skip_ndbcluster
=
1
;
# Setup master->[0] with the settings for the extern server
$master
->
[
0
]
->
{'
path_sock
'}
=
$opt_socket
?
$opt_socket
:
"
/tmp/mysql.sock
";
...
...
@@ -2031,10 +2030,7 @@ sub environment_setup () {
$ENV
{'
MYSQL_FIX_SYSTEM_TABLES
'}
=
$cmdline_mysql_fix_system_tables
;
}
if
(
!
$opt_extern
)
{
$ENV
{'
MYSQL_FIX_PRIVILEGE_TABLES
'}
=
$file_mysql_fix_privilege_tables
;
}
# ----------------------------------------------------
# Setup env so childs can execute my_print_defaults
...
...
mysql-test/r/mysqltest.result
View file @
ff0ee38b
...
...
@@ -277,6 +277,9 @@ let $A = changed value of A;
# Content of $B is: initial value of B
let $B = changed value of B;
# Content of $A is: changed value of A
var2: content of variable 1
var3: content of variable 1 content of variable 1
length of var3 is longer than 0
mysqltest: At line 1: Missing required argument 'filename' to command 'source'
mysqltest: At line 1: Could not open file ./non_existingFile
mysqltest: In included file "MYSQLTEST_VARDIR/tmp/recursive.sql": At line 1: Source directives are nesting too deep
...
...
mysql-test/t/fix_priv_tables.test
View file @
ff0ee38b
# Embedded server doesn't support external clients
--
source
include
/
not_embedded
.
inc
# Don't run this test if $MYSQL_FIX_PRIVILEGE_TABLES isn't set
# to the location of mysql_fix_privilege_tables.sql
if
(
`SELECT LENGTH("$MYSQL_FIX_PRIVILEGE_TABLES") <= 0`
)
{
skip
Test
need
MYSQL_FIX_PRIVILEGE_TABLES
;
}
#
# This is the test for mysql_fix_privilege_tables
# It checks that a system tables from mysql 4.1.23
...
...
mysql-test/t/mysqltest.test
View file @
ff0ee38b
...
...
@@ -718,6 +718,21 @@ let $A = changed value of A;
let
$B
=
changed
value
of
B
;
--
echo
# Content of \$A is: $A
# ----------------------------------------------------------------------------
# Test let from query with $variable
# let $<var_name>=`<query with $variable>`;
# ----------------------------------------------------------------------------
let
$var1
=
content
of
variable
1
;
let
$var2
=
`select "$var1"`
;
let
$var3
=
`select concat("$var1", " ", "$var2")`
;
echo
var2
:
$var2
;
echo
var3
:
$var3
;
if
(
`select length("$var3") > 0`
)
{
echo
length
of
var3
is
longer
than
0
;
}
# ----------------------------------------------------------------------------
# Test to assign let from query
# let $<var_name>=`<query>`;
...
...
mysql-test/t/system_mysql_db_fix30020.test
View file @
ff0ee38b
# Embedded server doesn't support external clients
--
source
include
/
not_embedded
.
inc
# Windows doesn't support execution of shell scripts (to fix!!)
--
source
include
/
not_windows
.
inc
# Don't run this test if $MYSQL_FIX_SYSTEM_TABLES isn't set
# to the location of mysql_fix_privilege_tables.sql
if
(
`SELECT LENGTH("$MYSQL_FIX_SYSTEM_TABLES") <= 0`
)
{
skip
Test
need
MYSQL_FIX_SYSTEM_TABLES
;
}
# check that CSV engine was compiled in, as the test relies on the presence
# of the log tables (which are CSV-based)
--
source
include
/
have_csv
.
inc
...
...
mysql-test/t/system_mysql_db_fix40123.test
View file @
ff0ee38b
# Embedded server doesn't support external clients
--
source
include
/
not_embedded
.
inc
# Don't run this test if $MYSQL_FIX_PRIVILEGE_TABLES isn't set
# to the location of mysql_fix_privilege_tables.sql
if
(
`SELECT LENGTH("$MYSQL_FIX_PRIVILEGE_TABLES") <= 0`
)
{
skip
Test
need
MYSQL_FIX_PRIVILEGE_TABLES
;
}
#
# This is the test for mysql_fix_privilege_tables
# It checks that a system tables from mysql 4.1.23
...
...
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