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
3e99e79d
Commit
3e99e79d
authored
Jul 08, 2003
by
venu@myvenu.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge venu@bk-internal.mysql.com:/home/bk/mysql-4.1
into myvenu.com:/home/venu/work/sql/dev-4.1
parents
0aa4563e
bb718b31
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
33 additions
and
1 deletion
+33
-1
include/mysql.h
include/mysql.h
+1
-0
include/mysql_com.h
include/mysql_com.h
+1
-0
libmysql/libmysql.c
libmysql/libmysql.c
+23
-0
libmysql/libmysql.def
libmysql/libmysql.def
+1
-0
sql/mysql_priv.h
sql/mysql_priv.h
+1
-0
sql/sql_parse.cc
sql/sql_parse.cc
+5
-0
sql/sql_prepare.cc
sql/sql_prepare.cc
+1
-1
No files found.
include/mysql.h
View file @
3e99e79d
...
...
@@ -566,6 +566,7 @@ unsigned long STDCALL mysql_param_count(MYSQL_STMT * stmt);
my_bool
STDCALL
mysql_bind_param
(
MYSQL_STMT
*
stmt
,
MYSQL_BIND
*
bnd
);
my_bool
STDCALL
mysql_bind_result
(
MYSQL_STMT
*
stmt
,
MYSQL_BIND
*
bnd
);
my_bool
STDCALL
mysql_stmt_close
(
MYSQL_STMT
*
stmt
);
my_bool
STDCALL
mysql_stmt_reset
(
MYSQL_STMT
*
stmt
);
my_bool
STDCALL
mysql_stmt_free_result
(
MYSQL_STMT
*
stmt
);
unsigned
int
STDCALL
mysql_stmt_errno
(
MYSQL_STMT
*
stmt
);
const
char
*
STDCALL
mysql_stmt_error
(
MYSQL_STMT
*
stmt
);
...
...
include/mysql_com.h
View file @
3e99e79d
...
...
@@ -44,6 +44,7 @@ enum enum_server_command
COM_TIME
,
COM_DELAYED_INSERT
,
COM_CHANGE_USER
,
COM_BINLOG_DUMP
,
COM_TABLE_DUMP
,
COM_CONNECT_OUT
,
COM_REGISTER_SLAVE
,
COM_PREPARE
,
COM_EXECUTE
,
COM_LONG_DATA
,
COM_CLOSE_STMT
,
COM_RESET_STMT
,
COM_END
/* Must be last */
};
...
...
libmysql/libmysql.c
View file @
3e99e79d
...
...
@@ -3316,6 +3316,7 @@ mysql_stmt_data_seek(MYSQL_STMT *stmt, my_ulonglong row)
}
else
DBUG_PRINT
(
"exit"
,
(
"stmt doesn't contain any resultset"
));
DBUG_VOID_RETURN
;
}
...
...
@@ -3421,6 +3422,28 @@ my_bool STDCALL mysql_stmt_close(MYSQL_STMT *stmt)
return
stmt_close
(
stmt
,
0
);
}
/*
Reset the statement buffers in server
*/
my_bool
STDCALL
mysql_stmt_reset
(
MYSQL_STMT
*
stmt
)
{
char
buff
[
MYSQL_STMT_HEADER
];
MYSQL
*
mysql
;
DBUG_ENTER
(
"mysql_stmt_reset"
);
DBUG_ASSERT
(
stmt
!=
0
);
mysql
=
stmt
->
mysql
->
last_used_con
;
int4store
(
buff
,
stmt
->
stmt_id
);
/* Send stmt id to server */
if
(
advanced_command
(
mysql
,
COM_RESET_STMT
,
buff
,
MYSQL_STMT_HEADER
,
0
,
0
,
1
))
{
set_stmt_errmsg
(
stmt
,
mysql
->
net
.
last_error
,
mysql
->
net
.
last_errno
,
mysql
->
net
.
sqlstate
);
DBUG_RETURN
(
1
);
}
DBUG_RETURN
(
0
);
}
/*
Return statement error code
*/
...
...
libmysql/libmysql.def
View file @
3e99e79d
...
...
@@ -98,6 +98,7 @@ EXPORTS
mysql_stat
mysql_stmt_affected_rows
mysql_stmt_close
mysql_stmt_reset
mysql_stmt_data_seek
mysql_stmt_errno
mysql_stmt_error
...
...
sql/mysql_priv.h
View file @
3e99e79d
...
...
@@ -557,6 +557,7 @@ void free_prep_stmt(PREP_STMT *stmt, TREE_FREE mode, void *not_used);
bool
mysql_stmt_prepare
(
THD
*
thd
,
char
*
packet
,
uint
packet_length
);
void
mysql_stmt_execute
(
THD
*
thd
,
char
*
packet
);
void
mysql_stmt_free
(
THD
*
thd
,
char
*
packet
);
void
mysql_stmt_reset
(
THD
*
thd
,
char
*
packet
);
void
mysql_stmt_get_longdata
(
THD
*
thd
,
char
*
pos
,
ulong
packet_length
);
int
check_insert_fields
(
THD
*
thd
,
TABLE
*
table
,
List
<
Item
>
&
fields
,
List
<
Item
>
&
values
,
ulong
counter
);
...
...
sql/sql_parse.cc
View file @
3e99e79d
...
...
@@ -1290,6 +1290,11 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
mysql_stmt_free
(
thd
,
packet
);
break
;
}
case
COM_RESET_STMT
:
{
mysql_stmt_reset
(
thd
,
packet
);
break
;
}
case
COM_QUERY
:
{
if
(
alloc_query
(
thd
,
packet
,
packet_length
))
...
...
sql/sql_prepare.cc
View file @
3e99e79d
...
...
@@ -965,7 +965,7 @@ void mysql_stmt_reset(THD *thd, char *packet)
PREP_STMT
*
stmt
;
DBUG_ENTER
(
"mysql_stmt_reset"
);
if
(
!
(
stmt
=
find_prepared_statement
(
thd
,
stmt_id
,
"close
"
)))
if
(
!
(
stmt
=
find_prepared_statement
(
thd
,
stmt_id
,
"reset
"
)))
{
send_error
(
thd
);
DBUG_VOID_RETURN
;
...
...
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