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
0bdeffd8
Commit
0bdeffd8
authored
May 24, 2007
by
ramil/ram@ramil.myoffice.izhnet.ru
Browse files
Options
Browse Files
Download
Plain Diff
Merge mysql.com:/home/ram/work/b26842/b26842.5.0
into mysql.com:/home/ram/work/b26842/b26842.5.1
parents
d221363c
2c759bd4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
25 deletions
+12
-25
sql/sql_prepare.cc
sql/sql_prepare.cc
+12
-25
No files found.
sql/sql_prepare.cc
View file @
0bdeffd8
...
...
@@ -981,6 +981,7 @@ static bool insert_params_from_vars_with_log(Prepared_statement *stmt,
String
buf
;
const
String
*
val
;
uint32
length
=
0
;
THD
*
thd
=
stmt
->
thd
;
DBUG_ENTER
(
"insert_params_from_vars"
);
...
...
@@ -991,34 +992,20 @@ static bool insert_params_from_vars_with_log(Prepared_statement *stmt,
{
Item_param
*
param
=
*
it
;
varname
=
var_it
++
;
if
(
get_var_with_binlog
(
stmt
->
thd
,
stmt
->
lex
->
sql_command
,
*
varname
,
&
entry
))
DBUG_RETURN
(
1
);
if
(
param
->
set_from_user_var
(
stmt
->
thd
,
entry
))
entry
=
(
user_var_entry
*
)
hash_search
(
&
thd
->
user_vars
,
(
byte
*
)
varname
->
str
,
varname
->
length
);
/*
We have to call the setup_one_conversion_function() here to set
the parameter's members that might be needed further
(e.g. value.cs_info.character_set_client is used in the query_val_str()).
*/
setup_one_conversion_function
(
thd
,
param
,
param
->
param_type
);
if
(
param
->
set_from_user_var
(
thd
,
entry
))
DBUG_RETURN
(
1
);
/* Insert @'escaped-varname' instead of parameter in the query */
if
(
entry
)
{
char
*
start
,
*
ptr
;
buf
.
length
(
0
);
if
(
buf
.
reserve
(
entry
->
name
.
length
*
2
+
3
))
DBUG_RETURN
(
1
);
val
=
param
->
query_val_str
(
&
buf
);
start
=
ptr
=
buf
.
c_ptr_quick
();
*
ptr
++=
'@'
;
*
ptr
++=
'\''
;
ptr
+=
escape_string_for_mysql
(
&
my_charset_utf8_general_ci
,
ptr
,
0
,
entry
->
name
.
str
,
entry
->
name
.
length
);
*
ptr
++=
'\''
;
buf
.
length
(
ptr
-
start
);
val
=
&
buf
;
}
else
val
=
&
my_null_string
;
if
(
param
->
convert_str_value
(
stmt
->
thd
))
if
(
param
->
convert_str_value
(
thd
))
DBUG_RETURN
(
1
);
/* out of memory */
if
(
query
->
replace
(
param
->
pos_in_query
+
length
,
1
,
*
val
))
...
...
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