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
7c41c226
Commit
7c41c226
authored
Feb 13, 2007
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge bk@192.168.21.1:mysql-4.1-opt
into mysql.com:/home/hf/work/25492/my41-25492
parents
db0d7d66
07efefd2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
7 deletions
+27
-7
libmysqld/lib_sql.cc
libmysqld/lib_sql.cc
+27
-7
No files found.
libmysqld/lib_sql.cc
View file @
7c41c226
...
...
@@ -66,6 +66,16 @@ void embedded_get_error(MYSQL *mysql)
}
}
static
void
emb_free_rows
(
THD
*
thd
)
{
if
(
thd
->
current_stmt
)
free_root
(
&
thd
->
data
->
alloc
,
MYF
(
0
));
else
free_rows
(
thd
->
data
);
}
static
my_bool
emb_advanced_command
(
MYSQL
*
mysql
,
enum
enum_server_command
command
,
const
char
*
header
,
ulong
header_length
,
...
...
@@ -78,7 +88,7 @@ emb_advanced_command(MYSQL *mysql, enum enum_server_command command,
if
(
thd
->
data
)
{
free_rows
(
thd
->
data
);
emb_free_rows
(
thd
);
thd
->
data
=
0
;
}
/* Check that we are calling the client functions in right order */
...
...
@@ -248,13 +258,23 @@ static int emb_stmt_execute(MYSQL_STMT *stmt)
int
emb_read_binary_rows
(
MYSQL_STMT
*
stmt
)
{
MYSQL_DATA
*
data
;
if
(
!
(
data
=
emb_read_rows
(
stmt
->
mysql
,
0
,
0
)))
MYSQL
*
mysql
=
stmt
->
mysql
;
embedded_get_error
(
mysql
);
if
(
mysql
->
net
.
last_errno
)
{
set_stmt_errmsg
(
stmt
,
stmt
->
mysql
->
net
.
last_error
,
stmt
->
mysql
->
net
.
last_errno
,
stmt
->
mysql
->
net
.
sqlstate
);
set_stmt_errmsg
(
stmt
,
mysql
->
net
.
last_error
,
mysql
->
net
.
last_errno
,
mysql
->
net
.
sqlstate
);
return
1
;
}
if
(((
THD
*
)
mysql
->
thd
)
->
data
)
{
DBUG_ASSERT
(((
THD
*
)
mysql
->
thd
)
->
data
==
&
stmt
->
result
);
stmt
->
result
.
prev_ptr
=
NULL
;
((
THD
*
)
mysql
->
thd
)
->
data
=
NULL
;
}
else
stmt
->
result
.
rows
=
0
;
return
0
;
}
...
...
@@ -269,7 +289,7 @@ int emb_unbuffered_fetch(MYSQL *mysql, char **row)
*
row
=
NULL
;
if
(
data
)
{
free_ro
ws
(
data
);
free_ro
ot
(
&
data
->
alloc
,
MYF
(
0
)
);
((
THD
*
)
mysql
->
thd
)
->
data
=
NULL
;
}
}
...
...
@@ -285,7 +305,7 @@ static void emb_free_embedded_thd(MYSQL *mysql)
{
THD
*
thd
=
(
THD
*
)
mysql
->
thd
;
if
(
thd
->
data
)
free_rows
(
thd
->
data
);
emb_free_rows
(
thd
);
thread_count
--
;
delete
thd
;
mysql
->
thd
=
0
;
...
...
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