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
682cdb52
Commit
682cdb52
authored
Aug 05, 2010
by
Bjorn Munch
Browse files
Options
Browse Files
Download
Plain Diff
upmerge 55582
parents
dc4405a9
f3f5e04a
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
51 additions
and
3 deletions
+51
-3
client/mysqltest.cc
client/mysqltest.cc
+16
-1
mysql-test/include/mix2.inc
mysql-test/include/mix2.inc
+2
-2
mysql-test/r/mysqltest.result
mysql-test/r/mysqltest.result
+3
-0
mysql-test/t/mysqltest.test
mysql-test/t/mysqltest.test
+30
-0
No files found.
client/mysqltest.cc
View file @
682cdb52
...
...
@@ -2440,6 +2440,9 @@ void eval_expr(VAR *v, const char *p, const char **p_end)
if
((
vp
=
var_get
(
p
,
p_end
,
0
,
0
)))
var_copy
(
v
,
vp
);
/* Apparently it is not safe to assume null-terminated string */
v
->
str_val
[
v
->
str_val_len
]
=
0
;
/* Make sure there was just a $variable and nothing else */
const
char
*
end
=
*
p_end
+
1
;
if
(
end
<
expected_end
)
...
...
@@ -5426,8 +5429,20 @@ void do_block(enum block_cmd cmd, struct st_command* command)
/* Define inner block */
cur_block
++
;
cur_block
->
cmd
=
cmd
;
cur_block
->
ok
=
(
v
.
int_val
?
TRUE
:
FALSE
);
if
(
v
.
int_val
)
{
cur_block
->
ok
=
TRUE
;
}
else
/* Any non-empty string which does not begin with 0 is also TRUE */
{
p
=
v
.
str_val
;
/* First skip any leading white space or unary -+ */
while
(
*
p
&&
((
my_isspace
(
charset_info
,
*
p
)
||
*
p
==
'-'
||
*
p
==
'+'
)))
p
++
;
cur_block
->
ok
=
(
*
p
&&
*
p
!=
'0'
)
?
TRUE
:
FALSE
;
}
if
(
not_expr
)
cur_block
->
ok
=
!
cur_block
->
ok
;
...
...
mysql-test/include/mix2.inc
View file @
682cdb52
...
...
@@ -1910,7 +1910,7 @@ select hex(s1) from t4;
drop
table
t1
,
t2
,
t3
,
t4
;
}
if
(
test_foreign_keys
)
if
(
$
test_foreign_keys
)
{
eval
create
table
t1
(
a
int
primary
key
,
s1
varbinary
(
3
)
not
null
unique
)
engine
=
$engine_type
;
eval
create
table
t2
(
s1
binary
(
2
)
not
null
,
constraint
c
foreign
key
(
s1
)
references
t1
(
s1
)
on
update
cascade
)
engine
=
$engine_type
;
...
...
@@ -2407,7 +2407,7 @@ drop table t1, t2, t3, t5, t6, t8, t9;
}
# End transactional tests
if
(
test_foreign_keys
)
if
(
$
test_foreign_keys
)
{
# bug 18934, "InnoDB crashes when table uses column names like DB_ROW_ID"
--
error
1005
...
...
mysql-test/r/mysqltest.result
View file @
682cdb52
...
...
@@ -393,6 +393,9 @@ true-inner again
true-outer
Counter is greater than 0, (counter=10)
Counter is not 0, (counter=0)
Counter is true, (counter=alpha)
Beta is true
while with string, only once
1
Testing while with not
mysqltest: In included file "MYSQLTEST_VARDIR/tmp/mysqltest_while.inc": At line 64: Nesting too deeply
...
...
mysql-test/t/mysqltest.test
View file @
682cdb52
...
...
@@ -1105,6 +1105,36 @@ if (!$counter)
echo
Counter
is
not
0
,
(
counter
=
0
);
}
# ----------------------------------------------------------------------------
# Test if with some non-numerics
# ----------------------------------------------------------------------------
let
$counter
=
alpha
;
if
(
$counter
)
{
echo
Counter
is
true
,
(
counter
=
alpha
);
}
let
$counter
=
;
if
(
$counter
)
{
echo
oops
,
space
is
true
;
}
let
$counter
=-
0
;
if
(
$counter
)
{
echo
oops
,
-
0
is
true
;
}
if
(
beta
)
{
echo
Beta
is
true
;
}
let
$counter
=
gamma
;
while
(
$counter
)
{
echo
while
with
string
,
only
once
;
let
$counter
=
000
;
}
# ----------------------------------------------------------------------------
# Test while, { and }
# ----------------------------------------------------------------------------
...
...
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