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
ced32517
Commit
ced32517
authored
Sep 01, 2005
by
msvensson@neptunus.(none)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug #3131 mysqltest fails on $2=$1 assignment in test
parent
906f7c44
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
42 additions
and
7 deletions
+42
-7
client/mysqltest.c
client/mysqltest.c
+15
-7
mysql-test/r/mysqltest.result
mysql-test/r/mysqltest.result
+7
-0
mysql-test/t/mysqltest.test
mysql-test/t/mysqltest.test
+20
-0
No files found.
client/mysqltest.c
View file @
ced32517
...
...
@@ -1147,16 +1147,24 @@ int var_query_set(VAR* v, const char *p, const char** p_end)
return
0
;
}
void
var_copy
(
VAR
*
dest
,
VAR
*
src
)
void
var_copy
(
VAR
*
dest
,
VAR
*
src
)
{
dest
->
int_val
=
src
->
int_val
;
dest
->
int_dirty
=
src
->
int_dirty
;
dest
->
int_val
=
src
->
int_val
;
dest
->
int_dirty
=
src
->
int_dirty
;
/* Alloc/realloc data for str_val in dest */
if
(
dest
->
alloced_len
<
src
->
alloced_len
&&
!
(
dest
->
str_val
=
my_realloc
(
dest
->
str_val
,
src
->
alloced_len
+
1
,
MYF
(
MY_WME
))))
!
(
dest
->
str_val
=
dest
->
str_val
?
my_realloc
(
dest
->
str_val
,
src
->
alloced_len
,
MYF
(
MY_WME
))
:
my_malloc
(
src
->
alloced_len
,
MYF
(
MY_WME
))))
die
(
"Out of memory"
);
dest
->
str_val_len
=
src
->
str_val_len
;
memcpy
(
dest
->
str_val
,
src
->
str_val
,
src
->
str_val_len
+
1
);
else
dest
->
alloced_len
=
src
->
alloced_len
;
/* Copy str_val data to dest */
dest
->
str_val_len
=
src
->
str_val_len
;
if
(
src
->
str_val_len
)
memcpy
(
dest
->
str_val
,
src
->
str_val
,
src
->
str_val_len
);
}
int
eval_expr
(
VAR
*
v
,
const
char
*
p
,
const
char
**
p_end
)
...
...
mysql-test/r/mysqltest.result
View file @
ced32517
...
...
@@ -206,6 +206,13 @@ source database
hej
hej
hej
1
a long variable content
a long variable content
a long $where variable content
mysqltest: At line 1: Missing arguments to let
mysqltest: At line 1: Missing variable name in let
mysqltest: At line 1: Variable name in hi=hi does not start with '$'
...
...
mysql-test/t/mysqltest.test
View file @
ced32517
...
...
@@ -473,6 +473,26 @@ echo $1;
let
$
1
=
hej
;
echo
$
1
;
let
$
1
=
1
;
let
$
2
=
$
1
;
echo
$
2
;
let
$
5
=
$
6
;
echo
$
5
;
echo
$
6
;
let
$where
=
a
long
variable
content
;
echo
$where
;
let
$where2
=
$where
;
echo
$where2
;
let
$where3
=
a
long
$where
variable
content
;
echo
$where3
;
let
$novar1
=
$novar2
;
echo
$novar1
;
# Test illegal uses of let
...
...
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