From 32e6f8ff2eb54f029e9fced9b17b780e7b7bd6d9 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Wed, 10 Jan 2024 20:31:43 +0100 Subject: [PATCH] cleanup: remove unconditional #ifdef's --- config.h.cmake | 8 -------- include/my_base.h | 5 ----- include/myisampack.h | 6 ------ libmysqld/emb_qcache.cc | 4 ---- sql/cset_narrowing.cc | 4 ---- sql/debug_sync.h | 4 ---- sql/field.cc | 4 ---- sql/field.h | 4 ---- sql/gcalc_slicescan.cc | 5 ----- sql/gcalc_tools.cc | 5 ----- sql/handler.cc | 2 -- sql/handler.h | 4 ---- sql/hash_filo.cc | 4 ---- sql/hash_filo.h | 4 ---- sql/item.cc | 4 ---- sql/item.h | 5 ----- sql/item_cmpfunc.cc | 4 ---- sql/item_cmpfunc.h | 4 ---- sql/item_create.cc | 8 -------- sql/item_func.cc | 4 ---- sql/item_func.h | 4 ---- sql/item_geofunc.cc | 7 ------- sql/item_geofunc.h | 12 ------------ sql/item_strfunc.cc | 4 ---- sql/item_strfunc.h | 4 ---- sql/item_subselect.cc | 4 ---- sql/item_subselect.h | 4 ---- sql/item_sum.cc | 4 ---- sql/item_sum.h | 4 ---- sql/item_timefunc.cc | 4 ---- sql/item_timefunc.h | 4 ---- sql/item_vers.h | 4 ---- sql/lex.h | 2 -- sql/lex_symbol.h | 2 -- sql/log_event.cc | 4 ++-- sql/log_event.h | 4 ---- sql/mysqld.cc | 19 ------------------ sql/net_serv.cc | 2 -- sql/opt_range.cc | 4 ---- sql/opt_range.h | 4 ---- sql/opt_rewrite_date_cmp.cc | 4 ---- sql/opt_rewrite_remove_casefold.cc | 17 +++++++++++++--- sql/opt_subselect.cc | 4 ---- sql/opt_subselect.h | 4 ---- sql/opt_table_elimination.cc | 4 ---- sql/partition_info.cc | 4 ---- sql/partition_info.h | 4 ---- sql/procedure.cc | 4 ---- sql/procedure.h | 4 ---- sql/protocol.cc | 4 ---- sql/protocol.h | 4 ---- sql/records.cc | 4 ---- sql/records.h | 4 ---- sql/scheduler.cc | 4 ---- sql/scheduler.h | 4 ---- sql/set_var.h | 4 ---- sql/sp_cache.cc | 3 --- sql/sp_cache.h | 4 ---- sql/sp_head.cc | 4 ---- sql/sp_head.h | 4 ---- sql/sp_pcontext.cc | 4 ---- sql/sp_pcontext.h | 4 ---- sql/sp_rcontext.cc | 4 ---- sql/sp_rcontext.h | 4 ---- sql/spatial.cc | 4 ---- sql/spatial.h | 9 +++------ sql/sql_analyse.cc | 4 ---- sql/sql_analyse.h | 4 ---- sql/sql_analyze_stmt.cc | 4 ---- sql/sql_cache.cc | 4 ---- sql/sql_cache.h | 24 ++--------------------- sql/sql_class.cc | 4 ---- sql/sql_class.h | 2 -- sql/sql_crypt.cc | 4 ---- sql/sql_crypt.h | 5 ----- sql/sql_cursor.cc | 3 --- sql/sql_cursor.h | 4 ---- sql/sql_explain.cc | 4 ---- sql/sql_handler.cc | 4 ---- sql/sql_handler.h | 4 ---- sql/sql_join_cache.cc | 4 ---- sql/sql_list.cc | 5 ----- sql/sql_list.h | 4 ---- sql/sql_mode.h | 4 ---- sql/sql_parse.cc | 2 -- sql/sql_partition.h | 4 ---- sql/sql_reload.cc | 2 -- sql/sql_select.cc | 6 ------ sql/sql_select.h | 4 ---- sql/sql_string.cc | 4 ---- sql/sql_string.h | 4 ---- sql/sql_table.cc | 12 ------------ sql/sql_type.cc | 23 +++------------------- sql/sql_type.h | 5 ----- sql/sql_type_geom.cc | 4 ---- sql/sql_type_geom.h | 8 -------- sql/sql_udf.cc | 4 ---- sql/sql_udf.h | 4 ---- sql/sql_yacc.yy | 5 ----- sql/sys_vars.cc | 4 ---- sql/sys_vars.inl | 2 +- sql/transaction.cc | 5 ----- sql/transaction.h | 4 ---- sql/tztime.cc | 4 ---- sql/tztime.h | 5 ----- storage/archive/ha_archive.cc | 4 ---- storage/archive/ha_archive.h | 4 ---- storage/blackhole/ha_blackhole.cc | 5 ----- storage/blackhole/ha_blackhole.h | 4 ---- storage/connect/connect.cc | 3 --- storage/connect/ha_connect.cc | 4 ---- storage/connect/ha_connect.h | 4 ---- storage/connect/user_connect.cc | 3 --- storage/connect/user_connect.h | 4 ---- storage/csv/transparent_file.cc | 4 ---- storage/example/ha_example.cc | 4 ---- storage/example/ha_example.h | 4 ---- storage/federated/ha_federated.cc | 4 ---- storage/federated/ha_federated.h | 4 ---- storage/federatedx/federatedx_io.cc | 4 ---- storage/federatedx/federatedx_io_mysql.cc | 5 ----- storage/federatedx/federatedx_io_null.cc | 5 ----- storage/federatedx/federatedx_txn.cc | 4 ---- storage/federatedx/ha_federatedx.cc | 4 ---- storage/federatedx/ha_federatedx.h | 5 ----- storage/heap/ha_heap.cc | 4 ---- storage/heap/ha_heap.h | 5 ----- storage/innobase/handler/ha_innodb.cc | 2 -- storage/maria/ha_maria.cc | 6 ------ storage/maria/ha_maria.h | 6 ------ storage/maria/ma_check.c | 2 -- storage/maria/ma_create.c | 7 ------- storage/maria/ma_open.c | 9 --------- storage/maria/ma_range.c | 2 -- storage/maria/ma_rkey.c | 2 -- storage/maria/ma_rnext.c | 4 ---- storage/maria/ma_rnext_same.c | 2 -- storage/maria/ma_rt_index.c | 5 ----- storage/maria/ma_rt_index.h | 3 --- storage/maria/ma_rt_key.c | 4 ---- storage/maria/ma_rt_key.h | 4 ---- storage/maria/ma_rt_mbr.c | 4 ---- storage/maria/ma_rt_mbr.h | 3 --- storage/maria/ma_rt_split.c | 5 ----- storage/maria/ma_rt_test.c | 10 ---------- storage/maria/ma_sp_defs.h | 4 ---- storage/maria/ma_sp_key.c | 4 ---- storage/maria/ma_sp_test.c | 8 -------- storage/maria/ma_state.c | 2 -- storage/mroonga/ha_mroonga.cpp | 4 ---- storage/mroonga/ha_mroonga.hpp | 10 +--------- storage/mroonga/mrn_mysql_compat.h | 6 +----- storage/myisam/ha_myisam.cc | 7 ------- storage/myisam/ha_myisam.h | 7 ------- storage/myisam/mi_check.c | 4 ---- storage/myisam/mi_create.c | 7 ------- storage/myisam/mi_key.c | 4 ---- storage/myisam/mi_locking.c | 2 -- storage/myisam/mi_open.c | 9 --------- storage/myisam/mi_range.c | 2 -- storage/myisam/mi_rkey.c | 2 -- storage/myisam/mi_rnext.c | 4 ---- storage/myisam/mi_rnext_same.c | 2 -- storage/myisam/rt_index.c | 6 ------ storage/myisam/rt_index.h | 4 ---- storage/myisam/rt_key.c | 4 ---- storage/myisam/rt_key.h | 4 ---- storage/myisam/rt_mbr.c | 5 ----- storage/myisam/rt_mbr.h | 3 --- storage/myisam/rt_split.c | 5 ----- storage/myisam/rt_test.c | 10 ---------- storage/myisam/sp_defs.h | 3 --- storage/myisam/sp_key.c | 4 ---- storage/myisam/sp_test.c | 8 -------- storage/myisammrg/ha_myisammrg.cc | 8 ++------ storage/myisammrg/ha_myisammrg.h | 5 ----- storage/oqgraph/ha_oqgraph.cc | 4 ---- storage/oqgraph/ha_oqgraph.h | 4 ---- storage/rocksdb/ha_rocksdb.cc | 4 ---- storage/rocksdb/ha_rocksdb.h | 4 ---- storage/rocksdb/rdb_cf_manager.cc | 4 ---- storage/rocksdb/rdb_cf_options.cc | 4 ---- storage/rocksdb/rdb_compact_filter.h | 4 ---- storage/rocksdb/rdb_datadic.cc | 4 ---- storage/rocksdb/rdb_psi.cc | 4 ---- storage/rocksdb/rdb_threads.cc | 4 ---- storage/sphinx/ha_sphinx.cc | 4 ---- storage/sphinx/ha_sphinx.h | 5 ----- storage/spider/ha_spider.cc | 4 ---- storage/spider/ha_spider.h | 4 ---- 190 files changed, 29 insertions(+), 875 deletions(-) diff --git a/config.h.cmake b/config.h.cmake index 1cb7e021ac9..8b9fe5eee68 100644 --- a/config.h.cmake +++ b/config.h.cmake @@ -500,14 +500,6 @@ #cmakedefine HAVE_des 1 #cmakedefine HAVE_hkdf 1 -/* - Stuff that always need to be defined (compile breaks without it) -*/ -#define HAVE_SPATIAL 1 -#define HAVE_RTREE_KEYS 1 -#define HAVE_QUERY_CACHE 1 -#define BIG_TABLES 1 - /* Important storage engines (those that really need define WITH__STORAGE_ENGINE for the whole server) diff --git a/include/my_base.h b/include/my_base.h index eaeef5b5422..f83ec2e855c 100644 --- a/include/my_base.h +++ b/include/my_base.h @@ -676,13 +676,8 @@ typedef struct st_page_range #define unused_page_range { UNUSED_PAGE_NO, UNUSED_PAGE_NO } /* For number of records */ -#ifdef BIG_TABLES #define rows2double(A) ulonglong2double(A) typedef my_off_t ha_rows; -#else -#define rows2double(A) (double) (A) -typedef ulong ha_rows; -#endif #define HA_POS_ERROR (~ (ha_rows) 0) #define HA_OFFSET_ERROR (~ (my_off_t) 0) diff --git a/include/myisampack.h b/include/myisampack.h index f3c5fe7114a..77fe7716743 100644 --- a/include/myisampack.h +++ b/include/myisampack.h @@ -234,14 +234,8 @@ /* Fix to avoid warnings when sizeof(ha_rows) == sizeof(long) */ -#ifdef BIG_TABLES #define mi_rowstore(T,A) mi_int8store(T, A) #define mi_rowkorr(T) mi_uint8korr(T) -#else -#define mi_rowstore(T,A) { mi_int4store(T, 0);\ - mi_int4store(((uchar*) (T) + 4), A); } -#define mi_rowkorr(T) mi_uint4korr((const uchar*) (T) + 4) -#endif #if SIZEOF_OFF_T > 4 #define mi_sizestore(T,A) mi_int8store(T, A) diff --git a/libmysqld/emb_qcache.cc b/libmysqld/emb_qcache.cc index 31f4cf111ee..37b33d13321 100644 --- a/libmysqld/emb_qcache.cc +++ b/libmysqld/emb_qcache.cc @@ -16,7 +16,6 @@ #include "mariadb.h" #include "sql_priv.h" -#ifdef HAVE_QUERY_CACHE #include #include "sql_basic_types.h" #include "emb_qcache.h" @@ -497,6 +496,3 @@ return_ok: err: DBUG_RETURN(1); } - -#endif /*HAVE_QUERY_CACHE*/ - diff --git a/sql/cset_narrowing.cc b/sql/cset_narrowing.cc index abdaec16416..9ba48c9ebb7 100644 --- a/sql/cset_narrowing.cc +++ b/sql/cset_narrowing.cc @@ -14,10 +14,6 @@ along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA */ -#ifdef USE_PRAGMA_IMPLEMENTATION -#pragma implementation // gcc: Class implementation -#endif - #include "mariadb.h" #include "sql_priv.h" #include "sql_select.h" diff --git a/sql/debug_sync.h b/sql/debug_sync.h index 831b86b688e..f0897aae2ff 100644 --- a/sql/debug_sync.h +++ b/sql/debug_sync.h @@ -22,10 +22,6 @@ Declarations for the Debug Sync Facility. See debug_sync.cc for details. */ -#ifdef USE_PRAGMA_INTERFACE -#pragma interface /* gcc class implementation */ -#endif - class THD; #if defined(ENABLED_DEBUG_SYNC) diff --git a/sql/field.cc b/sql/field.cc index 5fcd5eb57a4..94423d4423e 100644 --- a/sql/field.cc +++ b/sql/field.cc @@ -23,10 +23,6 @@ This file implements classes defined in field.h */ -#ifdef USE_PRAGMA_IMPLEMENTATION -#pragma implementation // gcc: Class implementation -#endif - #include "mariadb.h" #include "sql_priv.h" #include "sql_select.h" diff --git a/sql/field.h b/sql/field.h index 6b09da4dc3f..ffa54294cf4 100644 --- a/sql/field.h +++ b/sql/field.h @@ -21,10 +21,6 @@ variables must declare the size_of() member function. */ -#ifdef USE_PRAGMA_INTERFACE -#pragma interface /* gcc class implementation */ -#endif - #include "mysqld.h" /* system_charset_info */ #include "table.h" /* TABLE */ #include "sql_string.h" /* String */ diff --git a/sql/gcalc_slicescan.cc b/sql/gcalc_slicescan.cc index 9af635eb5ab..c1ba9e7cf60 100644 --- a/sql/gcalc_slicescan.cc +++ b/sql/gcalc_slicescan.cc @@ -19,8 +19,6 @@ #include #include -#ifdef HAVE_SPATIAL - #include "gcalc_slicescan.h" @@ -2010,6 +2008,3 @@ double Gcalc_scan_iterator::get_pure_double(const Gcalc_internal_coord *d, res*= -1.0; return res; } - - -#endif /* HAVE_SPATIAL */ diff --git a/sql/gcalc_tools.cc b/sql/gcalc_tools.cc index 25c80a7a796..49d9a4ac58b 100644 --- a/sql/gcalc_tools.cc +++ b/sql/gcalc_tools.cc @@ -17,8 +17,6 @@ #include "mariadb.h" -#ifdef HAVE_SPATIAL - #include "gcalc_tools.h" #include "spatial.h" @@ -1466,6 +1464,3 @@ void Gcalc_operation_reducer::reset() m_res_hook= (Gcalc_dyn_list::Item **)&m_result; free_list(m_first_active_thread); } - -#endif /*HAVE_SPATIAL*/ - diff --git a/sql/handler.cc b/sql/handler.cc index 5d7a9c13808..d06ae0d6078 100644 --- a/sql/handler.cc +++ b/sql/handler.cc @@ -2217,10 +2217,8 @@ commit_one_phase_2(THD *thd, bool all, THD_TRANS *trans, bool is_real_trans) trans->no_2pc=0; if (all) { -#ifdef HAVE_QUERY_CACHE if (thd->transaction->changed_tables) query_cache.invalidate(thd, thd->transaction->changed_tables); -#endif } } diff --git a/sql/handler.h b/sql/handler.h index f914ff112aa..5162ea35291 100644 --- a/sql/handler.h +++ b/sql/handler.h @@ -21,10 +21,6 @@ /* Definitions for parameters to do with handler-routines */ -#ifdef USE_PRAGMA_INTERFACE -#pragma interface /* gcc class implementation */ -#endif - #include "sql_const.h" #include "sql_basic_types.h" #include "mysqld.h" /* server_id */ diff --git a/sql/hash_filo.cc b/sql/hash_filo.cc index 085c12f15da..854a2b5c5b3 100644 --- a/sql/hash_filo.cc +++ b/sql/hash_filo.cc @@ -19,10 +19,6 @@ ** to usage. */ -#ifdef USE_PRAGMA_IMPLEMENTATION -#pragma implementation // gcc: Class implementation -#endif - #include "mariadb.h" #include "sql_priv.h" #include "hash_filo.h" diff --git a/sql/hash_filo.h b/sql/hash_filo.h index 4dba104f716..9ba4d96d089 100644 --- a/sql/hash_filo.h +++ b/sql/hash_filo.h @@ -22,10 +22,6 @@ #ifndef HASH_FILO_H #define HASH_FILO_H -#ifdef USE_PRAGMA_INTERFACE -#pragma interface /* gcc class interface */ -#endif - #include "hash.h" /* my_hash_get_key, my_hash_free_key, HASH */ #include "m_string.h" /* bzero */ #include "mysqld.h" /* key_hash_filo_lock */ diff --git a/sql/item.cc b/sql/item.cc index e887b1f8919..e7357658ef3 100644 --- a/sql/item.cc +++ b/sql/item.cc @@ -15,10 +15,6 @@ along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA */ - -#ifdef USE_PRAGMA_IMPLEMENTATION -#pragma implementation // gcc: Class implementation -#endif #include "mariadb.h" /* NO_EMBEDDED_ACCESS_CHECKS */ #include "sql_priv.h" #include diff --git a/sql/item.h b/sql/item.h index 9a3146fbe0a..0d31e9b961f 100644 --- a/sql/item.h +++ b/sql/item.h @@ -17,11 +17,6 @@ along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA */ - -#ifdef USE_PRAGMA_INTERFACE -#pragma interface /* gcc class implementation */ -#endif - #include "sql_priv.h" /* STRING_BUFFER_USUAL_SIZE */ #include "unireg.h" #include "sql_const.h" /* RAND_TABLE_BIT, MAX_FIELD_NAME */ diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc index d1a98da4a08..fa34c95eee6 100644 --- a/sql/item_cmpfunc.cc +++ b/sql/item_cmpfunc.cc @@ -22,10 +22,6 @@ This file defines all compare functions */ -#ifdef USE_PRAGMA_IMPLEMENTATION -#pragma implementation // gcc: Class implementation -#endif - #include "mariadb.h" #include "sql_priv.h" #include diff --git a/sql/item_cmpfunc.h b/sql/item_cmpfunc.h index edc5e8e0cf0..af3d9868c9a 100644 --- a/sql/item_cmpfunc.h +++ b/sql/item_cmpfunc.h @@ -19,10 +19,6 @@ /* compare and test functions */ -#ifdef USE_PRAGMA_INTERFACE -#pragma interface /* gcc class implementation */ -#endif - #include "item_func.h" /* Item_int_func, Item_bool_func */ #include "item.h" #include "opt_rewrite_date_cmp.h" diff --git a/sql/item_create.cc b/sql/item_create.cc index 44deb904c27..98832e5e46b 100644 --- a/sql/item_create.cc +++ b/sql/item_create.cc @@ -49,9 +49,7 @@ get_native_fct_hash_key(const uchar *buff, size_t *length, } -#ifdef HAVE_SPATIAL extern Native_func_registry_array native_func_registry_array_geom; -#endif /* @@ -6611,20 +6609,16 @@ Native_functions_hash::find(THD *thd, const LEX_CSTRING &name) const int item_create_init() { size_t count= native_func_registry_array.count(); -#ifdef HAVE_SPATIAL count+= native_func_registry_array_geom.count(); -#endif if (native_functions_hash.init(count) || native_functions_hash.append(native_func_registry_array.elements(), native_func_registry_array.count())) return true; -#ifdef HAVE_SPATIAL if (native_functions_hash.append(native_func_registry_array_geom.elements(), native_func_registry_array_geom.count())) return true; -#endif count+= oracle_func_registry_array.count(); @@ -6633,11 +6627,9 @@ int item_create_init() native_func_registry_array.count())) return true; -#ifdef HAVE_SPATIAL if (native_functions_hash_oracle.append(native_func_registry_array_geom.elements(), native_func_registry_array_geom.count())) return true; -#endif return native_functions_hash_oracle.replace(oracle_func_registry_array.elements(), diff --git a/sql/item_func.cc b/sql/item_func.cc index 3377bc4671a..650b6f145e7 100644 --- a/sql/item_func.cc +++ b/sql/item_func.cc @@ -21,10 +21,6 @@ This file defines all numerical functions */ -#ifdef USE_PRAGMA_IMPLEMENTATION -#pragma implementation // gcc: Class implementation -#endif - #include "sql_plugin.h" #include "sql_priv.h" /* diff --git a/sql/item_func.h b/sql/item_func.h index eda47566840..afb9440a778 100644 --- a/sql/item_func.h +++ b/sql/item_func.h @@ -19,10 +19,6 @@ /* Function items used by mysql */ -#ifdef USE_PRAGMA_INTERFACE -#pragma interface /* gcc class implementation */ -#endif - #ifdef HAVE_IEEEFP_H extern "C" /* Bug in BSDI include file */ { diff --git a/sql/item_geofunc.cc b/sql/item_geofunc.cc index 2dde672c0d8..c6cf8c78bba 100644 --- a/sql/item_geofunc.cc +++ b/sql/item_geofunc.cc @@ -22,10 +22,6 @@ This file defines all spatial functions */ -#ifdef USE_PRAGMA_IMPLEMENTATION -#pragma implementation // gcc: Class implementation -#endif - #include "mariadb.h" #include "sql_priv.h" /* @@ -35,7 +31,6 @@ */ #include "sql_class.h" // THD, set_var.h: THD #include "set_var.h" -#ifdef HAVE_SPATIAL #include #include "opt_range.h" #include "item_geofunc.h" @@ -4077,5 +4072,3 @@ static Native_func_registry func_array_geom[] = Native_func_registry_array native_func_registry_array_geom(func_array_geom, array_elements(func_array_geom)); - -#endif /*HAVE_SPATIAL*/ diff --git a/sql/item_geofunc.h b/sql/item_geofunc.h index 288fb71904a..e655ee3634c 100644 --- a/sql/item_geofunc.h +++ b/sql/item_geofunc.h @@ -20,12 +20,6 @@ /* This file defines all spatial functions */ -#ifdef HAVE_SPATIAL - -#ifdef USE_PRAGMA_INTERFACE -#pragma interface /* gcc class implementation */ -#endif - #include "sql_type_geom.h" #include "item.h" #include "gstream.h" @@ -1279,10 +1273,4 @@ class Item_func_gis_debug: public Item_long_func #define GEOM_NEW(thd, obj_constructor) new (thd->mem_root) obj_constructor #define GEOM_TYPE(x) (x) -#else /*HAVE_SPATIAL*/ - -#define GEOM_NEW(thd, obj_constructor) NULL -#define GEOM_TYPE(x) NULL - -#endif /*HAVE_SPATIAL*/ #endif /* ITEM_GEOFUNC_INCLUDED */ diff --git a/sql/item_strfunc.cc b/sql/item_strfunc.cc index 8b9c5301a9d..a5e118333df 100644 --- a/sql/item_strfunc.cc +++ b/sql/item_strfunc.cc @@ -27,10 +27,6 @@ (This shouldn't be needed) */ -#ifdef USE_PRAGMA_IMPLEMENTATION -#pragma implementation // gcc: Class implementation -#endif - #include "mariadb.h" // HAVE_* #include "sql_priv.h" diff --git a/sql/item_strfunc.h b/sql/item_strfunc.h index 298e31e0160..e40928b4134 100644 --- a/sql/item_strfunc.h +++ b/sql/item_strfunc.h @@ -21,10 +21,6 @@ /* This file defines all string functions */ -#ifdef USE_PRAGMA_INTERFACE -#pragma interface /* gcc class implementation */ -#endif - extern size_t username_char_length; class Item_str_func :public Item_func diff --git a/sql/item_subselect.cc b/sql/item_subselect.cc index 98a5450f0e1..b53ed4fb9bd 100644 --- a/sql/item_subselect.cc +++ b/sql/item_subselect.cc @@ -25,10 +25,6 @@ methods (sql_select.h/sql_select.cc) */ -#ifdef USE_PRAGMA_IMPLEMENTATION -#pragma implementation // gcc: Class implementation -#endif - #include "mariadb.h" #include "sql_priv.h" /* diff --git a/sql/item_subselect.h b/sql/item_subselect.h index 191e7b7aeb7..b0886f68dee 100644 --- a/sql/item_subselect.h +++ b/sql/item_subselect.h @@ -19,10 +19,6 @@ /* subselect Item */ #include "item.h" -#ifdef USE_PRAGMA_INTERFACE -#pragma interface /* gcc class implementation */ -#endif - #include class st_select_lex; diff --git a/sql/item_sum.cc b/sql/item_sum.cc index 699389f8a78..eade6d35749 100644 --- a/sql/item_sum.cc +++ b/sql/item_sum.cc @@ -22,10 +22,6 @@ Sum functions (COUNT, MIN...) */ -#ifdef USE_PRAGMA_IMPLEMENTATION -#pragma implementation // gcc: Class implementation -#endif - #include "mariadb.h" #include "sql_priv.h" #include "sql_select.h" diff --git a/sql/item_sum.h b/sql/item_sum.h index 62ff3fd0024..aa42b48785f 100644 --- a/sql/item_sum.h +++ b/sql/item_sum.h @@ -19,10 +19,6 @@ /* classes for sum functions */ -#ifdef USE_PRAGMA_INTERFACE -#pragma interface /* gcc class implementation */ -#endif - #include #include "sql_udf.h" /* udf_handler */ diff --git a/sql/item_timefunc.cc b/sql/item_timefunc.cc index f47da52f884..15edf925dfa 100644 --- a/sql/item_timefunc.cc +++ b/sql/item_timefunc.cc @@ -26,10 +26,6 @@ Move month and days to language files */ -#ifdef USE_PRAGMA_IMPLEMENTATION -#pragma implementation // gcc: Class implementation -#endif - #include "mariadb.h" #include "sql_priv.h" /* diff --git a/sql/item_timefunc.h b/sql/item_timefunc.h index f44a031fa54..e5aa1c89536 100644 --- a/sql/item_timefunc.h +++ b/sql/item_timefunc.h @@ -19,10 +19,6 @@ /* Function items used by mysql */ -#ifdef USE_PRAGMA_INTERFACE -#pragma interface /* gcc class implementation */ -#endif - class MY_LOCALE; diff --git a/sql/item_vers.h b/sql/item_vers.h index ecd3f16a920..282a9844555 100644 --- a/sql/item_vers.h +++ b/sql/item_vers.h @@ -18,10 +18,6 @@ /* System Versioning items */ -#ifdef USE_PRAGMA_INTERFACE -#pragma interface /* gcc class implementation */ -#endif - class Item_func_history: public Item_bool_func { public: diff --git a/sql/lex.h b/sql/lex.h index 30cbbc5028e..dfe68216fc3 100644 --- a/sql/lex.h +++ b/sql/lex.h @@ -23,8 +23,6 @@ #include "lex_symbol.h" SYM_GROUP sym_group_common= {"", ""}; -SYM_GROUP sym_group_geom= {"Spatial extensions", "HAVE_SPATIAL"}; -SYM_GROUP sym_group_rtree= {"RTree keys", "HAVE_RTREE_KEYS"}; /* We don't want to include sql_yacc.h into gen_lex_hash */ #ifdef NO_YACC_SYMBOLS diff --git a/sql/lex_symbol.h b/sql/lex_symbol.h index e7819cd4e2f..a765d078151 100644 --- a/sql/lex_symbol.h +++ b/sql/lex_symbol.h @@ -42,7 +42,5 @@ typedef struct st_sym_group { } SYM_GROUP; extern SYM_GROUP sym_group_common; -extern SYM_GROUP sym_group_geom; -extern SYM_GROUP sym_group_rtree; #endif /* _lex_symbol_h */ diff --git a/sql/log_event.cc b/sql/log_event.cc index 4c79ff440af..d5c33d1859c 100644 --- a/sql/log_event.cc +++ b/sql/log_event.cc @@ -1637,7 +1637,7 @@ Query_log_event::Query_log_event(const uchar *buf, uint event_len, sql_parse.cc */ -#if !defined(MYSQL_CLIENT) && defined(HAVE_QUERY_CACHE) +#if !defined(MYSQL_CLIENT) if (!(start= data_buf= (Log_event::Byte*) my_malloc(PSI_INSTRUMENT_ME, catalog_len + 1 + time_zone_len + 1 @@ -1732,7 +1732,7 @@ Query_log_event::Query_log_event(const uchar *buf, uint event_len, Append the db length at the end of the buffer. This will be used by Query_cache::send_result_to_client() in case the query cache is On. */ -#if !defined(MYSQL_CLIENT) && defined(HAVE_QUERY_CACHE) +#if !defined(MYSQL_CLIENT) size_t db_length= (size_t)db_len; memcpy(start + data_len + 1, &db_length, sizeof(size_t)); #endif diff --git a/sql/log_event.h b/sql/log_event.h index 8c1edfe2c0b..38bcac5fbae 100644 --- a/sql/log_event.h +++ b/sql/log_event.h @@ -29,10 +29,6 @@ #ifndef _log_event_h #define _log_event_h -#if defined(USE_PRAGMA_INTERFACE) && defined(MYSQL_SERVER) -#pragma interface /* gcc class implementation */ -#endif - #include #include "rpl_constants.h" #include diff --git a/sql/mysqld.cc b/sql/mysqld.cc index cf268f4b8a1..bc235d2e999 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -1501,11 +1501,8 @@ const char *libwrapName= NULL; int allow_severity = LOG_INFO; int deny_severity = LOG_WARNING; #endif -#ifdef HAVE_QUERY_CACHE ulong query_cache_min_res_unit= QUERY_CACHE_MIN_RESULT_DATA_SIZE; Query_cache query_cache; -#endif - my_bool opt_use_ssl = 1; char *opt_ssl_ca= NULL, *opt_ssl_capath= NULL, *opt_ssl_cert= NULL, @@ -7689,7 +7686,6 @@ SHOW_VAR status_vars[]= { SHOW_FUNC_ENTRY("Rpl_semi_sync_slave_status", &rpl_semi_sync_enabled), {"Rpl_semi_sync_slave_send_ack", (char*) &rpl_semi_sync_slave_send_ack, SHOW_LONGLONG}, #endif /* HAVE_REPLICATION */ -#ifdef HAVE_QUERY_CACHE {"Qcache_free_blocks", (char*) &query_cache.free_memory_blocks, SHOW_LONG_NOFLUSH}, {"Qcache_free_memory", (char*) &query_cache.free_memory, SHOW_LONG_NOFLUSH}, {"Qcache_hits", (char*) &query_cache.hits, SHOW_LONG}, @@ -7698,7 +7694,6 @@ SHOW_VAR status_vars[]= { {"Qcache_not_cached", (char*) &query_cache.refused, SHOW_LONG}, {"Qcache_queries_in_cache", (char*) &query_cache.queries_in_cache, SHOW_LONG_NOFLUSH}, {"Qcache_total_blocks", (char*) &query_cache.total_blocks, SHOW_LONG_NOFLUSH}, -#endif /*HAVE_QUERY_CACHE*/ {"Queries", (char*) &show_queries, SHOW_SIMPLE_FUNC}, {"Questions", (char*) offsetof(STATUS_VAR, questions), SHOW_LONG_STATUS}, #ifdef HAVE_REPLICATION @@ -8096,21 +8091,9 @@ static int mysql_init_variables(void) #else have_dlopen=SHOW_OPTION_NO; #endif -#ifdef HAVE_QUERY_CACHE have_query_cache=SHOW_OPTION_YES; -#else - have_query_cache=SHOW_OPTION_NO; -#endif -#ifdef HAVE_SPATIAL have_geometry=SHOW_OPTION_YES; -#else - have_geometry=SHOW_OPTION_NO; -#endif -#ifdef HAVE_RTREE_KEYS have_rtree_keys=SHOW_OPTION_YES; -#else - have_rtree_keys=SHOW_OPTION_NO; -#endif #ifdef HAVE_CRYPT have_crypt=SHOW_OPTION_YES; #else @@ -8423,9 +8406,7 @@ mysqld_get_one_option(const struct my_option *opt, const char *argument, SYSVAR_AUTOSIZE(delay_key_write_options, (uint) DELAY_KEY_WRITE_NONE); myisam_recover_options= HA_RECOVER_DEFAULT; ha_open_options&= ~(HA_OPEN_DELAY_KEY_WRITE); -#ifdef HAVE_QUERY_CACHE SYSVAR_AUTOSIZE(query_cache_size, 0); -#endif break; case (int) OPT_SKIP_HOST_CACHE: opt_specialflag|= SPECIAL_NO_HOST_CACHE; diff --git a/sql/net_serv.cc b/sql/net_serv.cc index 7b16f3b90fb..edf5b6b212a 100644 --- a/sql/net_serv.cc +++ b/sql/net_serv.cc @@ -104,11 +104,9 @@ static void inline MYSQL_SERVER_my_error(...) {} */ extern ulonglong test_flags; extern ulong bytes_sent, bytes_received, net_big_packet_count; -#ifdef HAVE_QUERY_CACHE #define USE_QUERY_CACHE extern void query_cache_insert(void *thd, const char *packet, size_t length, unsigned pkt_nr); -#endif // HAVE_QUERY_CACHE #define update_statistics(A) A extern my_bool thd_net_is_killed(THD *thd); /* Additional instrumentation hooks for the server */ diff --git a/sql/opt_range.cc b/sql/opt_range.cc index 1124ffc0453..f2be192fb77 100644 --- a/sql/opt_range.cc +++ b/sql/opt_range.cc @@ -104,10 +104,6 @@ subject and may omit some details. */ -#ifdef USE_PRAGMA_IMPLEMENTATION -#pragma implementation // gcc: Class implementation -#endif - #include "mariadb.h" #include "sql_priv.h" #include "key.h" // is_key_used, key_copy, key_cmp, key_restore diff --git a/sql/opt_range.h b/sql/opt_range.h index aa9dd72c60f..fdcf888bce6 100644 --- a/sql/opt_range.h +++ b/sql/opt_range.h @@ -20,10 +20,6 @@ #ifndef _opt_range_h #define _opt_range_h -#ifdef USE_PRAGMA_INTERFACE -#pragma interface /* gcc class implementation */ -#endif - #include "records.h" /* READ_RECORD */ #include "queues.h" /* QUEUE */ #include "filesort.h" /* SORT_INFO */ diff --git a/sql/opt_rewrite_date_cmp.cc b/sql/opt_rewrite_date_cmp.cc index e115c94d3ca..462f0a0fa1a 100644 --- a/sql/opt_rewrite_date_cmp.cc +++ b/sql/opt_rewrite_date_cmp.cc @@ -22,10 +22,6 @@ Rewrites that make non-sargable date[time] comparisons sargable. */ -#ifdef USE_PRAGMA_IMPLEMENTATION -#pragma implementation // gcc: Class implementation -#endif - #include "mariadb.h" #include "sql_priv.h" #include "my_json_writer.h" diff --git a/sql/opt_rewrite_remove_casefold.cc b/sql/opt_rewrite_remove_casefold.cc index bf45e1f00fe..fed40c37b6e 100644 --- a/sql/opt_rewrite_remove_casefold.cc +++ b/sql/opt_rewrite_remove_casefold.cc @@ -1,6 +1,17 @@ -#ifdef USE_PRAGMA_IMPLEMENTATION -#pragma implementation // gcc: Class implementation -#endif +/* Copyright (c) 2023, MariaDB plc + + 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 + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + 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 St, Fifth Floor, Boston, MA 02110-1335 USA */ #include "mariadb.h" #include "sql_priv.h" diff --git a/sql/opt_subselect.cc b/sql/opt_subselect.cc index e90f817f30e..8cbb3678ffa 100644 --- a/sql/opt_subselect.cc +++ b/sql/opt_subselect.cc @@ -22,10 +22,6 @@ */ -#ifdef USE_PRAGMA_IMPLEMENTATION -#pragma implementation // gcc: Class implementation -#endif - #include "mariadb.h" #include "sql_base.h" #include "sql_const.h" diff --git a/sql/opt_subselect.h b/sql/opt_subselect.h index 8140a01974d..8b4dd1f0092 100644 --- a/sql/opt_subselect.h +++ b/sql/opt_subselect.h @@ -18,10 +18,6 @@ Semi-join subquery optimization code definitions */ -#ifdef USE_PRAGMA_INTERFACE -#pragma interface /* gcc class implementation */ -#endif - int check_and_do_in_subquery_rewrites(JOIN *join); bool convert_join_subqueries_to_semijoins(JOIN *join); int pull_out_semijoin_tables(JOIN *join); diff --git a/sql/opt_table_elimination.cc b/sql/opt_table_elimination.cc index 941512621ba..5528d4c13aa 100644 --- a/sql/opt_table_elimination.cc +++ b/sql/opt_table_elimination.cc @@ -24,10 +24,6 @@ @{ */ -#ifdef USE_PRAGMA_IMPLEMENTATION -#pragma implementation // gcc: Class implementation -#endif - #include "mariadb.h" #include "my_bit.h" #include "sql_select.h" diff --git a/sql/partition_info.cc b/sql/partition_info.cc index e3a22525da0..7a72544ad84 100644 --- a/sql/partition_info.cc +++ b/sql/partition_info.cc @@ -16,10 +16,6 @@ /* Some general useful functions */ -#ifdef USE_PRAGMA_IMPLEMENTATION -#pragma implementation -#endif - #include "mariadb.h" #include #include diff --git a/sql/partition_info.h b/sql/partition_info.h index 50f39bcc7ac..e8ec830ea53 100644 --- a/sql/partition_info.h +++ b/sql/partition_info.h @@ -16,10 +16,6 @@ along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA */ -#ifdef USE_PRAGMA_INTERFACE -#pragma interface /* gcc class implementation */ -#endif - #include "sql_class.h" #include "partition_element.h" #include "sql_partition.h" diff --git a/sql/procedure.cc b/sql/procedure.cc index 192e2877b54..541a9094d3f 100644 --- a/sql/procedure.cc +++ b/sql/procedure.cc @@ -16,10 +16,6 @@ /* Procedures (functions with changes output of select) */ -#ifdef USE_PRAGMA_IMPLEMENTATION -#pragma implementation // gcc: Class implementation -#endif - #include "mariadb.h" #include "sql_priv.h" #include "procedure.h" diff --git a/sql/procedure.h b/sql/procedure.h index 5abe3ee454c..c593585cc37 100644 --- a/sql/procedure.h +++ b/sql/procedure.h @@ -19,10 +19,6 @@ /* When using sql procedures */ -#ifdef USE_PRAGMA_INTERFACE -#pragma interface /* gcc class implementation */ -#endif - /* It is necessary to include set_var.h instead of item.h because there are dependencies on include order for set_var.h and item.h. This diff --git a/sql/protocol.cc b/sql/protocol.cc index ca7803248c6..66b4e5ee248 100644 --- a/sql/protocol.cc +++ b/sql/protocol.cc @@ -21,10 +21,6 @@ The actual communction is handled by the net_xxx functions in net_serv.cc */ -#ifdef USE_PRAGMA_IMPLEMENTATION -#pragma implementation // gcc: Class implementation -#endif - #include "mariadb.h" #include "sql_priv.h" #include "protocol.h" diff --git a/sql/protocol.h b/sql/protocol.h index 0a55d1b1331..71e0e4af1d9 100644 --- a/sql/protocol.h +++ b/sql/protocol.h @@ -17,10 +17,6 @@ along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA */ -#ifdef USE_PRAGMA_INTERFACE -#pragma interface /* gcc class implementation */ -#endif - #include "sql_error.h" #include "my_decimal.h" /* my_decimal */ #include "sql_type.h" diff --git a/sql/records.cc b/sql/records.cc index eb4d5f4d958..c0f45585589 100644 --- a/sql/records.cc +++ b/sql/records.cc @@ -15,10 +15,6 @@ along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA */ -#ifdef USE_PRAGMA_INTERFACE -#pragma implementation /* gcc class implementation */ -#endif - /** @file diff --git a/sql/records.h b/sql/records.h index 9bc1b98fde4..48ce8e2c917 100644 --- a/sql/records.h +++ b/sql/records.h @@ -15,10 +15,6 @@ along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA */ -#ifdef USE_PRAGMA_INTERFACE -#pragma interface /* gcc class implementation */ -#endif - #include "table.h" struct st_join_table; diff --git a/sql/scheduler.cc b/sql/scheduler.cc index 7261c5f39d7..adb13a00bd8 100644 --- a/sql/scheduler.cc +++ b/sql/scheduler.cc @@ -18,10 +18,6 @@ Implementation for the thread scheduler */ -#ifdef USE_PRAGMA_INTERFACE -#pragma implementation -#endif - #include "mariadb.h" #include "mysqld.h" #include "scheduler.h" diff --git a/sql/scheduler.h b/sql/scheduler.h index c2686aad21c..7bf1240973b 100644 --- a/sql/scheduler.h +++ b/sql/scheduler.h @@ -21,10 +21,6 @@ Classes for the thread scheduler */ -#ifdef USE_PRAGMA_INTERFACE -#pragma interface -#endif - class THD; /* Functions used when manipulating threads */ diff --git a/sql/set_var.h b/sql/set_var.h index 14383411f7e..050a87ac06e 100644 --- a/sql/set_var.h +++ b/sql/set_var.h @@ -21,10 +21,6 @@ "public" interface to sys_var - server configuration variables. */ -#ifdef USE_PRAGMA_INTERFACE -#pragma interface /* gcc class implementation */ -#endif - #include class sys_var; diff --git a/sql/sp_cache.cc b/sql/sp_cache.cc index 8b1aef07481..5adc7c6cc86 100644 --- a/sql/sp_cache.cc +++ b/sql/sp_cache.cc @@ -16,9 +16,6 @@ #include "mariadb.h" #include "sql_priv.h" #include "unireg.h" -#ifdef USE_PRAGMA_IMPLEMENTATION -#pragma implementation -#endif #include "sp_cache.h" #include "sp_head.h" diff --git a/sql/sp_cache.h b/sql/sp_cache.h index 7506edff814..d9ded06a43d 100644 --- a/sql/sp_cache.h +++ b/sql/sp_cache.h @@ -17,10 +17,6 @@ #ifndef _SP_CACHE_H_ #define _SP_CACHE_H_ -#ifdef USE_PRAGMA_INTERFACE -#pragma interface /* gcc class implementation */ -#endif - /* Stored procedures/functions cache. This is used as follows: * Each thread has its own cache. diff --git a/sql/sp_head.cc b/sql/sp_head.cc index e25343af5de..d3d57c5334b 100644 --- a/sql/sp_head.cc +++ b/sql/sp_head.cc @@ -30,10 +30,6 @@ #include "sql_select.h" // Virtual_tmp_table #include "opt_trace.h" #include "my_json_writer.h" - -#ifdef USE_PRAGMA_IMPLEMENTATION -#pragma implementation -#endif #include "sp_instr.h" #include "sp_head.h" #include "sp.h" diff --git a/sql/sp_head.h b/sql/sp_head.h index 9fb4390c649..6c6a6906739 100644 --- a/sql/sp_head.h +++ b/sql/sp_head.h @@ -19,10 +19,6 @@ #ifndef _SP_HEAD_H_ #define _SP_HEAD_H_ -#ifdef USE_PRAGMA_INTERFACE -#pragma interface /* gcc class implementation */ -#endif - /* It is necessary to include set_var.h instead of item.h because there are dependencies on include order for set_var.h and item.h. This diff --git a/sql/sp_pcontext.cc b/sql/sp_pcontext.cc index 9f21d34eb88..e6a750ab48a 100644 --- a/sql/sp_pcontext.cc +++ b/sql/sp_pcontext.cc @@ -17,10 +17,6 @@ #include "mariadb.h" #include "sql_priv.h" #include "unireg.h" -#ifdef USE_PRAGMA_IMPLEMENTATION -#pragma implementation -#endif - #include "sp_pcontext.h" #include "sp_head.h" diff --git a/sql/sp_pcontext.h b/sql/sp_pcontext.h index 972fc6aedc1..958e3f00433 100644 --- a/sql/sp_pcontext.h +++ b/sql/sp_pcontext.h @@ -18,10 +18,6 @@ #ifndef _SP_PCONTEXT_H_ #define _SP_PCONTEXT_H_ -#ifdef USE_PRAGMA_INTERFACE -#pragma interface /* gcc class implementation */ -#endif - #include "sql_string.h" // LEX_STRING #include "field.h" // Create_field #include "sql_array.h" // Dynamic_array diff --git a/sql/sp_rcontext.cc b/sql/sp_rcontext.cc index 03188588ad0..e50ef625edb 100644 --- a/sql/sp_rcontext.cc +++ b/sql/sp_rcontext.cc @@ -16,10 +16,6 @@ #include "mariadb.h" #include "sql_priv.h" #include "unireg.h" -#ifdef USE_PRAGMA_IMPLEMENTATION -#pragma implementation -#endif - #include "mysql.h" #include "sp_head.h" #include "sql_cursor.h" diff --git a/sql/sp_rcontext.h b/sql/sp_rcontext.h index a891ab04865..e2e273e9489 100644 --- a/sql/sp_rcontext.h +++ b/sql/sp_rcontext.h @@ -17,10 +17,6 @@ #ifndef _SP_RCONTEXT_H_ #define _SP_RCONTEXT_H_ -#ifdef USE_PRAGMA_INTERFACE -#pragma interface /* gcc class implementation */ -#endif - #include "sql_class.h" // select_result_interceptor #include "sp_pcontext.h" // sp_condition_value diff --git a/sql/spatial.cc b/sql/spatial.cc index 9bf6110c991..0198fdb8055 100644 --- a/sql/spatial.cc +++ b/sql/spatial.cc @@ -25,8 +25,6 @@ double my_double_round(double value, longlong dec, bool dec_unsigned, bool truncate); -#ifdef HAVE_SPATIAL - /* exponential notation : 1 sign @@ -3800,5 +3798,3 @@ const Geometry::Class_info *Gis_geometry_collection::get_class_info() const { return &geometrycollection_class; } - -#endif /*HAVE_SPATIAL*/ diff --git a/sql/spatial.h b/sql/spatial.h index d775e14aea4..db61cd60ef1 100644 --- a/sql/spatial.h +++ b/sql/spatial.h @@ -15,15 +15,13 @@ along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA */ -#ifndef _spatial_h -#define _spatial_h +#ifndef SPATIAL_INCLUDED +#define SPATIAL_INCLUDED #include "sql_string.h" /* String, LEX_STRING */ #include #include -#ifdef HAVE_SPATIAL - class Gis_read_stream; #include "gcalc_tools.h" @@ -651,5 +649,4 @@ public: struct Geometry_buffer : public my_aligned_storage {}; -#endif /*HAVE_SPATIAL*/ -#endif +#endif /* SPATIAL_INCLUDED */ diff --git a/sql/sql_analyse.cc b/sql/sql_analyse.cc index af9463712f1..15c1277fdc8 100644 --- a/sql/sql_analyse.cc +++ b/sql/sql_analyse.cc @@ -23,10 +23,6 @@ ** - type set is out of optimization yet */ -#ifdef USE_PRAGMA_IMPLEMENTATION -#pragma implementation // gcc: Class implementation -#endif - #define MYSQL_LEX 1 #include "mariadb.h" diff --git a/sql/sql_analyse.h b/sql/sql_analyse.h index 7e3b66d024e..c19ef734700 100644 --- a/sql/sql_analyse.h +++ b/sql/sql_analyse.h @@ -19,10 +19,6 @@ /* Analyse database */ -#ifdef USE_PRAGMA_INTERFACE -#pragma interface /* gcc class implementation */ -#endif - #include "procedure.h" /* Procedure */ #define my_thd_charset default_charset_info diff --git a/sql/sql_analyze_stmt.cc b/sql/sql_analyze_stmt.cc index 734ca1f8abb..42b8c1dd8e4 100644 --- a/sql/sql_analyze_stmt.cc +++ b/sql/sql_analyze_stmt.cc @@ -14,10 +14,6 @@ along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA */ -#ifdef USE_PRAGMA_IMPLEMENTATION -#pragma implementation // gcc: Class implementation -#endif - #include "mariadb.h" #include "sql_priv.h" #include "sql_select.h" diff --git a/sql/sql_cache.cc b/sql/sql_cache.cc index d3fbd034d1f..c0b192b6580 100644 --- a/sql/sql_cache.cc +++ b/sql/sql_cache.cc @@ -338,7 +338,6 @@ TODO list: #include "sql_base.h" // TMP_TABLE_KEY_EXTRA #include "debug_sync.h" // DEBUG_SYNC #include "sql_table.h" -#ifdef HAVE_QUERY_CACHE #include #include #include @@ -5320,6 +5319,3 @@ err2: } #endif /* DBUG_OFF */ - -#endif /*HAVE_QUERY_CACHE*/ - diff --git a/sql/sql_cache.h b/sql/sql_cache.h index 1bdff55d963..cdd0d26fd6c 100644 --- a/sql/sql_cache.h +++ b/sql/sql_cache.h @@ -13,8 +13,8 @@ along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA */ -#ifndef _SQL_CACHE_H -#define _SQL_CACHE_H +#ifndef SQL_CACHE_INCLUDED +#define SQL_CACHE_INCLUDED #include "hash.h" #include "my_base.h" /* ha_rows */ @@ -543,7 +543,6 @@ protected: void disable_query_cache(THD *thd); }; -#ifdef HAVE_QUERY_CACHE struct Query_cache_query_flags { unsigned int client_long_flag:1; @@ -591,25 +590,6 @@ struct Query_cache_query_flags (T->variables.query_cache_type == 0 || query_cache.query_cache_size == 0) #define query_cache_is_cacheable_query(L) \ (((L)->sql_command == SQLCOM_SELECT) && (L)->safe_to_cache_query) -#else -#define QUERY_CACHE_FLAGS_SIZE 0 -#define query_cache_store_query(A, B) do { } while(0) -#define query_cache_destroy() do { } while(0) -#define query_cache_result_size_limit(A) do { } while(0) -#define query_cache_init() do { } while(0) -#define query_cache_resize(A) do { } while(0) -#define query_cache_set_min_res_unit(A) do { } while(0) -#define query_cache_invalidate3(A, B, C) do { } while(0) -#define query_cache_invalidate1(A,B) do { } while(0) -#define query_cache_send_result_to_client(A, B, C) 0 -#define query_cache_invalidate_by_MyISAM_filename_ref NULL -#define query_cache_invalidate_locked_for_write(A, B) do { } while(0) - -#define query_cache_abort(A,B) do { } while(0) -#define query_cache_end_of_result(A) do { } while(0) -#define query_cache_maybe_disabled(T) 1 -#define query_cache_is_cacheable_query(L) 0 -#endif /*HAVE_QUERY_CACHE*/ extern MYSQL_PLUGIN_IMPORT Query_cache query_cache; #endif diff --git a/sql/sql_class.cc b/sql/sql_class.cc index d53a37901d2..1f21d35d4e4 100644 --- a/sql/sql_class.cc +++ b/sql/sql_class.cc @@ -24,10 +24,6 @@ ** *****************************************************************************/ -#ifdef USE_PRAGMA_IMPLEMENTATION -#pragma implementation // gcc: Class implementation -#endif - #include "mariadb.h" #include "sql_priv.h" #include "sql_class.h" diff --git a/sql/sql_class.h b/sql/sql_class.h index b4589e761e9..3a700b84547 100644 --- a/sql/sql_class.h +++ b/sql/sql_class.h @@ -3006,9 +3006,7 @@ public: */ struct st_mysql_stmt *current_stmt; #endif -#ifdef HAVE_QUERY_CACHE Query_cache_tls query_cache_tls; -#endif NET net; // client connection descriptor /** Aditional network instrumentation for the server only. */ NET_SERVER m_net_server_extension; diff --git a/sql/sql_crypt.cc b/sql/sql_crypt.cc index edff85a0f9d..32c8b1d5d6f 100644 --- a/sql/sql_crypt.cc +++ b/sql/sql_crypt.cc @@ -22,10 +22,6 @@ needs something like 'ssh'. */ -#ifdef USE_PRAGMA_IMPLEMENTATION -#pragma implementation // gcc: Class implementation -#endif - #include "mariadb.h" #include "sql_priv.h" #include "sql_crypt.h" diff --git a/sql/sql_crypt.h b/sql/sql_crypt.h index aab97501b48..e33d0302771 100644 --- a/sql/sql_crypt.h +++ b/sql/sql_crypt.h @@ -16,11 +16,6 @@ along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA */ - -#ifdef USE_PRAGMA_INTERFACE -#pragma interface /* gcc class implementation */ -#endif - #include "sql_alloc.h" /* Sql_alloc */ #include "my_rnd.h" /* rand_struct */ diff --git a/sql/sql_cursor.cc b/sql/sql_cursor.cc index ccbf2f35a30..ae5c99353d2 100644 --- a/sql/sql_cursor.cc +++ b/sql/sql_cursor.cc @@ -13,9 +13,6 @@ 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 02110-1335 USA */ -#ifdef USE_PRAGMA_IMPLEMENTATION -#pragma implementation /* gcc class implementation */ -#endif #include "mariadb.h" #include "sql_priv.h" diff --git a/sql/sql_cursor.h b/sql/sql_cursor.h index b9d0b41ea19..5afb7d81e9b 100644 --- a/sql/sql_cursor.h +++ b/sql/sql_cursor.h @@ -16,10 +16,6 @@ #ifndef _sql_cursor_h_ #define _sql_cursor_h_ -#ifdef USE_PRAGMA_INTERFACE -#pragma interface /* gcc class interface */ -#endif - #include "sql_class.h" /* Query_arena */ class JOIN; diff --git a/sql/sql_explain.cc b/sql/sql_explain.cc index 9c3c9580ec9..af7dd362c3e 100644 --- a/sql/sql_explain.cc +++ b/sql/sql_explain.cc @@ -14,10 +14,6 @@ along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA */ -#ifdef USE_PRAGMA_IMPLEMENTATION -#pragma implementation // gcc: Class implementation -#endif - #include "mariadb.h" #include "sql_priv.h" #include "sql_select.h" diff --git a/sql/sql_handler.cc b/sql/sql_handler.cc index a066417b28e..46423c87100 100644 --- a/sql/sql_handler.cc +++ b/sql/sql_handler.cc @@ -62,10 +62,6 @@ #include "sql_select.h" #include "transaction.h" -#ifdef USE_PRAGMA_IMPLEMENTATION -#pragma implementation // gcc: Class implementation -#endif - #define HANDLER_TABLES_HASH_SIZE 120 static enum enum_ha_read_modes rkey_to_rnext[]= diff --git a/sql/sql_handler.h b/sql/sql_handler.h index 4ac0d09e7a1..1457e154917 100644 --- a/sql/sql_handler.h +++ b/sql/sql_handler.h @@ -16,10 +16,6 @@ along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA */ -#ifdef USE_PRAGMA_INTERFACE -#pragma interface /* gcc class implementation */ -#endif - #include "sql_class.h" /* enum_ha_read_mode */ #include "my_base.h" /* ha_rkey_function, ha_rows */ #include "sql_list.h" /* List */ diff --git a/sql/sql_join_cache.cc b/sql/sql_join_cache.cc index b3a36138ae1..6c0064e4127 100644 --- a/sql/sql_join_cache.cc +++ b/sql/sql_join_cache.cc @@ -23,10 +23,6 @@ @{ */ -#ifdef USE_PRAGMA_IMPLEMENTATION -#pragma implementation // gcc: Class implementation -#endif - #include "mariadb.h" #include "key.h" #include "sql_base.h" diff --git a/sql/sql_list.cc b/sql/sql_list.cc index 6ccec9b5f2a..50b4b87ea35 100644 --- a/sql/sql_list.cc +++ b/sql/sql_list.cc @@ -13,11 +13,6 @@ along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA */ - -#ifdef USE_PRAGMA_IMPLEMENTATION -#pragma implementation // gcc: Class implementation -#endif - #include "mariadb.h" #include "sql_list.h" diff --git a/sql/sql_list.h b/sql/sql_list.h index 0502de0f396..048624e6a22 100644 --- a/sql/sql_list.h +++ b/sql/sql_list.h @@ -16,10 +16,6 @@ along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA */ -#ifdef USE_PRAGMA_INTERFACE -#pragma interface /* gcc class implementation */ -#endif - #include "sql_alloc.h" #include diff --git a/sql/sql_mode.h b/sql/sql_mode.h index fb2b7cefa0a..12eac1e83ae 100644 --- a/sql/sql_mode.h +++ b/sql/sql_mode.h @@ -16,10 +16,6 @@ along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA */ -#ifdef USE_PRAGMA_INTERFACE -#pragma interface /* gcc class implementation */ -#endif - #include "sql_basic_types.h" /* diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 073d3c38511..64f7222b769 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -5300,9 +5300,7 @@ mysql_execute_command(THD *thd, bool is_called_from_prepared_stmt) REFRESH_GENERAL_LOG | REFRESH_ENGINE_LOG | REFRESH_ERROR_LOG | -#ifdef HAVE_QUERY_CACHE REFRESH_QUERY_CACHE_FREE | -#endif /* HAVE_QUERY_CACHE */ REFRESH_STATUS | REFRESH_SESSION_STATUS | REFRESH_GLOBAL_STATUS | diff --git a/sql/sql_partition.h b/sql/sql_partition.h index 47afcb09807..d60ce2b035d 100644 --- a/sql/sql_partition.h +++ b/sql/sql_partition.h @@ -17,10 +17,6 @@ along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA */ -#ifdef USE_PRAGMA_INTERFACE -#pragma interface /* gcc class implementation */ -#endif - #include "sql_list.h" /* List */ #include "table.h" /* TABLE_LIST */ diff --git a/sql/sql_reload.cc b/sql/sql_reload.cc index da4b6743eef..ed3b7a6ca23 100644 --- a/sql/sql_reload.cc +++ b/sql/sql_reload.cc @@ -225,7 +225,6 @@ bool reload_acl_and_cache(THD *thd, unsigned long long options, } #endif } -#ifdef HAVE_QUERY_CACHE if (options & REFRESH_QUERY_CACHE_FREE) { query_cache.pack(thd); // FLUSH QUERY CACHE @@ -235,7 +234,6 @@ bool reload_acl_and_cache(THD *thd, unsigned long long options, { query_cache.flush(); // RESET QUERY CACHE } -#endif /*HAVE_QUERY_CACHE*/ DBUG_ASSERT(!thd || thd->locked_tables_mode || !thd->mdl_context.has_locks() || diff --git a/sql/sql_select.cc b/sql/sql_select.cc index c0e5a4b79be..4734c7814bc 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -25,10 +25,6 @@ @{ */ -#ifdef USE_PRAGMA_IMPLEMENTATION -#pragma implementation // gcc: Class implementation -#endif - #include "mariadb.h" #include "sql_priv.h" #include "unireg.h" @@ -20926,9 +20922,7 @@ Item_func_isnull::remove_eq_conds(THD *thd, Item::cond_result *cond_value, (thd->first_successful_insert_id_in_prev_stmt > 0 && thd->substitute_null_with_insert_id)) { - #ifdef HAVE_QUERY_CACHE query_cache_abort(thd, &thd->query_cache_tls); - #endif COND *new_cond, *cond= this; /* If this fails, we will catch it later before executing query */ if ((new_cond= new (thd->mem_root) Item_func_eq(thd, args[0], diff --git a/sql/sql_select.h b/sql/sql_select.h index 576e02efcc9..e8cca1ec070 100644 --- a/sql/sql_select.h +++ b/sql/sql_select.h @@ -24,10 +24,6 @@ classes to use when handling where clause */ -#ifdef USE_PRAGMA_INTERFACE -#pragma interface /* gcc class implementation */ -#endif - #include "procedure.h" #include "sql_array.h" /* Array */ #include "records.h" /* READ_RECORD */ diff --git a/sql/sql_string.cc b/sql/sql_string.cc index 79df1e0ff94..e68e57e6eb8 100644 --- a/sql/sql_string.cc +++ b/sql/sql_string.cc @@ -16,10 +16,6 @@ /* This file is originally from the mysql distribution. Coded by monty */ -#ifdef USE_PRAGMA_IMPLEMENTATION -#pragma implementation // gcc: Class implementation -#endif - #include "mariadb.h" #include #include diff --git a/sql/sql_string.h b/sql/sql_string.h index aed68bd7c70..e5d90d4f688 100644 --- a/sql/sql_string.h +++ b/sql/sql_string.h @@ -20,10 +20,6 @@ /* This file is originally from the mysql distribution. Coded by monty */ -#ifdef USE_PRAGMA_INTERFACE -#pragma interface /* gcc class implementation */ -#endif - #include "m_ctype.h" /* my_charset_bin */ #include /* alloc_root, my_free, my_realloc */ #include "m_string.h" /* TRASH */ diff --git a/sql/sql_table.cc b/sql/sql_table.cc index 4a01100e619..7fe97aa6a22 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -3171,14 +3171,8 @@ mysql_prepare_create_table_finalize(THD *thd, HA_CREATE_INFO *create_info, key_info->parser_name= 0; break; case Key::SPATIAL: -#ifdef HAVE_SPATIAL key_info->flags= HA_SPATIAL; break; -#else - my_error(ER_FEATURE_DISABLED, MYF(0), - sym_group_geom.name, sym_group_geom.needed_define); - DBUG_RETURN(TRUE); -#endif case Key::FOREIGN_KEY: key_number--; // Skip this key continue; @@ -3235,7 +3229,6 @@ mysql_prepare_create_table_finalize(THD *thd, HA_CREATE_INFO *create_info, } else if (key_info->algorithm == HA_KEY_ALG_RTREE) { -#ifdef HAVE_RTREE_KEYS if ((key_info->user_defined_key_parts & 1) == 1) { my_error(ER_WRONG_ARGUMENTS, MYF(0), "RTREE INDEX"); @@ -3244,11 +3237,6 @@ mysql_prepare_create_table_finalize(THD *thd, HA_CREATE_INFO *create_info, /* TODO: To be deleted */ my_error(ER_NOT_SUPPORTED_YET, MYF(0), "RTREE INDEX"); DBUG_RETURN(TRUE); -#else - my_error(ER_FEATURE_DISABLED, MYF(0), - sym_group_rtree.name, sym_group_rtree.needed_define); - DBUG_RETURN(TRUE); -#endif } /* Take block size from key part or table part */ diff --git a/sql/sql_type.cc b/sql/sql_type.cc index 2d355c27625..0924066e798 100644 --- a/sql/sql_type.cc +++ b/sql/sql_type.cc @@ -260,10 +260,7 @@ const Type_collection *Type_handler_row::type_collection() const bool Type_handler_data::init() { -#ifdef HAVE_SPATIAL return type_collection_geometry.init(this); -#endif - return false; } @@ -291,12 +288,8 @@ Type_handler::handler_by_name(THD *thd, const LEX_CSTRING &name) return ph; } -#ifdef HAVE_SPATIAL const Type_handler *ha= Type_collection_geometry_handler_by_name(name); - if (ha) - return ha; -#endif - return NULL; + return ha; } @@ -2257,12 +2250,7 @@ Type_handler::get_handler_by_field_type(enum_field_types type) case MYSQL_TYPE_STRING: return &type_handler_string; case MYSQL_TYPE_ENUM: return &type_handler_varchar; // Map to VARCHAR case MYSQL_TYPE_SET: return &type_handler_varchar; // Map to VARCHAR - case MYSQL_TYPE_GEOMETRY: -#ifdef HAVE_SPATIAL - return &type_handler_geometry; -#else - return NULL; -#endif + case MYSQL_TYPE_GEOMETRY: return &type_handler_geometry; case MYSQL_TYPE_TIMESTAMP: return &type_handler_timestamp2;// Map to timestamp2 case MYSQL_TYPE_TIMESTAMP2: return &type_handler_timestamp2; case MYSQL_TYPE_DATE: return &type_handler_newdate; // Map to newdate @@ -2314,12 +2302,7 @@ Type_handler::get_handler_by_real_type(enum_field_types type) case MYSQL_TYPE_STRING: return &type_handler_string; case MYSQL_TYPE_ENUM: return &type_handler_enum; case MYSQL_TYPE_SET: return &type_handler_set; - case MYSQL_TYPE_GEOMETRY: -#ifdef HAVE_SPATIAL - return &type_handler_geometry; -#else - return NULL; -#endif + case MYSQL_TYPE_GEOMETRY: return &type_handler_geometry; case MYSQL_TYPE_TIMESTAMP: return &type_handler_timestamp; case MYSQL_TYPE_TIMESTAMP2: return &type_handler_timestamp2; case MYSQL_TYPE_DATE: return &type_handler_date; diff --git a/sql/sql_type.h b/sql/sql_type.h index 25491b0f42d..b3084f3c0e7 100644 --- a/sql/sql_type.h +++ b/sql/sql_type.h @@ -17,11 +17,6 @@ along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA */ -#ifdef USE_PRAGMA_INTERFACE -#pragma interface /* gcc class implementation */ -#endif - - #include "mysqld.h" #include "lex_string.h" #include "sql_type_timeofday.h" diff --git a/sql/sql_type_geom.cc b/sql/sql_type_geom.cc index 4f1d1f8c79d..abb21577d58 100644 --- a/sql/sql_type_geom.cc +++ b/sql/sql_type_geom.cc @@ -16,8 +16,6 @@ #include "mariadb.h" -#ifdef HAVE_SPATIAL - #include "sql_class.h" #include "sql_type_geom.h" #include "item_geofunc.h" @@ -1010,5 +1008,3 @@ Binlog_type_info Field_geom::binlog_type_info() const return Binlog_type_info(Field_geom::type(), pack_length_no_ptr(), 1, field_charset(), type_handler_geom()->geometry_type()); } - -#endif // HAVE_SPATIAL diff --git a/sql/sql_type_geom.h b/sql/sql_type_geom.h index 8f1f3f40d97..97764be7047 100644 --- a/sql/sql_type_geom.h +++ b/sql/sql_type_geom.h @@ -17,14 +17,9 @@ along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA */ -#ifdef USE_PRAGMA_IMPLEMENTATION -#pragma implementation // gcc: Class implementation -#endif - #include "mariadb.h" #include "sql_type.h" - class Type_geom_attributes { protected: @@ -58,7 +53,6 @@ public: }; -#ifdef HAVE_SPATIAL class Type_handler_geometry: public Type_handler_string_result { public: @@ -476,6 +470,4 @@ public: Binlog_type_info binlog_type_info() const override; }; -#endif // HAVE_SPATIAL - #endif // SQL_TYPE_GEOM_H_INCLUDED diff --git a/sql/sql_udf.cc b/sql/sql_udf.cc index 1eb1b8c550b..d260cdbf5ba 100644 --- a/sql/sql_udf.cc +++ b/sql/sql_udf.cc @@ -27,10 +27,6 @@ dynamic functions, so this shouldn't be a real problem. */ -#ifdef USE_PRAGMA_IMPLEMENTATION -#pragma implementation // gcc: Class implementation -#endif - #include "mariadb.h" #include "sql_priv.h" #include "unireg.h" diff --git a/sql/sql_udf.h b/sql/sql_udf.h index 5bd2c6e5445..da11d007796 100644 --- a/sql/sql_udf.h +++ b/sql/sql_udf.h @@ -20,10 +20,6 @@ /* This file defines structures needed by udf functions */ -#ifdef USE_PRAGMA_INTERFACE -#pragma interface -#endif - enum Item_udftype {UDFTYPE_FUNCTION=1,UDFTYPE_AGGREGATE}; typedef void (*Udf_func_clear)(UDF_INIT *, uchar *, uchar *); diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy index 1e1b9041f83..fca67ee0d1a 100644 --- a/sql/sql_yacc.yy +++ b/sql/sql_yacc.yy @@ -7096,12 +7096,7 @@ fulltext: spatial: SPATIAL_SYM { -#ifdef HAVE_SPATIAL $$= Key::SPATIAL; -#else - my_yyabort_error((ER_FEATURE_DISABLED, MYF(0), sym_group_geom.name, - sym_group_geom.needed_define)); -#endif } ; diff --git a/sql/sys_vars.cc b/sql/sys_vars.cc index b3e724c3acb..dc4ecef9b50 100644 --- a/sql/sys_vars.cc +++ b/sql/sys_vars.cc @@ -1336,9 +1336,7 @@ static bool check_ftb_syntax(sys_var *self, THD *thd, set_var *var) } static bool query_cache_flush(sys_var *self, THD *thd, enum_var_type type) { -#ifdef HAVE_QUERY_CACHE query_cache.flush(); -#endif /* HAVE_QUERY_CACHE */ return false; } /// @todo make SESSION_VAR (usability enhancement and a fix for a race condition) @@ -3352,7 +3350,6 @@ static Sys_var_enum Sys_thread_handling( DEFAULT(DEFAULT_THREAD_HANDLING) ); -#ifdef HAVE_QUERY_CACHE static bool fix_query_cache_size(sys_var *self, THD *thd, enum_var_type type) { size_t new_cache_size= query_cache.resize((size_t)query_cache_size); @@ -3462,7 +3459,6 @@ static Sys_var_mybool Sys_query_cache_wlock_invalidate( "Invalidate queries in query cache on LOCK for write", SESSION_VAR(query_cache_wlock_invalidate), CMD_LINE(OPT_ARG), DEFAULT(FALSE)); -#endif /* HAVE_QUERY_CACHE */ static Sys_var_on_access_global diff --git a/sql/sys_vars.inl b/sql/sys_vars.inl index 99423055221..507cf7b5b24 100644 --- a/sql/sys_vars.inl +++ b/sql/sys_vars.inl @@ -77,7 +77,7 @@ extern const char *UNUSED_HELP; #define session_var(THD, TYPE) (*(TYPE*)session_var_ptr(THD)) #define global_var(TYPE) (*(TYPE*)global_var_ptr()) -#if SIZEOF_OFF_T > 4 && defined(BIG_TABLES) +#if SIZEOF_OFF_T > 4 #define GET_HA_ROWS GET_ULL #else #define GET_HA_ROWS GET_ULONG diff --git a/sql/transaction.cc b/sql/transaction.cc index 29d6046ca6e..76d2149610c 100644 --- a/sql/transaction.cc +++ b/sql/transaction.cc @@ -14,11 +14,6 @@ along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA */ - -#ifdef USE_PRAGMA_IMPLEMENTATION -#pragma implementation // gcc: Class implementation -#endif - #include "mariadb.h" #include "sql_priv.h" #include "transaction.h" diff --git a/sql/transaction.h b/sql/transaction.h index fe0129fa8bc..3b7e2df8807 100644 --- a/sql/transaction.h +++ b/sql/transaction.h @@ -16,10 +16,6 @@ #ifndef TRANSACTION_H #define TRANSACTION_H -#ifdef USE_PRAGMA_INTERFACE -#pragma interface /* gcc class implementation */ -#endif - #include class THD; diff --git a/sql/tztime.cc b/sql/tztime.cc index 0cd24a3f0c5..4dfafc4ba11 100644 --- a/sql/tztime.cc +++ b/sql/tztime.cc @@ -25,10 +25,6 @@ it creates unsolved link dependencies on some platforms. */ -#ifdef USE_PRAGMA_IMPLEMENTATION -#pragma implementation // gcc: Class implementation -#endif - #define VER "1.1" #include "mariadb.h" #if !defined(TZINFO2SQL) && !defined(TESTTIME) diff --git a/sql/tztime.h b/sql/tztime.h index 7c96f8b9ad9..fc5905377c3 100644 --- a/sql/tztime.h +++ b/sql/tztime.h @@ -16,11 +16,6 @@ along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA */ - -#ifdef USE_PRAGMA_INTERFACE -#pragma interface /* gcc class interface */ -#endif - #include "my_time.h" /* my_time_t */ #include "mysql_time.h" /* MYSQL_TIME */ #include "sql_list.h" /* Sql_alloc */ diff --git a/storage/archive/ha_archive.cc b/storage/archive/ha_archive.cc index 03269625040..3a4d3cc0a59 100644 --- a/storage/archive/ha_archive.cc +++ b/storage/archive/ha_archive.cc @@ -17,10 +17,6 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA */ -#ifdef USE_PRAGMA_IMPLEMENTATION -#pragma implementation // gcc: Class implementation -#endif - #include #include "sql_class.h" // SSV #include "sql_table.h" // build_table_filename diff --git a/storage/archive/ha_archive.h b/storage/archive/ha_archive.h index 8a6c592257e..19110b3e7a8 100644 --- a/storage/archive/ha_archive.h +++ b/storage/archive/ha_archive.h @@ -13,10 +13,6 @@ along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA */ -#ifdef USE_PRAGMA_INTERFACE -#pragma interface /* gcc class implementation */ -#endif - #include #include "azlib.h" diff --git a/storage/blackhole/ha_blackhole.cc b/storage/blackhole/ha_blackhole.cc index 525912bcd05..af5f2867024 100644 --- a/storage/blackhole/ha_blackhole.cc +++ b/storage/blackhole/ha_blackhole.cc @@ -13,11 +13,6 @@ along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA */ - -#ifdef USE_PRAGMA_IMPLEMENTATION -#pragma implementation // gcc: Class implementation -#endif - #define MYSQL_SERVER 1 #include #include "sql_priv.h" diff --git a/storage/blackhole/ha_blackhole.h b/storage/blackhole/ha_blackhole.h index 287f1db6bfa..b1b49106da7 100644 --- a/storage/blackhole/ha_blackhole.h +++ b/storage/blackhole/ha_blackhole.h @@ -13,10 +13,6 @@ along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA */ -#ifdef USE_PRAGMA_INTERFACE -#pragma interface /* gcc class implementation */ -#endif - #include "thr_lock.h" /* THR_LOCK */ #include "handler.h" /* handler */ #include "table.h" /* TABLE_SHARE */ diff --git a/storage/connect/connect.cc b/storage/connect/connect.cc index 27ab744cbde..3c67280a6fd 100644 --- a/storage/connect/connect.cc +++ b/storage/connect/connect.cc @@ -22,9 +22,6 @@ /* ----------------------- */ /* This program are the CONNECT general purpose semantic routines. */ /***********************************************************************/ -#ifdef USE_PRAGMA_IMPLEMENTATION -#pragma implementation // gcc: Class implementation -#endif /***********************************************************************/ /* Include application header files */ diff --git a/storage/connect/ha_connect.cc b/storage/connect/ha_connect.cc index d985c5b9796..647a3a1edb4 100644 --- a/storage/connect/ha_connect.cc +++ b/storage/connect/ha_connect.cc @@ -101,10 +101,6 @@ Author Olivier Bertrand */ -#ifdef USE_PRAGMA_IMPLEMENTATION -#pragma implementation // gcc: Class implementation -#endif - #define MYSQL_SERVER 1 #define DONT_DEFINE_VOID #include diff --git a/storage/connect/ha_connect.h b/storage/connect/ha_connect.h index 891e8f49168..3bac15bf426 100644 --- a/storage/connect/ha_connect.h +++ b/storage/connect/ha_connect.h @@ -23,10 +23,6 @@ /sql/handler.h and /storage/connect/ha_connect.cc */ -#ifdef USE_PRAGMA_INTERFACE -#pragma interface /* gcc class implementation */ -#endif - /****************************************************************************/ /* mycat.h contains the TOS, PTOS, ha_table_option_struct declarations. */ /****************************************************************************/ diff --git a/storage/connect/user_connect.cc b/storage/connect/user_connect.cc index ba446a3e2f3..4b179ef55d0 100644 --- a/storage/connect/user_connect.cc +++ b/storage/connect/user_connect.cc @@ -30,9 +30,6 @@ /****************************************************************************/ /* Author: Olivier Bertrand -- bertrandop@gmail.com -- 2004-2020 */ /****************************************************************************/ -#ifdef USE_PRAGMA_IMPLEMENTATION -#pragma implementation // gcc: Class implementation -#endif #define DONT_DEFINE_VOID #define MYSQL_SERVER diff --git a/storage/connect/user_connect.h b/storage/connect/user_connect.h index 53064e620f2..b60ab056554 100644 --- a/storage/connect/user_connect.h +++ b/storage/connect/user_connect.h @@ -25,10 +25,6 @@ /sql/handler.h and /storage/connect/user_connect.cc */ -#ifdef USE_PRAGMA_INTERFACE -#pragma interface /* gcc class implementation */ -#endif - /*****************************************************************************/ /* This is the global structure having all CONNECT information. */ /*****************************************************************************/ diff --git a/storage/csv/transparent_file.cc b/storage/csv/transparent_file.cc index 443e61d08d8..63c070172b2 100644 --- a/storage/csv/transparent_file.cc +++ b/storage/csv/transparent_file.cc @@ -13,10 +13,6 @@ along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA */ -#ifdef USE_PRAGMA_IMPLEMENTATION -#pragma implementation // gcc: Class implementation -#endif - #include #include "sql_priv.h" #include diff --git a/storage/example/ha_example.cc b/storage/example/ha_example.cc index 56157e88d1f..4a50bd4cefc 100644 --- a/storage/example/ha_example.cc +++ b/storage/example/ha_example.cc @@ -90,10 +90,6 @@ -Brian */ -#ifdef USE_PRAGMA_IMPLEMENTATION -#pragma implementation // gcc: Class implementation -#endif - #include #include #include "ha_example.h" diff --git a/storage/example/ha_example.h b/storage/example/ha_example.h index 95cf50de813..7a8a59582fa 100644 --- a/storage/example/ha_example.h +++ b/storage/example/ha_example.h @@ -32,10 +32,6 @@ /sql/handler.h and /storage/example/ha_example.cc */ -#ifdef USE_PRAGMA_INTERFACE -#pragma interface /* gcc class implementation */ -#endif - #include "my_global.h" /* ulonglong */ #include "thr_lock.h" /* THR_LOCK, THR_LOCK_DATA */ #include "handler.h" /* handler */ diff --git a/storage/federated/ha_federated.cc b/storage/federated/ha_federated.cc index ad5aa864f5b..f2b5074c7ec 100644 --- a/storage/federated/ha_federated.cc +++ b/storage/federated/ha_federated.cc @@ -380,10 +380,6 @@ #include "sql_analyse.h" // append_escaped #include -#ifdef USE_PRAGMA_IMPLEMENTATION -#pragma implementation // gcc: Class implementation -#endif - #include "ha_federated.h" #include "m_string.h" diff --git a/storage/federated/ha_federated.h b/storage/federated/ha_federated.h index 524b033f613..bf9b0662ee1 100644 --- a/storage/federated/ha_federated.h +++ b/storage/federated/ha_federated.h @@ -20,10 +20,6 @@ that you can implement. */ -#ifdef USE_PRAGMA_INTERFACE -#pragma interface /* gcc class implementation */ -#endif - #include /* diff --git a/storage/federatedx/federatedx_io.cc b/storage/federatedx/federatedx_io.cc index 5baec617cda..68ffe2148ca 100644 --- a/storage/federatedx/federatedx_io.cc +++ b/storage/federatedx/federatedx_io.cc @@ -35,10 +35,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "m_string.h" -#ifdef USE_PRAGMA_IMPLEMENTATION -#pragma implementation // gcc: Class implementation -#endif - typedef federatedx_io *(*instantiate_io_type)(MEM_ROOT *server_root, FEDERATEDX_SERVER *server); struct io_schemes_st diff --git a/storage/federatedx/federatedx_io_mysql.cc b/storage/federatedx/federatedx_io_mysql.cc index b20873094da..1bec0cd0ac4 100644 --- a/storage/federatedx/federatedx_io_mysql.cc +++ b/storage/federatedx/federatedx_io_mysql.cc @@ -39,11 +39,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "mysqld_error.h" #include "sql_servers.h" -#ifdef USE_PRAGMA_IMPLEMENTATION -#pragma implementation // gcc: Class implementation -#endif - - #define SAVEPOINT_REALIZED 1 #define SAVEPOINT_RESTRICT 2 #define SAVEPOINT_EMITTED 4 diff --git a/storage/federatedx/federatedx_io_null.cc b/storage/federatedx/federatedx_io_null.cc index 24e499e4ba4..5c62ea6ab52 100644 --- a/storage/federatedx/federatedx_io_null.cc +++ b/storage/federatedx/federatedx_io_null.cc @@ -35,11 +35,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "m_string.h" -#ifdef USE_PRAGMA_IMPLEMENTATION -#pragma implementation // gcc: Class implementation -#endif - - #define SAVEPOINT_REALIZED 1 #define SAVEPOINT_RESTRICT 2 #define SAVEPOINT_EMITTED 4 diff --git a/storage/federatedx/federatedx_txn.cc b/storage/federatedx/federatedx_txn.cc index c434a00805c..f274ae7444f 100644 --- a/storage/federatedx/federatedx_txn.cc +++ b/storage/federatedx/federatedx_txn.cc @@ -26,10 +26,6 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef USE_PRAGMA_IMPLEMENTATION -#pragma implementation // gcc: Class implementation -#endif - #define MYSQL_SERVER 1 #include #include "sql_priv.h" diff --git a/storage/federatedx/ha_federatedx.cc b/storage/federatedx/ha_federatedx.cc index 85fe079b4eb..d768bddbe50 100644 --- a/storage/federatedx/ha_federatedx.cc +++ b/storage/federatedx/ha_federatedx.cc @@ -308,10 +308,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef USE_PRAGMA_IMPLEMENTATION -#pragma implementation // gcc: Class implementation -#endif - #define MYSQL_SERVER 1 #include #include diff --git a/storage/federatedx/ha_federatedx.h b/storage/federatedx/ha_federatedx.h index fce761540b3..db85288c33b 100644 --- a/storage/federatedx/ha_federatedx.h +++ b/storage/federatedx/ha_federatedx.h @@ -33,11 +33,6 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - -#ifdef USE_PRAGMA_INTERFACE -#pragma interface /* gcc class implementation */ -#endif - //#include #include #include diff --git a/storage/heap/ha_heap.cc b/storage/heap/ha_heap.cc index 187d65b050e..294991edd20 100644 --- a/storage/heap/ha_heap.cc +++ b/storage/heap/ha_heap.cc @@ -15,10 +15,6 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA */ -#ifdef USE_PRAGMA_IMPLEMENTATION -#pragma implementation // gcc: Class implementation -#endif - #define MYSQL_SERVER 1 #include "heapdef.h" #include "sql_priv.h" diff --git a/storage/heap/ha_heap.h b/storage/heap/ha_heap.h index 837eae15fee..8626b2d1a7b 100644 --- a/storage/heap/ha_heap.h +++ b/storage/heap/ha_heap.h @@ -15,11 +15,6 @@ along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA */ - -#ifdef USE_PRAGMA_INTERFACE -#pragma interface /* gcc class implementation */ -#endif - /* class for the the heap handler */ #include diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc index e00dda75982..545893e42bb 100644 --- a/storage/innobase/handler/ha_innodb.cc +++ b/storage/innobase/handler/ha_innodb.cc @@ -3274,7 +3274,6 @@ innobase_invalidate_query_cache( /* Note that the query cache mutex is just above the trx_sys.mutex. The caller of this function must not have latches of a lower rank. */ -#ifdef HAVE_QUERY_CACHE char qcache_key_name[2 * (NAME_LEN + 1)]; char db_name[NAME_CHAR_LEN * MY_CS_MBMAXLEN + 1]; const char *key_ptr; @@ -3302,7 +3301,6 @@ innobase_invalidate_query_cache( qcache_key_name, uint(dbname_len + tabname_len + 2), TRUE); -#endif } /** Quote a standard SQL identifier like index or column name. diff --git a/storage/maria/ha_maria.cc b/storage/maria/ha_maria.cc index 7794305049b..29cddf6d505 100644 --- a/storage/maria/ha_maria.cc +++ b/storage/maria/ha_maria.cc @@ -16,10 +16,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA */ -#ifdef USE_PRAGMA_IMPLEMENTATION -#pragma implementation // gcc: Class implementation -#endif - #define MYSQL_SERVER 1 #include #include @@ -3997,7 +3993,6 @@ static int ha_maria_init(void *p) } -#ifdef HAVE_QUERY_CACHE /** @brief Register a named table with a call back function to the query cache. @@ -4070,7 +4065,6 @@ my_bool ha_maria::register_query_cache_table(THD *thd, const char *table_name, DBUG_RETURN(!(file->s->non_transactional_concurrent_insert && current_data_file_length != actual_data_file_length)); } -#endif static struct st_mysql_sys_var *system_variables[]= { MYSQL_SYSVAR(block_size), diff --git a/storage/maria/ha_maria.h b/storage/maria/ha_maria.h index 3c0d0cc463e..742fd42c8d4 100644 --- a/storage/maria/ha_maria.h +++ b/storage/maria/ha_maria.h @@ -16,10 +16,6 @@ along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA */ -#ifdef USE_PRAGMA_INTERFACE -#pragma interface /* gcc class implementation */ -#endif - /* class for the maria handler */ #include "maria_def.h" @@ -153,13 +149,11 @@ public: int assign_to_keycache(THD * thd, HA_CHECK_OPT * check_opt) override final; int preload_keys(THD * thd, HA_CHECK_OPT * check_opt) override; bool check_if_incompatible_data(HA_CREATE_INFO * info, uint table_changes) override final; -#ifdef HAVE_QUERY_CACHE my_bool register_query_cache_table(THD *thd, const char *table_key, uint key_length, qc_engine_callback *engine_callback, ulonglong *engine_data) override final; -#endif MARIA_HA *file_ptr(void) { return file; diff --git a/storage/maria/ma_check.c b/storage/maria/ma_check.c index cb1ff3213e1..aab305aa1bb 100644 --- a/storage/maria/ma_check.c +++ b/storage/maria/ma_check.c @@ -1219,10 +1219,8 @@ static int check_keys_in_record(HA_CHECK *param, MARIA_HA *info, int extend, concurrent threads when running maria_chk */ int search_result= -#ifdef HAVE_RTREE_KEYS (keyinfo->flag & (HA_SPATIAL | HA_RTREE_INDEX)) ? maria_rtree_find_first(info, &key, MBR_EQUAL | MBR_DATA) : -#endif _ma_search(info, &key, SEARCH_SAME, share->state.key_root[keynr]); if (search_result) { diff --git a/storage/maria/ma_create.c b/storage/maria/ma_create.c index 53606ac3499..e42f5497c4a 100644 --- a/storage/maria/ma_create.c +++ b/storage/maria/ma_create.c @@ -468,7 +468,6 @@ int maria_create(const char *name, enum data_file_type datafile_type, if (keydef->flag & HA_SPATIAL) { -#ifdef HAVE_SPATIAL /* BAR TODO to support 3D and more dimensions in the future */ uint sp_segs=SPDIMS*2; keydef->flag=HA_SPATIAL; @@ -500,10 +499,6 @@ int maria_create(const char *name, enum data_file_type datafile_type, key_length+=SPLEN*sp_segs; length++; /* At least one length uchar */ min_key_length++; -#else - my_errno= HA_ERR_UNSUPPORTED; - goto err_no_lock; -#endif /*HAVE_SPATIAL*/ } else if (keydef->flag & HA_FULLTEXT) { @@ -952,7 +947,6 @@ int maria_create(const char *name, enum data_file_type datafile_type, for (j=0 ; j < keydefs[i].keysegs-sp_segs ; j++) if (_ma_keyseg_write(file, &keydefs[i].seg[j])) goto err; -#ifdef HAVE_SPATIAL for (j=0 ; j < sp_segs ; j++) { HA_KEYSEG sseg; @@ -969,7 +963,6 @@ int maria_create(const char *name, enum data_file_type datafile_type, if (_ma_keyseg_write(file, &sseg)) goto err; } -#endif } /* Create extra keys for unique definitions */ offset= real_reclength - uniques*MARIA_UNIQUE_HASH_LENGTH; diff --git a/storage/maria/ma_open.c b/storage/maria/ma_open.c index ed417024988..6e71f261c99 100644 --- a/storage/maria/ma_open.c +++ b/storage/maria/ma_open.c @@ -762,15 +762,10 @@ MARIA_HA *maria_open(const char *name, int mode, uint open_flags, } if (keyinfo->flag & HA_SPATIAL) { -#ifdef HAVE_SPATIAL uint sp_segs=SPDIMS*2; keyinfo->seg=pos-sp_segs; keyinfo->keysegs--; versioning= 0; -#else - my_errno=HA_ERR_UNSUPPORTED; - goto err; -#endif } else if (keyinfo->flag & HA_FULLTEXT) { @@ -1401,12 +1396,8 @@ static void setup_key_functions(register MARIA_KEYDEF *keyinfo) { if (keyinfo->key_alg == HA_KEY_ALG_RTREE) { -#ifdef HAVE_RTREE_KEYS keyinfo->ck_insert = maria_rtree_insert; keyinfo->ck_delete = maria_rtree_delete; -#else - DBUG_ASSERT(0); /* maria_open should check it never happens */ -#endif } else { diff --git a/storage/maria/ma_range.c b/storage/maria/ma_range.c index 525bf27b90c..cd8751cdd9a 100644 --- a/storage/maria/ma_range.c +++ b/storage/maria/ma_range.c @@ -65,7 +65,6 @@ ha_rows maria_records_in_range(MARIA_HA *info, int inx, mysql_rwlock_rdlock(&keyinfo->root_lock); switch (keyinfo->key_alg) { -#ifdef HAVE_RTREE_KEYS case HA_KEY_ALG_RTREE: { uchar *key_buff; @@ -93,7 +92,6 @@ ha_rows maria_records_in_range(MARIA_HA *info, int inx, res= res ? res : 1; /* Don't return 0 */ break; } -#endif case HA_KEY_ALG_BTREE: default: start_pos= (min_key ? diff --git a/storage/maria/ma_rkey.c b/storage/maria/ma_rkey.c index 7e43ed4befa..dc7ad4e7cfe 100644 --- a/storage/maria/ma_rkey.c +++ b/storage/maria/ma_rkey.c @@ -90,7 +90,6 @@ int maria_rkey(MARIA_HA *info, uchar *buf, int inx, const uchar *key_data, nextflag|= SEARCH_SAVE_BUFF; } switch (keyinfo->key_alg) { -#ifdef HAVE_RTREE_KEYS case HA_KEY_ALG_RTREE: if (maria_rtree_find_first(info, &key, nextflag) < 0) { @@ -98,7 +97,6 @@ int maria_rkey(MARIA_HA *info, uchar *buf, int inx, const uchar *key_data, info->cur_row.lastpos= HA_OFFSET_ERROR; } break; -#endif case HA_KEY_ALG_BTREE: default: if (!_ma_search(info, &key, nextflag, info->s->state.key_root[inx])) diff --git a/storage/maria/ma_rnext.c b/storage/maria/ma_rnext.c index 6fd6f89139f..4f4454ccccc 100644 --- a/storage/maria/ma_rnext.c +++ b/storage/maria/ma_rnext.c @@ -50,14 +50,12 @@ int maria_rnext(MARIA_HA *info, uchar *buf, int inx) if (!flag) { switch (keyinfo->key_alg){ -#ifdef HAVE_RTREE_KEYS case HA_KEY_ALG_RTREE: error=maria_rtree_get_first(info, inx, info->last_key.data_length + info->last_key.ref_length); break; -#endif case HA_KEY_ALG_BTREE: default: error= _ma_search_first(info, keyinfo, share->state.key_root[inx]); @@ -81,7 +79,6 @@ int maria_rnext(MARIA_HA *info, uchar *buf, int inx) else { switch (keyinfo->key_alg) { -#ifdef HAVE_RTREE_KEYS case HA_KEY_ALG_RTREE: /* Note that rtree doesn't support that the table @@ -91,7 +88,6 @@ int maria_rnext(MARIA_HA *info, uchar *buf, int inx) error= maria_rtree_get_next(info, inx, info->last_key.data_length + info->last_key.ref_length); break; -#endif case HA_KEY_ALG_BTREE: default: if (!changed) diff --git a/storage/maria/ma_rnext_same.c b/storage/maria/ma_rnext_same.c index 19a950d31bb..0878038bac2 100644 --- a/storage/maria/ma_rnext_same.c +++ b/storage/maria/ma_rnext_same.c @@ -44,7 +44,6 @@ int maria_rnext_same(MARIA_HA *info, uchar *buf) mysql_rwlock_rdlock(&keyinfo->root_lock); switch (keyinfo->key_alg) { -#ifdef HAVE_RTREE_KEYS case HA_KEY_ALG_RTREE: if ((error=maria_rtree_find_next(info,inx, maria_read_vec[info->last_key_func]))) @@ -55,7 +54,6 @@ int maria_rnext_same(MARIA_HA *info, uchar *buf) break; } break; -#endif case HA_KEY_ALG_BTREE: default: if (!(info->update & HA_STATE_RNEXT_SAME)) diff --git a/storage/maria/ma_rt_index.c b/storage/maria/ma_rt_index.c index 6fddc8955c4..a84ea65f749 100644 --- a/storage/maria/ma_rt_index.c +++ b/storage/maria/ma_rt_index.c @@ -17,9 +17,6 @@ #include "maria_def.h" #include "trnman.h" #include "ma_key_recover.h" - -#ifdef HAVE_RTREE_KEYS - #include "ma_rt_index.h" #include "ma_rt_key.h" #include "ma_rt_mbr.h" @@ -1374,5 +1371,3 @@ err: stack_alloc_free(page_buf, buff_alloced); return HA_POS_ERROR; } - -#endif /*HAVE_RTREE_KEYS*/ diff --git a/storage/maria/ma_rt_index.h b/storage/maria/ma_rt_index.h index 42df5cf9514..1014c929ffc 100644 --- a/storage/maria/ma_rt_index.h +++ b/storage/maria/ma_rt_index.h @@ -17,8 +17,6 @@ #ifndef _rt_index_h #define _rt_index_h -#ifdef HAVE_RTREE_KEYS - #define rt_PAGE_FIRST_KEY(share, page, nod_flag) (page + share->keypage_header + nod_flag) #define rt_PAGE_NEXT_KEY(share, key, key_length, nod_flag) (key + key_length +\ (nod_flag ? nod_flag : share->base.rec_reflength)) @@ -42,5 +40,4 @@ ha_rows maria_rtree_estimate(MARIA_HA *info, MARIA_KEY *key, uint32 flag); int maria_rtree_split_page(const MARIA_KEY *key, MARIA_PAGE *page, my_off_t *new_page_offs); -#endif /*HAVE_RTREE_KEYS*/ #endif /* _rt_index_h */ diff --git a/storage/maria/ma_rt_key.c b/storage/maria/ma_rt_key.c index 231bd9ba73b..6cd59b5e0b5 100644 --- a/storage/maria/ma_rt_key.c +++ b/storage/maria/ma_rt_key.c @@ -16,8 +16,6 @@ #include "maria_def.h" #include "trnman.h" #include "ma_key_recover.h" - -#ifdef HAVE_RTREE_KEYS #include "ma_rt_index.h" #include "ma_rt_key.h" #include "ma_rt_mbr.h" @@ -116,5 +114,3 @@ int maria_rtree_set_key_mbr(MARIA_HA *info, MARIA_KEY *key, DBUG_RETURN(maria_rtree_page_mbr(key->keyinfo->seg, &page, key->data, key->data_length)); } - -#endif /*HAVE_RTREE_KEYS*/ diff --git a/storage/maria/ma_rt_key.h b/storage/maria/ma_rt_key.h index e1bd6edcbcf..adee64a79f0 100644 --- a/storage/maria/ma_rt_key.h +++ b/storage/maria/ma_rt_key.h @@ -19,13 +19,9 @@ #ifndef _rt_key_h #define _rt_key_h -#ifdef HAVE_RTREE_KEYS - int maria_rtree_add_key(const MARIA_KEY *key, MARIA_PAGE *page, my_off_t *new_page); int maria_rtree_delete_key(MARIA_PAGE *page, uchar *key, uint key_length); int maria_rtree_set_key_mbr(MARIA_HA *info, MARIA_KEY *key, my_off_t child_page); - -#endif /*HAVE_RTREE_KEYS*/ #endif /* _rt_key_h */ diff --git a/storage/maria/ma_rt_mbr.c b/storage/maria/ma_rt_mbr.c index 9f8946bcafa..ee3c72b8890 100644 --- a/storage/maria/ma_rt_mbr.c +++ b/storage/maria/ma_rt_mbr.c @@ -16,8 +16,6 @@ #include "maria_def.h" -#ifdef HAVE_RTREE_KEYS - #include "ma_rt_index.h" #include "ma_rt_mbr.h" @@ -814,5 +812,3 @@ int maria_rtree_page_mbr(const HA_KEYSEG *keyseg, } return 0; } - -#endif /*HAVE_RTREE_KEYS*/ diff --git a/storage/maria/ma_rt_mbr.h b/storage/maria/ma_rt_mbr.h index 5583947cb51..07ed74b687e 100644 --- a/storage/maria/ma_rt_mbr.h +++ b/storage/maria/ma_rt_mbr.h @@ -17,8 +17,6 @@ #ifndef _rt_mbr_h #define _rt_mbr_h -#ifdef HAVE_RTREE_KEYS - int maria_rtree_key_cmp(HA_KEYSEG *keyseg, const uchar *a, const uchar *b, uint key_length, uint32 nextflag); int maria_rtree_combine_rect(const HA_KEYSEG *keyseg, @@ -36,5 +34,4 @@ double maria_rtree_perimeter_increase(HA_KEYSEG *keyseg, uchar* a, uchar* b, uint key_length, double *ab_perim); int maria_rtree_page_mbr(const HA_KEYSEG *keyseg, MARIA_PAGE *page, uchar *key, uint key_length); -#endif /*HAVE_RTREE_KEYS*/ #endif /* _rt_mbr_h */ diff --git a/storage/maria/ma_rt_split.c b/storage/maria/ma_rt_split.c index a0acb9ce34d..88f00c6b46b 100644 --- a/storage/maria/ma_rt_split.c +++ b/storage/maria/ma_rt_split.c @@ -17,9 +17,6 @@ #include "maria_def.h" #include "trnman.h" #include "ma_key_recover.h" - -#ifdef HAVE_RTREE_KEYS - #include "ma_rt_index.h" #include "ma_rt_key.h" #include "ma_rt_mbr.h" @@ -546,5 +543,3 @@ split_err: stack_alloc_free(coord_buf, coord_buf_alloced); DBUG_RETURN(err_code); } - -#endif /*HAVE_RTREE_KEYS*/ diff --git a/storage/maria/ma_rt_test.c b/storage/maria/ma_rt_test.c index 17145231409..1c960737528 100644 --- a/storage/maria/ma_rt_test.c +++ b/storage/maria/ma_rt_test.c @@ -23,9 +23,6 @@ #include "ma_checkpoint.h" #include "trnman.h" #include - -#ifdef HAVE_RTREE_KEYS - #include "ma_rt_index.h" #define MAX_REC_LENGTH 1024 @@ -687,10 +684,3 @@ static void usage() } #include "ma_check_standalone.h" - -#else -int main(int argc __attribute__((unused)),char *argv[] __attribute__((unused))) -{ - exit(0); -} -#endif /*HAVE_RTREE_KEYS*/ diff --git a/storage/maria/ma_sp_defs.h b/storage/maria/ma_sp_defs.h index 8c2430e0e2b..72bf03f19a6 100644 --- a/storage/maria/ma_sp_defs.h +++ b/storage/maria/ma_sp_defs.h @@ -21,8 +21,6 @@ #define SPTYPE HA_KEYTYPE_DOUBLE #define SPLEN 8 -#ifdef HAVE_SPATIAL - enum wkbType { wkbPoint = 1, @@ -43,6 +41,4 @@ enum wkbByteOrder MARIA_KEY *_ma_sp_make_key(MARIA_HA *info, MARIA_KEY *ret_key, uint keynr, uchar *key, const uchar *record, my_off_t filepos, ulonglong trid); - -#endif /*HAVE_SPATIAL*/ #endif /* _SP_DEFS_H */ diff --git a/storage/maria/ma_sp_key.c b/storage/maria/ma_sp_key.c index 1a9abc989ed..47750d82b01 100644 --- a/storage/maria/ma_sp_key.c +++ b/storage/maria/ma_sp_key.c @@ -17,8 +17,6 @@ #include "ma_blockrec.h" /* For ROW_FLAG_TRANSID */ #include "trnman.h" -#ifdef HAVE_SPATIAL - #include "ma_sp_defs.h" static int sp_add_point_to_mbr(uchar *(*wkb), uchar *end, uint n_dims, @@ -299,5 +297,3 @@ static int sp_get_geometry_mbr(uchar *(*wkb), uchar *end, uint n_dims, } return res; } - -#endif /*HAVE_SPATIAL*/ diff --git a/storage/maria/ma_sp_test.c b/storage/maria/ma_sp_test.c index ae8f3575438..3e63b2f774f 100644 --- a/storage/maria/ma_sp_test.c +++ b/storage/maria/ma_sp_test.c @@ -19,7 +19,6 @@ #include #include "maria_def.h" -#ifdef HAVE_SPATIAL #include "ma_sp_defs.h" #define MAX_REC_LENGTH 1024 @@ -563,10 +562,3 @@ static void maria_rtree_PrintWKB(uchar *wkb, uint n_dims) } #include "ma_check_standalone.h" - -#else -int main(int argc __attribute__((unused)),char *argv[] __attribute__((unused))) -{ - exit(0); -} -#endif /*HAVE_SPATIAL*/ diff --git a/storage/maria/ma_state.c b/storage/maria/ma_state.c index 7f3b0dfa110..a0a8c51dfb2 100644 --- a/storage/maria/ma_state.c +++ b/storage/maria/ma_state.c @@ -334,12 +334,10 @@ void _ma_update_status(void* param) DBUG_ASSERT(!info->s->base.born_transactional); share->state.state= *info->state; info->state= &share->state.state; -#ifdef HAVE_QUERY_CACHE DBUG_PRINT("info", ("invalidator... '%s' (status update)", info->s->data_file_name.str)); DBUG_ASSERT(info->s->chst_invalidator != NULL); (*info->s->chst_invalidator)((const char *)info->s->data_file_name.str); -#endif } info->append_insert_at_end= 0; diff --git a/storage/mroonga/ha_mroonga.cpp b/storage/mroonga/ha_mroonga.cpp index bdf137c40cb..0253da0c35c 100644 --- a/storage/mroonga/ha_mroonga.cpp +++ b/storage/mroonga/ha_mroonga.cpp @@ -24,10 +24,6 @@ #include "mrn_mysql.h" #include "mrn_mysql_compat.h" -#ifdef USE_PRAGMA_IMPLEMENTATION -#pragma implementation -#endif - #include #include #include diff --git a/storage/mroonga/ha_mroonga.hpp b/storage/mroonga/ha_mroonga.hpp index 9fe04a07527..037cf492a2c 100644 --- a/storage/mroonga/ha_mroonga.hpp +++ b/storage/mroonga/ha_mroonga.hpp @@ -22,10 +22,6 @@ #ifndef HA_MROONGA_HPP_ #define HA_MROONGA_HPP_ -#ifdef USE_PRAGMA_INTERFACE -#pragma interface -#endif - #ifdef __cplusplus extern "C" { #endif @@ -86,11 +82,7 @@ extern "C" { # define MRN_HANDLER_HAVE_SET_HA_SHARE_REF #endif -#if MYSQL_VERSION_ID >= 50706 && !defined(MRN_MARIADB_P) -# define MRN_BIG_TABLES -#elif defined(BIG_TABLES) -# define MRN_BIG_TABLES -#endif +#define MRN_BIG_TABLES #ifdef MRN_BIG_TABLES # define MRN_HA_ROWS_FORMAT "llu" diff --git a/storage/mroonga/mrn_mysql_compat.h b/storage/mroonga/mrn_mysql_compat.h index 538aaf51cb6..b69fea44d5e 100644 --- a/storage/mroonga/mrn_mysql_compat.h +++ b/storage/mroonga/mrn_mysql_compat.h @@ -184,11 +184,7 @@ # define MRN_HAVE_BINLOG_H #endif -#if MYSQL_VERSION_ID >= 50706 && !defined(MRN_MARIADB_P) -# define MRN_HAVE_SPATIAL -#elif defined(HAVE_SPATIAL) -# define MRN_HAVE_SPATIAL -#endif +#define MRN_HAVE_SPATIAL #if MYSQL_VERSION_ID >= 50706 && !defined(MRN_MARIADB_P) # define MRN_FORMAT_STRING_LENGTH "zu" diff --git a/storage/myisam/ha_myisam.cc b/storage/myisam/ha_myisam.cc index bbd4051f304..92e76a86158 100644 --- a/storage/myisam/ha_myisam.cc +++ b/storage/myisam/ha_myisam.cc @@ -15,11 +15,6 @@ along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA */ - -#ifdef USE_PRAGMA_IMPLEMENTATION -#pragma implementation // gcc: Class implementation -#endif - #define MYSQL_SERVER 1 #include #include "sql_plugin.h" @@ -2769,7 +2764,6 @@ maria_declare_plugin(myisam) maria_declare_plugin_end; -#ifdef HAVE_QUERY_CACHE /** @brief Register a named table with a call back function to the query cache. @@ -2861,4 +2855,3 @@ my_bool ha_myisam::register_query_cache_table(THD *thd, const char *table_name, /* It is ok to try to cache current statement. */ DBUG_RETURN(TRUE); } -#endif diff --git a/storage/myisam/ha_myisam.h b/storage/myisam/ha_myisam.h index 526cbfb1025..a802f78c740 100644 --- a/storage/myisam/ha_myisam.h +++ b/storage/myisam/ha_myisam.h @@ -14,11 +14,6 @@ along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA */ - -#ifdef USE_PRAGMA_INTERFACE -#pragma interface /* gcc class implementation */ -#endif - /* class for the the myisam handler */ #include @@ -146,13 +141,11 @@ class ha_myisam final : public handler override; bool check_if_incompatible_data(HA_CREATE_INFO *info, uint table_changes) override; -#ifdef HAVE_QUERY_CACHE my_bool register_query_cache_table(THD *thd, const char *table_key, uint key_length, qc_engine_callback *engine_callback, ulonglong *engine_data) override; -#endif /** * Multi Range Read interface */ diff --git a/storage/myisam/mi_check.c b/storage/myisam/mi_check.c index 826c4ce5b8e..d688e2e42b4 100644 --- a/storage/myisam/mi_check.c +++ b/storage/myisam/mi_check.c @@ -1219,11 +1219,9 @@ int chk_data_link(HA_CHECK *param, MI_INFO *info, my_bool extend) concurrent threads when running myisamchk */ int search_result= -#ifdef HAVE_RTREE_KEYS (keyinfo->flag & HA_SPATIAL) ? rtree_find_first(info, key, info->lastkey, key_length, MBR_EQUAL | MBR_DATA) : -#endif _mi_search(info,keyinfo,info->lastkey,key_length, SEARCH_SAME, info->s->state.key_root[key]); if (search_result) @@ -1774,14 +1772,12 @@ static int writekeys(MI_SORT_PARAM *sort_param) if (_mi_ft_add(info, i, key, buff, filepos)) goto err; } -#ifdef HAVE_SPATIAL else if (info->s->keyinfo[i].flag & HA_SPATIAL) { uint key_length=_mi_make_key(info,i,key,buff,filepos); if (rtree_insert(info, i, key, key_length)) goto err; } -#endif /*HAVE_SPATIAL*/ else { uint key_length=_mi_make_key(info,i,key,buff,filepos); diff --git a/storage/myisam/mi_create.c b/storage/myisam/mi_create.c index 1e99c542521..a8168316f20 100644 --- a/storage/myisam/mi_create.c +++ b/storage/myisam/mi_create.c @@ -261,7 +261,6 @@ int mi_create(const char *name,uint keys,MI_KEYDEF *keydefs, key_length=pointer; if (keydef->flag & HA_SPATIAL) { -#ifdef HAVE_SPATIAL /* BAR TODO to support 3D and more dimensions in the future */ uint sp_segs=SPDIMS*2; keydef->flag=HA_SPATIAL; @@ -294,10 +293,6 @@ int mi_create(const char *name,uint keys,MI_KEYDEF *keydefs, key_length+=SPLEN*sp_segs; length++; /* At least one length byte */ min_key_length_skip+=SPLEN*2*SPDIMS; -#else - my_errno= HA_ERR_UNSUPPORTED; - goto err_no_lock; -#endif /*HAVE_SPATIAL*/ } else if (keydef->flag & HA_FULLTEXT) { @@ -728,7 +723,6 @@ int mi_create(const char *name,uint keys,MI_KEYDEF *keydefs, for (j=0 ; j < keydefs[i].keysegs-sp_segs ; j++) if (mi_keyseg_write(file, &keydefs[i].seg[j])) goto err; -#ifdef HAVE_SPATIAL for (j=0 ; j < sp_segs ; j++) { HA_KEYSEG sseg; @@ -745,7 +739,6 @@ int mi_create(const char *name,uint keys,MI_KEYDEF *keydefs, if (mi_keyseg_write(file, &sseg)) goto err; } -#endif } /* Create extra keys for unique definitions */ offset= real_reclength - uniques * MI_UNIQUE_HASH_LENGTH; diff --git a/storage/myisam/mi_key.c b/storage/myisam/mi_key.c index 707de1d45d9..208ce0a106f 100644 --- a/storage/myisam/mi_key.c +++ b/storage/myisam/mi_key.c @@ -66,11 +66,7 @@ uint _mi_make_key(register MI_INFO *info, uint keynr, uchar *key, /* TODO: nulls processing */ -#ifdef HAVE_SPATIAL DBUG_RETURN(sp_make_key(info,keynr,key,record,filepos)); -#else - DBUG_ASSERT(0); /* mi_open should check that this never happens*/ -#endif } start=key; diff --git a/storage/myisam/mi_locking.c b/storage/myisam/mi_locking.c index cee1c326b3e..8fd03fec571 100644 --- a/storage/myisam/mi_locking.c +++ b/storage/myisam/mi_locking.c @@ -333,12 +333,10 @@ void mi_update_status(void* param) (long) info->s->state.state.key_file_length, (long) info->s->state.state.data_file_length)); info->s->state.state= *info->state; -#ifdef HAVE_QUERY_CACHE DBUG_PRINT("info", ("invalidator... '%s' (status update)", info->filename)); DBUG_ASSERT(info->s->chst_invalidator != NULL); (*info->s->chst_invalidator)((const char *)info->filename); -#endif } info->state= &info->s->state.state; diff --git a/storage/myisam/mi_open.c b/storage/myisam/mi_open.c index 68434edfada..ae1364acfd3 100644 --- a/storage/myisam/mi_open.c +++ b/storage/myisam/mi_open.c @@ -388,15 +388,10 @@ MI_INFO *mi_open(const char *name, int mode, uint open_flags) } if (keyinfo->flag & HA_SPATIAL) { -#ifdef HAVE_SPATIAL uint sp_segs= SPDIMS*2; keyinfo->seg= pos - sp_segs; DBUG_ASSERT(keyinfo->keysegs == sp_segs + 1); keyinfo->keysegs= sp_segs; -#else - my_errno=HA_ERR_UNSUPPORTED; - goto err; -#endif } else if (keyinfo->flag & HA_FULLTEXT) { @@ -848,12 +843,8 @@ static void setup_key_functions(register MI_KEYDEF *keyinfo) { if (keyinfo->key_alg == HA_KEY_ALG_RTREE) { -#ifdef HAVE_RTREE_KEYS keyinfo->ck_insert = rtree_insert; keyinfo->ck_delete = rtree_delete; -#else - DBUG_ASSERT(0); /* mi_open should check it never happens */ -#endif } else { diff --git a/storage/myisam/mi_range.c b/storage/myisam/mi_range.c index 54350f7a111..e5342a1905c 100644 --- a/storage/myisam/mi_range.c +++ b/storage/myisam/mi_range.c @@ -65,7 +65,6 @@ ha_rows mi_records_in_range(MI_INFO *info, int inx, mysql_rwlock_rdlock(&info->s->key_root_lock[inx]); switch(info->s->keyinfo[inx].key_alg){ -#ifdef HAVE_RTREE_KEYS case HA_KEY_ALG_RTREE: { uchar * key_buff; @@ -95,7 +94,6 @@ ha_rows mi_records_in_range(MI_INFO *info, int inx, res= res ? res : 1; /* Don't return 0 */ break; } -#endif case HA_KEY_ALG_BTREE: default: start_pos= (min_key ?_mi_record_pos(info, min_key->key, diff --git a/storage/myisam/mi_rkey.c b/storage/myisam/mi_rkey.c index 590981fb790..48aa576a693 100644 --- a/storage/myisam/mi_rkey.c +++ b/storage/myisam/mi_rkey.c @@ -81,7 +81,6 @@ int mi_rkey(MI_INFO *info, uchar *buf, int inx, const uchar *key, use_key_length=USE_WHOLE_KEY; switch (info->s->keyinfo[inx].key_alg) { -#ifdef HAVE_RTREE_KEYS case HA_KEY_ALG_RTREE: if (rtree_find_first(info,inx,key_buff,use_key_length,nextflag) < 0) { @@ -93,7 +92,6 @@ int mi_rkey(MI_INFO *info, uchar *buf, int inx, const uchar *key, goto err; } break; -#endif case HA_KEY_ALG_BTREE: default: if (!_mi_search(info, keyinfo, key_buff, use_key_length, diff --git a/storage/myisam/mi_rnext.c b/storage/myisam/mi_rnext.c index 7124c102f82..9fb44888f2c 100644 --- a/storage/myisam/mi_rnext.c +++ b/storage/myisam/mi_rnext.c @@ -46,11 +46,9 @@ int mi_rnext(MI_INFO *info, uchar *buf, int inx) if (!flag) { switch(info->s->keyinfo[inx].key_alg){ -#ifdef HAVE_RTREE_KEYS case HA_KEY_ALG_RTREE: error=rtree_get_first(info,inx,info->lastkey_length); break; -#endif case HA_KEY_ALG_BTREE: default: error=_mi_search_first(info,info->s->keyinfo+inx, @@ -75,7 +73,6 @@ int mi_rnext(MI_INFO *info, uchar *buf, int inx) else { switch (info->s->keyinfo[inx].key_alg) { -#ifdef HAVE_RTREE_KEYS case HA_KEY_ALG_RTREE: /* Note that rtree doesn't support that the table @@ -84,7 +81,6 @@ int mi_rnext(MI_INFO *info, uchar *buf, int inx) */ error= rtree_get_next(info,inx,info->lastkey_length); break; -#endif case HA_KEY_ALG_BTREE: default: if (!changed) diff --git a/storage/myisam/mi_rnext_same.c b/storage/myisam/mi_rnext_same.c index 480b54f742c..6197e2afefa 100644 --- a/storage/myisam/mi_rnext_same.c +++ b/storage/myisam/mi_rnext_same.c @@ -44,7 +44,6 @@ int mi_rnext_same(MI_INFO *info, uchar *buf) switch (keyinfo->key_alg) { -#ifdef HAVE_RTREE_KEYS case HA_KEY_ALG_RTREE: if ((error=rtree_find_next(info,inx, myisam_read_vec[info->last_key_func]))) @@ -55,7 +54,6 @@ int mi_rnext_same(MI_INFO *info, uchar *buf) break; } break; -#endif case HA_KEY_ALG_BTREE: default: if (!(info->update & HA_STATE_RNEXT_SAME)) diff --git a/storage/myisam/rt_index.c b/storage/myisam/rt_index.c index 651e2e79478..3bc9a41b81d 100644 --- a/storage/myisam/rt_index.c +++ b/storage/myisam/rt_index.c @@ -14,9 +14,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA */ #include "myisamdef.h" - -#ifdef HAVE_RTREE_KEYS - #include "rt_index.h" #include "rt_key.h" #include "rt_mbr.h" @@ -1121,6 +1118,3 @@ err1: my_afree((uchar*)page_buf); return HA_POS_ERROR; } - -#endif /*HAVE_RTREE_KEYS*/ - diff --git a/storage/myisam/rt_index.h b/storage/myisam/rt_index.h index 2c1009290c6..37c9928751a 100644 --- a/storage/myisam/rt_index.h +++ b/storage/myisam/rt_index.h @@ -17,8 +17,6 @@ #ifndef _rt_index_h #define _rt_index_h -#ifdef HAVE_RTREE_KEYS - #define rt_PAGE_FIRST_KEY(page, nod_flag) (page + 2 + nod_flag) #define rt_PAGE_NEXT_KEY(key, key_length, nod_flag) (key + key_length + \ (nod_flag ? nod_flag : info->s->base.rec_reflength)) @@ -41,6 +39,4 @@ ha_rows rtree_estimate(MI_INFO *info, uint keynr, uchar *key, int rtree_split_page(MI_INFO *info, MI_KEYDEF *keyinfo, uchar *page, uchar *key, uint key_length, my_off_t *new_page_offs); - -#endif /*HAVE_RTREE_KEYS*/ #endif /* _rt_index_h */ diff --git a/storage/myisam/rt_key.c b/storage/myisam/rt_key.c index 3c58a454834..db2573691ed 100644 --- a/storage/myisam/rt_key.c +++ b/storage/myisam/rt_key.c @@ -15,8 +15,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA */ #include "myisamdef.h" - -#ifdef HAVE_RTREE_KEYS #include "rt_index.h" #include "rt_key.h" #include "rt_mbr.h" @@ -103,5 +101,3 @@ int rtree_set_key_mbr(MI_INFO *info, MI_KEYDEF *keyinfo, uchar *key, DBUG_RETURN(rtree_page_mbr(info, keyinfo->seg, info->buff, key, key_length)); } - -#endif /*HAVE_RTREE_KEYS*/ diff --git a/storage/myisam/rt_key.h b/storage/myisam/rt_key.h index 56f57d847bf..1f144aef8f1 100644 --- a/storage/myisam/rt_key.h +++ b/storage/myisam/rt_key.h @@ -19,14 +19,10 @@ #ifndef _rt_key_h #define _rt_key_h -#ifdef HAVE_RTREE_KEYS - int rtree_add_key(MI_INFO *info, MI_KEYDEF *keyinfo, uchar *key, uint key_length, uchar *page_buf, my_off_t *new_page); int rtree_delete_key(MI_INFO *info, uchar *page, uchar *key, uint key_length, uint nod_flag); int rtree_set_key_mbr(MI_INFO *info, MI_KEYDEF *keyinfo, uchar *key, uint key_length, my_off_t child_page); - -#endif /*HAVE_RTREE_KEYS*/ #endif /* _rt_key_h */ diff --git a/storage/myisam/rt_mbr.c b/storage/myisam/rt_mbr.c index 8bcaf9f644a..119aa70806f 100644 --- a/storage/myisam/rt_mbr.c +++ b/storage/myisam/rt_mbr.c @@ -15,9 +15,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA */ #include "myisamdef.h" - -#ifdef HAVE_RTREE_KEYS - #include "rt_index.h" #include "rt_mbr.h" @@ -803,5 +800,3 @@ int rtree_page_mbr(MI_INFO *info, HA_KEYSEG *keyseg, uchar *page_buf, } return 0; } - -#endif /*HAVE_RTREE_KEYS*/ diff --git a/storage/myisam/rt_mbr.h b/storage/myisam/rt_mbr.h index 43e55d39093..8a00d5de18b 100644 --- a/storage/myisam/rt_mbr.h +++ b/storage/myisam/rt_mbr.h @@ -17,8 +17,6 @@ #ifndef _rt_mbr_h #define _rt_mbr_h -#ifdef HAVE_RTREE_KEYS - int rtree_key_cmp(HA_KEYSEG *keyseg, uchar *a, uchar *b, uint key_length, uint nextflag); int rtree_combine_rect(HA_KEYSEG *keyseg,uchar *, uchar *, uchar*, @@ -33,5 +31,4 @@ double rtree_perimeter_increase(HA_KEYSEG *keyseg, uchar* a, uchar* b, uint key_length, double *ab_perim); int rtree_page_mbr(MI_INFO *info, HA_KEYSEG *keyseg, uchar *page_buf, uchar* c, uint key_length); -#endif /*HAVE_RTREE_KEYS*/ #endif /* _rt_mbr_h */ diff --git a/storage/myisam/rt_split.c b/storage/myisam/rt_split.c index 1adcdb8e5b0..86b6153b025 100644 --- a/storage/myisam/rt_split.c +++ b/storage/myisam/rt_split.c @@ -15,9 +15,6 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA */ #include "myisamdef.h" - -#ifdef HAVE_RTREE_KEYS - #include "rt_index.h" #include "rt_key.h" #include "rt_mbr.h" @@ -344,5 +341,3 @@ split_err: my_afree((uchar*) coord_buf); DBUG_RETURN(err_code); } - -#endif /*HAVE_RTREE_KEYS*/ diff --git a/storage/myisam/rt_test.c b/storage/myisam/rt_test.c index a35d41a0025..5e9a0746da8 100644 --- a/storage/myisam/rt_test.c +++ b/storage/myisam/rt_test.c @@ -19,9 +19,6 @@ #include #include "myisam.h" - -#ifdef HAVE_RTREE_KEYS - #include "rt_index.h" #define MAX_REC_LENGTH 1024 @@ -429,11 +426,4 @@ static void create_record(uchar *record,uint rownr) } } -#else -int main(int argc __attribute__((unused)),char *argv[] __attribute__((unused))) -{ - exit(0); -} -#endif /*HAVE_RTREE_KEYS*/ - #include "mi_extrafunc.h" diff --git a/storage/myisam/sp_defs.h b/storage/myisam/sp_defs.h index d43fa49ed57..f17efcf6fd8 100644 --- a/storage/myisam/sp_defs.h +++ b/storage/myisam/sp_defs.h @@ -21,8 +21,6 @@ #define SPTYPE HA_KEYTYPE_DOUBLE #define SPLEN 8 -#ifdef HAVE_SPATIAL - enum wkbType { wkbPoint = 1, @@ -43,5 +41,4 @@ enum wkbByteOrder uint sp_make_key(register MI_INFO *info, uint keynr, uchar *key, const uchar *record, my_off_t filepos); -#endif /*HAVE_SPATIAL*/ #endif /* _SP_DEFS_H */ diff --git a/storage/myisam/sp_key.c b/storage/myisam/sp_key.c index 4c6ef75934e..5d4e96bff28 100644 --- a/storage/myisam/sp_key.c +++ b/storage/myisam/sp_key.c @@ -15,8 +15,6 @@ #include "myisamdef.h" -#ifdef HAVE_SPATIAL - #include "sp_defs.h" static int sp_add_point_to_mbr(uchar *(*wkb), uchar *end, uint n_dims, @@ -280,5 +278,3 @@ static int sp_get_geometry_mbr(uchar *(*wkb), uchar *end, uint n_dims, } return res; } - -#endif /*HAVE_SPATIAL*/ diff --git a/storage/myisam/sp_test.c b/storage/myisam/sp_test.c index a33a6c8e743..b2772246ddd 100644 --- a/storage/myisam/sp_test.c +++ b/storage/myisam/sp_test.c @@ -19,7 +19,6 @@ #include #include "myisam.h" -#ifdef HAVE_SPATIAL #include "sp_defs.h" #define MAX_REC_LENGTH 1024 @@ -488,11 +487,4 @@ static void rtree_PrintWKB(uchar *wkb, uint n_dims) } } -#else -int main(int argc __attribute__((unused)),char *argv[] __attribute__((unused))) -{ - exit(0); -} -#endif /*HAVE_SPATIAL*/ - #include "mi_extrafunc.h" diff --git a/storage/myisammrg/ha_myisammrg.cc b/storage/myisammrg/ha_myisammrg.cc index 7087bb1df4b..fba76016fdd 100644 --- a/storage/myisammrg/ha_myisammrg.cc +++ b/storage/myisammrg/ha_myisammrg.cc @@ -86,10 +86,6 @@ They stay with the open table until its final close. */ -#ifdef USE_PRAGMA_IMPLEMENTATION -#pragma implementation // gcc: Class implementation -#endif - #define MYSQL_SERVER 1 #include #include "sql_priv.h" @@ -929,7 +925,7 @@ int ha_myisammrg::attach_children(void) break; } } -#if !defined(BIG_TABLES) || SIZEOF_OFF_T == 4 +#if SIZEOF_OFF_T == 4 /* Merge table has more than 2G rows */ if (table->s->crashed) { @@ -1256,7 +1252,7 @@ int ha_myisammrg::info(uint flag) */ stats.records = (ha_rows) mrg_info.records; stats.deleted = (ha_rows) mrg_info.deleted; -#if !defined(BIG_TABLES) || SIZEOF_OFF_T == 4 +#if SIZEOF_OFF_T == 4 if ((mrg_info.records >= (ulonglong) 1 << 32) || (mrg_info.deleted >= (ulonglong) 1 << 32)) table->s->crashed= 1; diff --git a/storage/myisammrg/ha_myisammrg.h b/storage/myisammrg/ha_myisammrg.h index 8605ffb70d9..b032b675cd0 100644 --- a/storage/myisammrg/ha_myisammrg.h +++ b/storage/myisammrg/ha_myisammrg.h @@ -14,11 +14,6 @@ along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA */ - -#ifdef USE_PRAGMA_INTERFACE -#pragma interface /* gcc class implementation */ -#endif - /* class for the the myisam merge handler */ #include diff --git a/storage/oqgraph/ha_oqgraph.cc b/storage/oqgraph/ha_oqgraph.cc index c2f21ea7edb..b888501740e 100644 --- a/storage/oqgraph/ha_oqgraph.cc +++ b/storage/oqgraph/ha_oqgraph.cc @@ -35,10 +35,6 @@ */ -#ifdef USE_PRAGMA_IMPLEMENTATION -#pragma implementation // gcc: Class implementation -#endif - #include #define MYSQL_SERVER 1 // to have THD diff --git a/storage/oqgraph/ha_oqgraph.h b/storage/oqgraph/ha_oqgraph.h index 0b0bb25f4db..b0575429421 100644 --- a/storage/oqgraph/ha_oqgraph.h +++ b/storage/oqgraph/ha_oqgraph.h @@ -22,10 +22,6 @@ ====================================================================== */ -#ifdef USE_PRAGMA_INTERFACE -#pragma interface /* gcc class implementation */ -#endif - #include "handler.h" #include "table.h" diff --git a/storage/rocksdb/ha_rocksdb.cc b/storage/rocksdb/ha_rocksdb.cc index b0f587bb0d3..ee1ca58d0a3 100644 --- a/storage/rocksdb/ha_rocksdb.cc +++ b/storage/rocksdb/ha_rocksdb.cc @@ -14,10 +14,6 @@ along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA */ -#ifdef USE_PRAGMA_IMPLEMENTATION -#pragma implementation // gcc: Class implementation -#endif - #define MYSQL_SERVER 1 /* For use of 'PRIu64': */ diff --git a/storage/rocksdb/ha_rocksdb.h b/storage/rocksdb/ha_rocksdb.h index 29bda530689..d6bf73c733f 100644 --- a/storage/rocksdb/ha_rocksdb.h +++ b/storage/rocksdb/ha_rocksdb.h @@ -15,10 +15,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA */ #pragma once -#ifdef USE_PRAGMA_INTERFACE -#pragma interface /* gcc class implementation */ -#endif - /* C++ standard header files */ #include #include diff --git a/storage/rocksdb/rdb_cf_manager.cc b/storage/rocksdb/rdb_cf_manager.cc index 789481c5f00..b8867e3cd06 100644 --- a/storage/rocksdb/rdb_cf_manager.cc +++ b/storage/rocksdb/rdb_cf_manager.cc @@ -14,10 +14,6 @@ along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA */ -#ifdef USE_PRAGMA_IMPLEMENTATION -#pragma implementation // gcc: Class implementation -#endif - /* For use of 'PRIu64': */ #define __STDC_FORMAT_MACROS diff --git a/storage/rocksdb/rdb_cf_options.cc b/storage/rocksdb/rdb_cf_options.cc index c0d16893cda..19cb104c668 100644 --- a/storage/rocksdb/rdb_cf_options.cc +++ b/storage/rocksdb/rdb_cf_options.cc @@ -14,10 +14,6 @@ along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA */ -#ifdef USE_PRAGMA_IMPLEMENTATION -#pragma implementation // gcc: Class implementation -#endif - #include /* This C++ files header file */ diff --git a/storage/rocksdb/rdb_compact_filter.h b/storage/rocksdb/rdb_compact_filter.h index cadd55e8c2f..cae88d3b2f2 100644 --- a/storage/rocksdb/rdb_compact_filter.h +++ b/storage/rocksdb/rdb_compact_filter.h @@ -16,10 +16,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA */ #pragma once -#ifdef USE_PRAGMA_IMPLEMENTATION -#pragma implementation // gcc: Class implementation -#endif - /* C++ system header files */ #include #include diff --git a/storage/rocksdb/rdb_datadic.cc b/storage/rocksdb/rdb_datadic.cc index 648afde5a3d..e73d586f5d2 100644 --- a/storage/rocksdb/rdb_datadic.cc +++ b/storage/rocksdb/rdb_datadic.cc @@ -15,10 +15,6 @@ along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA */ -#ifdef USE_PRAGMA_IMPLEMENTATION -#pragma implementation // gcc: Class implementation -#endif - /* For use of 'PRIu64': */ #define __STDC_FORMAT_MACROS diff --git a/storage/rocksdb/rdb_psi.cc b/storage/rocksdb/rdb_psi.cc index 77003b1bb48..67543f3c3f0 100644 --- a/storage/rocksdb/rdb_psi.cc +++ b/storage/rocksdb/rdb_psi.cc @@ -13,10 +13,6 @@ along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#ifdef USE_PRAGMA_IMPLEMENTATION -#pragma implementation // gcc: Class implementation -#endif - #define MYSQL_SERVER 1 /* The C++ file's header */ diff --git a/storage/rocksdb/rdb_threads.cc b/storage/rocksdb/rdb_threads.cc index 06683d6e2f1..2948016cdd0 100644 --- a/storage/rocksdb/rdb_threads.cc +++ b/storage/rocksdb/rdb_threads.cc @@ -15,10 +15,6 @@ along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA */ -#ifdef USE_PRAGMA_IMPLEMENTATION -#pragma implementation // gcc: Class implementation -#endif - #include /* The C++ file's header */ diff --git a/storage/sphinx/ha_sphinx.cc b/storage/sphinx/ha_sphinx.cc index 103ce50dd63..8108b528421 100644 --- a/storage/sphinx/ha_sphinx.cc +++ b/storage/sphinx/ha_sphinx.cc @@ -13,10 +13,6 @@ // did not, you can find it at http://www.gnu.org/ // -#ifdef USE_PRAGMA_IMPLEMENTATION -#pragma implementation // gcc: Class implementation -#endif - #if defined(_MSC_VER) && _MSC_VER>=1400 #define _CRT_SECURE_NO_DEPRECATE 1 #define _CRT_NONSTDC_NO_DEPRECATE 1 diff --git a/storage/sphinx/ha_sphinx.h b/storage/sphinx/ha_sphinx.h index 848c9a18651..72022c2df9f 100644 --- a/storage/sphinx/ha_sphinx.h +++ b/storage/sphinx/ha_sphinx.h @@ -2,11 +2,6 @@ // $Id: ha_sphinx.h 4818 2014-09-24 08:53:38Z tomat $ // -#ifdef USE_PRAGMA_INTERFACE -#pragma interface // gcc class implementation -#endif - - #if MYSQL_VERSION_ID>=50515 #define TABLE_ARG TABLE_SHARE #elif MYSQL_VERSION_ID>50100 diff --git a/storage/spider/ha_spider.cc b/storage/spider/ha_spider.cc index e3364b94501..8767f5420a7 100644 --- a/storage/spider/ha_spider.cc +++ b/storage/spider/ha_spider.cc @@ -14,10 +14,6 @@ along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA */ -#ifdef USE_PRAGMA_IMPLEMENTATION -#pragma implementation -#endif - #define MYSQL_SERVER 1 #include #include "mysql_version.h" diff --git a/storage/spider/ha_spider.h b/storage/spider/ha_spider.h index f467020b13f..cebf733bdec 100644 --- a/storage/spider/ha_spider.h +++ b/storage/spider/ha_spider.h @@ -14,10 +14,6 @@ along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA */ -#ifdef USE_PRAGMA_INTERFACE -#pragma interface -#endif - #define SPIDER_CONNECT_INFO_MAX_LEN 64 #define SPIDER_CONNECT_INFO_PATH_MAX_LEN FN_REFLEN #define SPIDER_LONGLONG_LEN 20