diff options
author | Daniel Black <danielgb@au.ibm.com> | 2018-02-25 15:25:54 +1100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-25 15:25:54 +1100 |
commit | 0805a9565f09a36104a420d9e229e44b1eea8879 (patch) | |
tree | 5c5dbf942479c2b7349f1b4505768ddf5a2f8b8d /storage/spider/spd_db_conn.h | |
parent | 3188131b15c26509e4df3c4b15972d07a20be8bd (diff) | |
parent | 8936b175106a3fdfc560e9d33aa58a6372084c5f (diff) | |
download | mariadb-git-0805a9565f09a36104a420d9e229e44b1eea8879.tar.gz |
Merge branch '10.3' into 10.2-MDEV-10814-dont-dump-query-cache
Diffstat (limited to 'storage/spider/spd_db_conn.h')
-rw-r--r-- | storage/spider/spd_db_conn.h | 98 |
1 files changed, 78 insertions, 20 deletions
diff --git a/storage/spider/spd_db_conn.h b/storage/spider/spd_db_conn.h index 6d149f6d4a0..7977e61da58 100644 --- a/storage/spider/spd_db_conn.h +++ b/storage/spider/spd_db_conn.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2008-2015 Kentoku Shiba +/* Copyright (C) 2008-2017 Kentoku Shiba This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -11,7 +11,7 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA */ + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #define SPIDER_DB_WRAPPER_STR "mysql" #define SPIDER_DB_WRAPPER_LEN (sizeof(SPIDER_DB_WRAPPER_STR) - 1) @@ -192,6 +192,8 @@ #define SPIDER_SQL_PF_EQUAL_LEN (sizeof(SPIDER_SQL_PF_EQUAL_STR) - 1) #define SPIDER_SQL_GROUP_STR " group by " #define SPIDER_SQL_GROUP_LEN (sizeof(SPIDER_SQL_GROUP_STR) - 1) +#define SPIDER_SQL_HAVING_STR " having " +#define SPIDER_SQL_HAVING_LEN (sizeof(SPIDER_SQL_HAVING_STR) - 1) #define SPIDER_SQL_PLUS_STR " + " #define SPIDER_SQL_PLUS_LEN (sizeof(SPIDER_SQL_PLUS_STR) - 1) #define SPIDER_SQL_MINUS_STR " - " @@ -250,6 +252,13 @@ #define SPIDER_SQL_B_STR "b" #define SPIDER_SQL_B_LEN (sizeof(SPIDER_SQL_B_STR) - 1) +#define SPIDER_SQL_INDEX_IGNORE_STR " IGNORE INDEX " +#define SPIDER_SQL_INDEX_IGNORE_LEN (sizeof(SPIDER_SQL_INDEX_IGNORE_STR) - 1) +#define SPIDER_SQL_INDEX_USE_STR " USE INDEX " +#define SPIDER_SQL_INDEX_USE_LEN (sizeof(SPIDER_SQL_INDEX_USE_STR) - 1) +#define SPIDER_SQL_INDEX_FORCE_STR " FORCE INDEX " +#define SPIDER_SQL_INDEX_FORCE_LEN (sizeof(SPIDER_SQL_INDEX_FORCE_STR) - 1) + #define SPIDER_SQL_INT_LEN 20 #define SPIDER_SQL_HANDLER_CID_LEN 6 #define SPIDER_SQL_HANDLER_CID_FORMAT "t%05u" @@ -263,6 +272,13 @@ int spider_db_connect( int link_idx ); +int spider_db_ping_internal( + SPIDER_SHARE *share, + SPIDER_CONN *conn, + int all_link_idx, + int *need_mon +); + int spider_db_ping( ha_spider *spider, SPIDER_CONN *conn, @@ -325,7 +341,7 @@ int spider_db_query_for_bulk_update( ha_spider *spider, SPIDER_CONN *conn, int link_idx, - uint *dup_key_found + ha_rows *dup_key_found ); size_t spider_db_real_escape_string( @@ -713,7 +729,7 @@ int spider_db_bulk_update_size_limit( int spider_db_bulk_update_end( ha_spider *spider, - uint *dup_key_found + ha_rows *dup_key_found ); int spider_db_bulk_update( @@ -729,19 +745,27 @@ int spider_db_update( ); #ifdef HANDLER_HAS_DIRECT_UPDATE_ROWS +#ifdef HANDLER_HAS_DIRECT_UPDATE_ROWS_WITH_HS int spider_db_direct_update( ha_spider *spider, TABLE *table, KEY_MULTI_RANGE *ranges, uint range_count, - uint *update_rows + ha_rows *update_rows ); +#else +int spider_db_direct_update( + ha_spider *spider, + TABLE *table, + ha_rows *update_rows +); +#endif #endif #ifdef HA_CAN_BULK_ACCESS int spider_db_bulk_direct_update( ha_spider *spider, - uint *update_rows + ha_rows *update_rows ); #endif @@ -758,14 +782,22 @@ int spider_db_delete( ); #ifdef HANDLER_HAS_DIRECT_UPDATE_ROWS +#ifdef HANDLER_HAS_DIRECT_UPDATE_ROWS_WITH_HS int spider_db_direct_delete( ha_spider *spider, TABLE *table, KEY_MULTI_RANGE *ranges, uint range_count, - uint *delete_rows + ha_rows *delete_rows +); +#else +int spider_db_direct_delete( + ha_spider *spider, + TABLE *table, + ha_rows *delete_rows ); #endif +#endif int spider_db_delete_all_rows( ha_spider *spider @@ -812,7 +844,9 @@ int spider_db_print_item_type( spider_string *str, const char *alias, uint alias_length, - uint dbton_id + uint dbton_id, + bool use_fields, + spider_fields *fields ); int spider_db_open_item_cond( @@ -821,7 +855,9 @@ int spider_db_open_item_cond( spider_string *str, const char *alias, uint alias_length, - uint dbton_id + uint dbton_id, + bool use_fields, + spider_fields *fields ); int spider_db_open_item_func( @@ -830,7 +866,9 @@ int spider_db_open_item_func( spider_string *str, const char *alias, uint alias_length, - uint dbton_id + uint dbton_id, + bool use_fields, + spider_fields *fields ); #ifdef HANDLER_HAS_DIRECT_AGGREGATE @@ -840,7 +878,9 @@ int spider_db_open_item_sum_func( spider_string *str, const char *alias, uint alias_length, - uint dbton_id + uint dbton_id, + bool use_fields, + spider_fields *fields ); #endif @@ -850,7 +890,9 @@ int spider_db_open_item_ident( spider_string *str, const char *alias, uint alias_length, - uint dbton_id + uint dbton_id, + bool use_fields, + spider_fields *fields ); int spider_db_open_item_field( @@ -859,7 +901,9 @@ int spider_db_open_item_field( spider_string *str, const char *alias, uint alias_length, - uint dbton_id + uint dbton_id, + bool use_fields, + spider_fields *fields ); int spider_db_open_item_ref( @@ -868,7 +912,9 @@ int spider_db_open_item_ref( spider_string *str, const char *alias, uint alias_length, - uint dbton_id + uint dbton_id, + bool use_fields, + spider_fields *fields ); int spider_db_open_item_row( @@ -877,7 +923,9 @@ int spider_db_open_item_row( spider_string *str, const char *alias, uint alias_length, - uint dbton_id + uint dbton_id, + bool use_fields, + spider_fields *fields ); int spider_db_open_item_string( @@ -886,7 +934,9 @@ int spider_db_open_item_string( spider_string *str, const char *alias, uint alias_length, - uint dbton_id + uint dbton_id, + bool use_fields, + spider_fields *fields ); int spider_db_open_item_int( @@ -895,7 +945,9 @@ int spider_db_open_item_int( spider_string *str, const char *alias, uint alias_length, - uint dbton_id + uint dbton_id, + bool use_fields, + spider_fields *fields ); int spider_db_open_item_cache( @@ -904,7 +956,9 @@ int spider_db_open_item_cache( spider_string *str, const char *alias, uint alias_length, - uint dbton_id + uint dbton_id, + bool use_fields, + spider_fields *fields ); int spider_db_open_item_insert_value( @@ -913,7 +967,9 @@ int spider_db_open_item_insert_value( spider_string *str, const char *alias, uint alias_length, - uint dbton_id + uint dbton_id, + bool use_fields, + spider_fields *fields ); int spider_db_append_condition( @@ -929,7 +985,9 @@ int spider_db_append_update_columns( spider_string *str, const char *alias, uint alias_length, - uint dbton_id + uint dbton_id, + bool use_fields, + spider_fields *fields ); #endif |