mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
Port of cursors to be pushed into 5.0 tree:
- client side part is simple and may be considered stable - server side part now just joggles with THD state to save execution state and has no additional locking wisdom. Lot's of it are to be rewritten.
This commit is contained in:
@@ -49,7 +49,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_SET_OPTION,
|
||||
COM_RESET_STMT, COM_SET_OPTION, COM_FETCH,
|
||||
COM_END /* Must be last */
|
||||
};
|
||||
|
||||
@@ -132,6 +132,17 @@ enum enum_server_command
|
||||
#define SERVER_MORE_RESULTS_EXISTS 8 /* Multi query - next query exists */
|
||||
#define SERVER_QUERY_NO_GOOD_INDEX_USED 16
|
||||
#define SERVER_QUERY_NO_INDEX_USED 32
|
||||
/*
|
||||
The server was able to fulfill client request and open read-only
|
||||
non-scrollable cursor for the query. This flag comes in server
|
||||
status with reply to COM_EXECUTE and COM_EXECUTE_DIRECT commands.
|
||||
*/
|
||||
#define SERVER_STATUS_CURSOR_EXISTS 64
|
||||
/*
|
||||
This flag is sent with last row of read-only cursor, in reply to
|
||||
COM_FETCH command.
|
||||
*/
|
||||
#define SERVER_STATUS_LAST_ROW_SENT 128
|
||||
|
||||
#define MYSQL_ERRMSG_SIZE 512
|
||||
#define NET_READ_TIMEOUT 30 /* Timeout on read */
|
||||
@@ -257,6 +268,16 @@ enum enum_shutdown_level {
|
||||
KILL_CONNECTION= 255
|
||||
};
|
||||
|
||||
|
||||
enum enum_cursor_type
|
||||
{
|
||||
CURSOR_TYPE_NO_CURSOR= 0,
|
||||
CURSOR_TYPE_READ_ONLY= 1,
|
||||
CURSOR_TYPE_FOR_UPDATE= 2,
|
||||
CURSOR_TYPE_SCROLLABLE= 4
|
||||
};
|
||||
|
||||
|
||||
/* options for mysql_set_option */
|
||||
enum enum_mysql_set_option
|
||||
{
|
||||
|
Reference in New Issue
Block a user