1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

cleanup: remove unconditional #ifdef's

This commit is contained in:
Sergei Golubchik
2024-01-10 20:31:43 +01:00
parent 570daecf49
commit 32e6f8ff2e
190 changed files with 29 additions and 875 deletions

View File

@@ -500,14 +500,6 @@
#cmakedefine HAVE_des 1 #cmakedefine HAVE_des 1
#cmakedefine HAVE_hkdf 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 Important storage engines (those that really need define
WITH_<ENGINE>_STORAGE_ENGINE for the whole server) WITH_<ENGINE>_STORAGE_ENGINE for the whole server)

View File

@@ -676,13 +676,8 @@ typedef struct st_page_range
#define unused_page_range { UNUSED_PAGE_NO, UNUSED_PAGE_NO } #define unused_page_range { UNUSED_PAGE_NO, UNUSED_PAGE_NO }
/* For number of records */ /* For number of records */
#ifdef BIG_TABLES
#define rows2double(A) ulonglong2double(A) #define rows2double(A) ulonglong2double(A)
typedef my_off_t ha_rows; 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_POS_ERROR (~ (ha_rows) 0)
#define HA_OFFSET_ERROR (~ (my_off_t) 0) #define HA_OFFSET_ERROR (~ (my_off_t) 0)

View File

@@ -234,14 +234,8 @@
/* Fix to avoid warnings when sizeof(ha_rows) == sizeof(long) */ /* Fix to avoid warnings when sizeof(ha_rows) == sizeof(long) */
#ifdef BIG_TABLES
#define mi_rowstore(T,A) mi_int8store(T, A) #define mi_rowstore(T,A) mi_int8store(T, A)
#define mi_rowkorr(T) mi_uint8korr(T) #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 #if SIZEOF_OFF_T > 4
#define mi_sizestore(T,A) mi_int8store(T, A) #define mi_sizestore(T,A) mi_int8store(T, A)

View File

@@ -16,7 +16,6 @@
#include "mariadb.h" #include "mariadb.h"
#include "sql_priv.h" #include "sql_priv.h"
#ifdef HAVE_QUERY_CACHE
#include <mysql.h> #include <mysql.h>
#include "sql_basic_types.h" #include "sql_basic_types.h"
#include "emb_qcache.h" #include "emb_qcache.h"
@@ -497,6 +496,3 @@ return_ok:
err: err:
DBUG_RETURN(1); DBUG_RETURN(1);
} }
#endif /*HAVE_QUERY_CACHE*/

View File

@@ -14,10 +14,6 @@
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA */ 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 "mariadb.h"
#include "sql_priv.h" #include "sql_priv.h"
#include "sql_select.h" #include "sql_select.h"

View File

@@ -22,10 +22,6 @@
Declarations for the Debug Sync Facility. See debug_sync.cc for details. Declarations for the Debug Sync Facility. See debug_sync.cc for details.
*/ */
#ifdef USE_PRAGMA_INTERFACE
#pragma interface /* gcc class implementation */
#endif
class THD; class THD;
#if defined(ENABLED_DEBUG_SYNC) #if defined(ENABLED_DEBUG_SYNC)

View File

@@ -23,10 +23,6 @@
This file implements classes defined in field.h This file implements classes defined in field.h
*/ */
#ifdef USE_PRAGMA_IMPLEMENTATION
#pragma implementation // gcc: Class implementation
#endif
#include "mariadb.h" #include "mariadb.h"
#include "sql_priv.h" #include "sql_priv.h"
#include "sql_select.h" #include "sql_select.h"

View File

@@ -21,10 +21,6 @@
variables must declare the size_of() member function. 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 "mysqld.h" /* system_charset_info */
#include "table.h" /* TABLE */ #include "table.h" /* TABLE */
#include "sql_string.h" /* String */ #include "sql_string.h" /* String */

View File

@@ -19,8 +19,6 @@
#include <my_sys.h> #include <my_sys.h>
#include <m_string.h> #include <m_string.h>
#ifdef HAVE_SPATIAL
#include "gcalc_slicescan.h" #include "gcalc_slicescan.h"
@@ -2010,6 +2008,3 @@ double Gcalc_scan_iterator::get_pure_double(const Gcalc_internal_coord *d,
res*= -1.0; res*= -1.0;
return res; return res;
} }
#endif /* HAVE_SPATIAL */

View File

@@ -17,8 +17,6 @@
#include "mariadb.h" #include "mariadb.h"
#ifdef HAVE_SPATIAL
#include "gcalc_tools.h" #include "gcalc_tools.h"
#include "spatial.h" #include "spatial.h"
@@ -1466,6 +1464,3 @@ void Gcalc_operation_reducer::reset()
m_res_hook= (Gcalc_dyn_list::Item **)&m_result; m_res_hook= (Gcalc_dyn_list::Item **)&m_result;
free_list(m_first_active_thread); free_list(m_first_active_thread);
} }
#endif /*HAVE_SPATIAL*/

View File

@@ -2217,10 +2217,8 @@ commit_one_phase_2(THD *thd, bool all, THD_TRANS *trans, bool is_real_trans)
trans->no_2pc=0; trans->no_2pc=0;
if (all) if (all)
{ {
#ifdef HAVE_QUERY_CACHE
if (thd->transaction->changed_tables) if (thd->transaction->changed_tables)
query_cache.invalidate(thd, thd->transaction->changed_tables); query_cache.invalidate(thd, thd->transaction->changed_tables);
#endif
} }
} }

View File

@@ -21,10 +21,6 @@
/* Definitions for parameters to do with handler-routines */ /* Definitions for parameters to do with handler-routines */
#ifdef USE_PRAGMA_INTERFACE
#pragma interface /* gcc class implementation */
#endif
#include "sql_const.h" #include "sql_const.h"
#include "sql_basic_types.h" #include "sql_basic_types.h"
#include "mysqld.h" /* server_id */ #include "mysqld.h" /* server_id */

View File

@@ -19,10 +19,6 @@
** to usage. ** to usage.
*/ */
#ifdef USE_PRAGMA_IMPLEMENTATION
#pragma implementation // gcc: Class implementation
#endif
#include "mariadb.h" #include "mariadb.h"
#include "sql_priv.h" #include "sql_priv.h"
#include "hash_filo.h" #include "hash_filo.h"

View File

@@ -22,10 +22,6 @@
#ifndef HASH_FILO_H #ifndef HASH_FILO_H
#define 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 "hash.h" /* my_hash_get_key, my_hash_free_key, HASH */
#include "m_string.h" /* bzero */ #include "m_string.h" /* bzero */
#include "mysqld.h" /* key_hash_filo_lock */ #include "mysqld.h" /* key_hash_filo_lock */

View File

@@ -15,10 +15,6 @@
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA */ 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 "mariadb.h" /* NO_EMBEDDED_ACCESS_CHECKS */
#include "sql_priv.h" #include "sql_priv.h"
#include <mysql.h> #include <mysql.h>

View File

@@ -17,11 +17,6 @@
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA */ 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 "sql_priv.h" /* STRING_BUFFER_USUAL_SIZE */
#include "unireg.h" #include "unireg.h"
#include "sql_const.h" /* RAND_TABLE_BIT, MAX_FIELD_NAME */ #include "sql_const.h" /* RAND_TABLE_BIT, MAX_FIELD_NAME */

View File

@@ -22,10 +22,6 @@
This file defines all compare functions This file defines all compare functions
*/ */
#ifdef USE_PRAGMA_IMPLEMENTATION
#pragma implementation // gcc: Class implementation
#endif
#include "mariadb.h" #include "mariadb.h"
#include "sql_priv.h" #include "sql_priv.h"
#include <m_ctype.h> #include <m_ctype.h>

View File

@@ -19,10 +19,6 @@
/* compare and test functions */ /* 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_func.h" /* Item_int_func, Item_bool_func */
#include "item.h" #include "item.h"
#include "opt_rewrite_date_cmp.h" #include "opt_rewrite_date_cmp.h"

View File

@@ -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; 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() int item_create_init()
{ {
size_t count= native_func_registry_array.count(); size_t count= native_func_registry_array.count();
#ifdef HAVE_SPATIAL
count+= native_func_registry_array_geom.count(); count+= native_func_registry_array_geom.count();
#endif
if (native_functions_hash.init(count) || if (native_functions_hash.init(count) ||
native_functions_hash.append(native_func_registry_array.elements(), native_functions_hash.append(native_func_registry_array.elements(),
native_func_registry_array.count())) native_func_registry_array.count()))
return true; return true;
#ifdef HAVE_SPATIAL
if (native_functions_hash.append(native_func_registry_array_geom.elements(), if (native_functions_hash.append(native_func_registry_array_geom.elements(),
native_func_registry_array_geom.count())) native_func_registry_array_geom.count()))
return true; return true;
#endif
count+= oracle_func_registry_array.count(); count+= oracle_func_registry_array.count();
@@ -6633,11 +6627,9 @@ int item_create_init()
native_func_registry_array.count())) native_func_registry_array.count()))
return true; return true;
#ifdef HAVE_SPATIAL
if (native_functions_hash_oracle.append(native_func_registry_array_geom.elements(), if (native_functions_hash_oracle.append(native_func_registry_array_geom.elements(),
native_func_registry_array_geom.count())) native_func_registry_array_geom.count()))
return true; return true;
#endif
return return
native_functions_hash_oracle.replace(oracle_func_registry_array.elements(), native_functions_hash_oracle.replace(oracle_func_registry_array.elements(),

View File

@@ -21,10 +21,6 @@
This file defines all numerical functions This file defines all numerical functions
*/ */
#ifdef USE_PRAGMA_IMPLEMENTATION
#pragma implementation // gcc: Class implementation
#endif
#include "sql_plugin.h" #include "sql_plugin.h"
#include "sql_priv.h" #include "sql_priv.h"
/* /*

View File

@@ -19,10 +19,6 @@
/* Function items used by mysql */ /* Function items used by mysql */
#ifdef USE_PRAGMA_INTERFACE
#pragma interface /* gcc class implementation */
#endif
#ifdef HAVE_IEEEFP_H #ifdef HAVE_IEEEFP_H
extern "C" /* Bug in BSDI include file */ extern "C" /* Bug in BSDI include file */
{ {

View File

@@ -22,10 +22,6 @@
This file defines all spatial functions This file defines all spatial functions
*/ */
#ifdef USE_PRAGMA_IMPLEMENTATION
#pragma implementation // gcc: Class implementation
#endif
#include "mariadb.h" #include "mariadb.h"
#include "sql_priv.h" #include "sql_priv.h"
/* /*
@@ -35,7 +31,6 @@
*/ */
#include "sql_class.h" // THD, set_var.h: THD #include "sql_class.h" // THD, set_var.h: THD
#include "set_var.h" #include "set_var.h"
#ifdef HAVE_SPATIAL
#include <m_ctype.h> #include <m_ctype.h>
#include "opt_range.h" #include "opt_range.h"
#include "item_geofunc.h" #include "item_geofunc.h"
@@ -4077,5 +4072,3 @@ static Native_func_registry func_array_geom[] =
Native_func_registry_array Native_func_registry_array
native_func_registry_array_geom(func_array_geom, native_func_registry_array_geom(func_array_geom,
array_elements(func_array_geom)); array_elements(func_array_geom));
#endif /*HAVE_SPATIAL*/

View File

@@ -20,12 +20,6 @@
/* This file defines all spatial functions */ /* 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 "sql_type_geom.h"
#include "item.h" #include "item.h"
#include "gstream.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_NEW(thd, obj_constructor) new (thd->mem_root) obj_constructor
#define GEOM_TYPE(x) (x) #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 */ #endif /* ITEM_GEOFUNC_INCLUDED */

View File

@@ -27,10 +27,6 @@
(This shouldn't be needed) (This shouldn't be needed)
*/ */
#ifdef USE_PRAGMA_IMPLEMENTATION
#pragma implementation // gcc: Class implementation
#endif
#include "mariadb.h" // HAVE_* #include "mariadb.h" // HAVE_*
#include "sql_priv.h" #include "sql_priv.h"

View File

@@ -21,10 +21,6 @@
/* This file defines all string functions */ /* This file defines all string functions */
#ifdef USE_PRAGMA_INTERFACE
#pragma interface /* gcc class implementation */
#endif
extern size_t username_char_length; extern size_t username_char_length;
class Item_str_func :public Item_func class Item_str_func :public Item_func

View File

@@ -25,10 +25,6 @@
methods (sql_select.h/sql_select.cc) methods (sql_select.h/sql_select.cc)
*/ */
#ifdef USE_PRAGMA_IMPLEMENTATION
#pragma implementation // gcc: Class implementation
#endif
#include "mariadb.h" #include "mariadb.h"
#include "sql_priv.h" #include "sql_priv.h"
/* /*

View File

@@ -19,10 +19,6 @@
/* subselect Item */ /* subselect Item */
#include "item.h" #include "item.h"
#ifdef USE_PRAGMA_INTERFACE
#pragma interface /* gcc class implementation */
#endif
#include <queues.h> #include <queues.h>
class st_select_lex; class st_select_lex;

View File

@@ -22,10 +22,6 @@
Sum functions (COUNT, MIN...) Sum functions (COUNT, MIN...)
*/ */
#ifdef USE_PRAGMA_IMPLEMENTATION
#pragma implementation // gcc: Class implementation
#endif
#include "mariadb.h" #include "mariadb.h"
#include "sql_priv.h" #include "sql_priv.h"
#include "sql_select.h" #include "sql_select.h"

View File

@@ -19,10 +19,6 @@
/* classes for sum functions */ /* classes for sum functions */
#ifdef USE_PRAGMA_INTERFACE
#pragma interface /* gcc class implementation */
#endif
#include <my_tree.h> #include <my_tree.h>
#include "sql_udf.h" /* udf_handler */ #include "sql_udf.h" /* udf_handler */

View File

@@ -26,10 +26,6 @@
Move month and days to language files Move month and days to language files
*/ */
#ifdef USE_PRAGMA_IMPLEMENTATION
#pragma implementation // gcc: Class implementation
#endif
#include "mariadb.h" #include "mariadb.h"
#include "sql_priv.h" #include "sql_priv.h"
/* /*

View File

@@ -19,10 +19,6 @@
/* Function items used by mysql */ /* Function items used by mysql */
#ifdef USE_PRAGMA_INTERFACE
#pragma interface /* gcc class implementation */
#endif
class MY_LOCALE; class MY_LOCALE;

View File

@@ -18,10 +18,6 @@
/* System Versioning items */ /* System Versioning items */
#ifdef USE_PRAGMA_INTERFACE
#pragma interface /* gcc class implementation */
#endif
class Item_func_history: public Item_bool_func class Item_func_history: public Item_bool_func
{ {
public: public:

View File

@@ -23,8 +23,6 @@
#include "lex_symbol.h" #include "lex_symbol.h"
SYM_GROUP sym_group_common= {"", ""}; 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 */ /* We don't want to include sql_yacc.h into gen_lex_hash */
#ifdef NO_YACC_SYMBOLS #ifdef NO_YACC_SYMBOLS

View File

@@ -42,7 +42,5 @@ typedef struct st_sym_group {
} SYM_GROUP; } SYM_GROUP;
extern SYM_GROUP sym_group_common; extern SYM_GROUP sym_group_common;
extern SYM_GROUP sym_group_geom;
extern SYM_GROUP sym_group_rtree;
#endif /* _lex_symbol_h */ #endif /* _lex_symbol_h */

View File

@@ -1637,7 +1637,7 @@ Query_log_event::Query_log_event(const uchar *buf, uint event_len,
sql_parse.cc 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, if (!(start= data_buf= (Log_event::Byte*) my_malloc(PSI_INSTRUMENT_ME,
catalog_len + 1 catalog_len + 1
+ time_zone_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 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. 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; size_t db_length= (size_t)db_len;
memcpy(start + data_len + 1, &db_length, sizeof(size_t)); memcpy(start + data_len + 1, &db_length, sizeof(size_t));
#endif #endif

View File

@@ -29,10 +29,6 @@
#ifndef _log_event_h #ifndef _log_event_h
#define _log_event_h #define _log_event_h
#if defined(USE_PRAGMA_INTERFACE) && defined(MYSQL_SERVER)
#pragma interface /* gcc class implementation */
#endif
#include <my_bitmap.h> #include <my_bitmap.h>
#include "rpl_constants.h" #include "rpl_constants.h"
#include <vector> #include <vector>

View File

@@ -1501,11 +1501,8 @@ const char *libwrapName= NULL;
int allow_severity = LOG_INFO; int allow_severity = LOG_INFO;
int deny_severity = LOG_WARNING; int deny_severity = LOG_WARNING;
#endif #endif
#ifdef HAVE_QUERY_CACHE
ulong query_cache_min_res_unit= QUERY_CACHE_MIN_RESULT_DATA_SIZE; ulong query_cache_min_res_unit= QUERY_CACHE_MIN_RESULT_DATA_SIZE;
Query_cache query_cache; Query_cache query_cache;
#endif
my_bool opt_use_ssl = 1; my_bool opt_use_ssl = 1;
char *opt_ssl_ca= NULL, *opt_ssl_capath= NULL, *opt_ssl_cert= NULL, 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), 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}, {"Rpl_semi_sync_slave_send_ack", (char*) &rpl_semi_sync_slave_send_ack, SHOW_LONGLONG},
#endif /* HAVE_REPLICATION */ #endif /* HAVE_REPLICATION */
#ifdef HAVE_QUERY_CACHE
{"Qcache_free_blocks", (char*) &query_cache.free_memory_blocks, SHOW_LONG_NOFLUSH}, {"Qcache_free_blocks", (char*) &query_cache.free_memory_blocks, SHOW_LONG_NOFLUSH},
{"Qcache_free_memory", (char*) &query_cache.free_memory, SHOW_LONG_NOFLUSH}, {"Qcache_free_memory", (char*) &query_cache.free_memory, SHOW_LONG_NOFLUSH},
{"Qcache_hits", (char*) &query_cache.hits, SHOW_LONG}, {"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_not_cached", (char*) &query_cache.refused, SHOW_LONG},
{"Qcache_queries_in_cache", (char*) &query_cache.queries_in_cache, SHOW_LONG_NOFLUSH}, {"Qcache_queries_in_cache", (char*) &query_cache.queries_in_cache, SHOW_LONG_NOFLUSH},
{"Qcache_total_blocks", (char*) &query_cache.total_blocks, 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}, {"Queries", (char*) &show_queries, SHOW_SIMPLE_FUNC},
{"Questions", (char*) offsetof(STATUS_VAR, questions), SHOW_LONG_STATUS}, {"Questions", (char*) offsetof(STATUS_VAR, questions), SHOW_LONG_STATUS},
#ifdef HAVE_REPLICATION #ifdef HAVE_REPLICATION
@@ -8096,21 +8091,9 @@ static int mysql_init_variables(void)
#else #else
have_dlopen=SHOW_OPTION_NO; have_dlopen=SHOW_OPTION_NO;
#endif #endif
#ifdef HAVE_QUERY_CACHE
have_query_cache=SHOW_OPTION_YES; have_query_cache=SHOW_OPTION_YES;
#else
have_query_cache=SHOW_OPTION_NO;
#endif
#ifdef HAVE_SPATIAL
have_geometry=SHOW_OPTION_YES; have_geometry=SHOW_OPTION_YES;
#else
have_geometry=SHOW_OPTION_NO;
#endif
#ifdef HAVE_RTREE_KEYS
have_rtree_keys=SHOW_OPTION_YES; have_rtree_keys=SHOW_OPTION_YES;
#else
have_rtree_keys=SHOW_OPTION_NO;
#endif
#ifdef HAVE_CRYPT #ifdef HAVE_CRYPT
have_crypt=SHOW_OPTION_YES; have_crypt=SHOW_OPTION_YES;
#else #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); SYSVAR_AUTOSIZE(delay_key_write_options, (uint) DELAY_KEY_WRITE_NONE);
myisam_recover_options= HA_RECOVER_DEFAULT; myisam_recover_options= HA_RECOVER_DEFAULT;
ha_open_options&= ~(HA_OPEN_DELAY_KEY_WRITE); ha_open_options&= ~(HA_OPEN_DELAY_KEY_WRITE);
#ifdef HAVE_QUERY_CACHE
SYSVAR_AUTOSIZE(query_cache_size, 0); SYSVAR_AUTOSIZE(query_cache_size, 0);
#endif
break; break;
case (int) OPT_SKIP_HOST_CACHE: case (int) OPT_SKIP_HOST_CACHE:
opt_specialflag|= SPECIAL_NO_HOST_CACHE; opt_specialflag|= SPECIAL_NO_HOST_CACHE;

View File

@@ -104,11 +104,9 @@ static void inline MYSQL_SERVER_my_error(...) {}
*/ */
extern ulonglong test_flags; extern ulonglong test_flags;
extern ulong bytes_sent, bytes_received, net_big_packet_count; extern ulong bytes_sent, bytes_received, net_big_packet_count;
#ifdef HAVE_QUERY_CACHE
#define USE_QUERY_CACHE #define USE_QUERY_CACHE
extern void query_cache_insert(void *thd, const char *packet, size_t length, extern void query_cache_insert(void *thd, const char *packet, size_t length,
unsigned pkt_nr); unsigned pkt_nr);
#endif // HAVE_QUERY_CACHE
#define update_statistics(A) A #define update_statistics(A) A
extern my_bool thd_net_is_killed(THD *thd); extern my_bool thd_net_is_killed(THD *thd);
/* Additional instrumentation hooks for the server */ /* Additional instrumentation hooks for the server */

View File

@@ -104,10 +104,6 @@
subject and may omit some details. subject and may omit some details.
*/ */
#ifdef USE_PRAGMA_IMPLEMENTATION
#pragma implementation // gcc: Class implementation
#endif
#include "mariadb.h" #include "mariadb.h"
#include "sql_priv.h" #include "sql_priv.h"
#include "key.h" // is_key_used, key_copy, key_cmp, key_restore #include "key.h" // is_key_used, key_copy, key_cmp, key_restore

View File

@@ -20,10 +20,6 @@
#ifndef _opt_range_h #ifndef _opt_range_h
#define _opt_range_h #define _opt_range_h
#ifdef USE_PRAGMA_INTERFACE
#pragma interface /* gcc class implementation */
#endif
#include "records.h" /* READ_RECORD */ #include "records.h" /* READ_RECORD */
#include "queues.h" /* QUEUE */ #include "queues.h" /* QUEUE */
#include "filesort.h" /* SORT_INFO */ #include "filesort.h" /* SORT_INFO */

View File

@@ -22,10 +22,6 @@
Rewrites that make non-sargable date[time] comparisons sargable. Rewrites that make non-sargable date[time] comparisons sargable.
*/ */
#ifdef USE_PRAGMA_IMPLEMENTATION
#pragma implementation // gcc: Class implementation
#endif
#include "mariadb.h" #include "mariadb.h"
#include "sql_priv.h" #include "sql_priv.h"
#include "my_json_writer.h" #include "my_json_writer.h"

View File

@@ -1,6 +1,17 @@
#ifdef USE_PRAGMA_IMPLEMENTATION /* Copyright (c) 2023, MariaDB plc
#pragma implementation // gcc: Class implementation
#endif 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 "mariadb.h"
#include "sql_priv.h" #include "sql_priv.h"

View File

@@ -22,10 +22,6 @@
*/ */
#ifdef USE_PRAGMA_IMPLEMENTATION
#pragma implementation // gcc: Class implementation
#endif
#include "mariadb.h" #include "mariadb.h"
#include "sql_base.h" #include "sql_base.h"
#include "sql_const.h" #include "sql_const.h"

View File

@@ -18,10 +18,6 @@
Semi-join subquery optimization code definitions 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); int check_and_do_in_subquery_rewrites(JOIN *join);
bool convert_join_subqueries_to_semijoins(JOIN *join); bool convert_join_subqueries_to_semijoins(JOIN *join);
int pull_out_semijoin_tables(JOIN *join); int pull_out_semijoin_tables(JOIN *join);

View File

@@ -24,10 +24,6 @@
@{ @{
*/ */
#ifdef USE_PRAGMA_IMPLEMENTATION
#pragma implementation // gcc: Class implementation
#endif
#include "mariadb.h" #include "mariadb.h"
#include "my_bit.h" #include "my_bit.h"
#include "sql_select.h" #include "sql_select.h"

View File

@@ -16,10 +16,6 @@
/* Some general useful functions */ /* Some general useful functions */
#ifdef USE_PRAGMA_IMPLEMENTATION
#pragma implementation
#endif
#include "mariadb.h" #include "mariadb.h"
#include <my_global.h> #include <my_global.h>
#include <tztime.h> #include <tztime.h>

View File

@@ -16,10 +16,6 @@
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA */ 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 "sql_class.h"
#include "partition_element.h" #include "partition_element.h"
#include "sql_partition.h" #include "sql_partition.h"

View File

@@ -16,10 +16,6 @@
/* Procedures (functions with changes output of select) */ /* Procedures (functions with changes output of select) */
#ifdef USE_PRAGMA_IMPLEMENTATION
#pragma implementation // gcc: Class implementation
#endif
#include "mariadb.h" #include "mariadb.h"
#include "sql_priv.h" #include "sql_priv.h"
#include "procedure.h" #include "procedure.h"

View File

@@ -19,10 +19,6 @@
/* When using sql procedures */ /* 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 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 are dependencies on include order for set_var.h and item.h. This

View File

@@ -21,10 +21,6 @@
The actual communction is handled by the net_xxx functions in net_serv.cc 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 "mariadb.h"
#include "sql_priv.h" #include "sql_priv.h"
#include "protocol.h" #include "protocol.h"

View File

@@ -17,10 +17,6 @@
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA */ 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 "sql_error.h"
#include "my_decimal.h" /* my_decimal */ #include "my_decimal.h" /* my_decimal */
#include "sql_type.h" #include "sql_type.h"

View File

@@ -15,10 +15,6 @@
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA */ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA */
#ifdef USE_PRAGMA_INTERFACE
#pragma implementation /* gcc class implementation */
#endif
/** /**
@file @file

View File

@@ -15,10 +15,6 @@
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA */ 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" #include "table.h"
struct st_join_table; struct st_join_table;

View File

@@ -18,10 +18,6 @@
Implementation for the thread scheduler Implementation for the thread scheduler
*/ */
#ifdef USE_PRAGMA_INTERFACE
#pragma implementation
#endif
#include "mariadb.h" #include "mariadb.h"
#include "mysqld.h" #include "mysqld.h"
#include "scheduler.h" #include "scheduler.h"

View File

@@ -21,10 +21,6 @@
Classes for the thread scheduler Classes for the thread scheduler
*/ */
#ifdef USE_PRAGMA_INTERFACE
#pragma interface
#endif
class THD; class THD;
/* Functions used when manipulating threads */ /* Functions used when manipulating threads */

View File

@@ -21,10 +21,6 @@
"public" interface to sys_var - server configuration variables. "public" interface to sys_var - server configuration variables.
*/ */
#ifdef USE_PRAGMA_INTERFACE
#pragma interface /* gcc class implementation */
#endif
#include <my_getopt.h> #include <my_getopt.h>
class sys_var; class sys_var;

View File

@@ -16,9 +16,6 @@
#include "mariadb.h" #include "mariadb.h"
#include "sql_priv.h" #include "sql_priv.h"
#include "unireg.h" #include "unireg.h"
#ifdef USE_PRAGMA_IMPLEMENTATION
#pragma implementation
#endif
#include "sp_cache.h" #include "sp_cache.h"
#include "sp_head.h" #include "sp_head.h"

View File

@@ -17,10 +17,6 @@
#ifndef _SP_CACHE_H_ #ifndef _SP_CACHE_H_
#define _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: Stored procedures/functions cache. This is used as follows:
* Each thread has its own cache. * Each thread has its own cache.

View File

@@ -30,10 +30,6 @@
#include "sql_select.h" // Virtual_tmp_table #include "sql_select.h" // Virtual_tmp_table
#include "opt_trace.h" #include "opt_trace.h"
#include "my_json_writer.h" #include "my_json_writer.h"
#ifdef USE_PRAGMA_IMPLEMENTATION
#pragma implementation
#endif
#include "sp_instr.h" #include "sp_instr.h"
#include "sp_head.h" #include "sp_head.h"
#include "sp.h" #include "sp.h"

View File

@@ -19,10 +19,6 @@
#ifndef _SP_HEAD_H_ #ifndef _SP_HEAD_H_
#define _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 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 are dependencies on include order for set_var.h and item.h. This

View File

@@ -17,10 +17,6 @@
#include "mariadb.h" #include "mariadb.h"
#include "sql_priv.h" #include "sql_priv.h"
#include "unireg.h" #include "unireg.h"
#ifdef USE_PRAGMA_IMPLEMENTATION
#pragma implementation
#endif
#include "sp_pcontext.h" #include "sp_pcontext.h"
#include "sp_head.h" #include "sp_head.h"

View File

@@ -18,10 +18,6 @@
#ifndef _SP_PCONTEXT_H_ #ifndef _SP_PCONTEXT_H_
#define _SP_PCONTEXT_H_ #define _SP_PCONTEXT_H_
#ifdef USE_PRAGMA_INTERFACE
#pragma interface /* gcc class implementation */
#endif
#include "sql_string.h" // LEX_STRING #include "sql_string.h" // LEX_STRING
#include "field.h" // Create_field #include "field.h" // Create_field
#include "sql_array.h" // Dynamic_array #include "sql_array.h" // Dynamic_array

View File

@@ -16,10 +16,6 @@
#include "mariadb.h" #include "mariadb.h"
#include "sql_priv.h" #include "sql_priv.h"
#include "unireg.h" #include "unireg.h"
#ifdef USE_PRAGMA_IMPLEMENTATION
#pragma implementation
#endif
#include "mysql.h" #include "mysql.h"
#include "sp_head.h" #include "sp_head.h"
#include "sql_cursor.h" #include "sql_cursor.h"

View File

@@ -17,10 +17,6 @@
#ifndef _SP_RCONTEXT_H_ #ifndef _SP_RCONTEXT_H_
#define _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 "sql_class.h" // select_result_interceptor
#include "sp_pcontext.h" // sp_condition_value #include "sp_pcontext.h" // sp_condition_value

View File

@@ -25,8 +25,6 @@
double my_double_round(double value, longlong dec, bool dec_unsigned, double my_double_round(double value, longlong dec, bool dec_unsigned,
bool truncate); bool truncate);
#ifdef HAVE_SPATIAL
/* /*
exponential notation : exponential notation :
1 sign 1 sign
@@ -3800,5 +3798,3 @@ const Geometry::Class_info *Gis_geometry_collection::get_class_info() const
{ {
return &geometrycollection_class; return &geometrycollection_class;
} }
#endif /*HAVE_SPATIAL*/

View File

@@ -15,15 +15,13 @@
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA */ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA */
#ifndef _spatial_h #ifndef SPATIAL_INCLUDED
#define _spatial_h #define SPATIAL_INCLUDED
#include "sql_string.h" /* String, LEX_STRING */ #include "sql_string.h" /* String, LEX_STRING */
#include <my_compiler.h> #include <my_compiler.h>
#include <json_lib.h> #include <json_lib.h>
#ifdef HAVE_SPATIAL
class Gis_read_stream; class Gis_read_stream;
#include "gcalc_tools.h" #include "gcalc_tools.h"
@@ -651,5 +649,4 @@ public:
struct Geometry_buffer : public struct Geometry_buffer : public
my_aligned_storage<sizeof(Gis_point), MY_ALIGNOF(Gis_point)> {}; my_aligned_storage<sizeof(Gis_point), MY_ALIGNOF(Gis_point)> {};
#endif /*HAVE_SPATIAL*/ #endif /* SPATIAL_INCLUDED */
#endif

View File

@@ -23,10 +23,6 @@
** - type set is out of optimization yet ** - type set is out of optimization yet
*/ */
#ifdef USE_PRAGMA_IMPLEMENTATION
#pragma implementation // gcc: Class implementation
#endif
#define MYSQL_LEX 1 #define MYSQL_LEX 1
#include "mariadb.h" #include "mariadb.h"

View File

@@ -19,10 +19,6 @@
/* Analyse database */ /* Analyse database */
#ifdef USE_PRAGMA_INTERFACE
#pragma interface /* gcc class implementation */
#endif
#include "procedure.h" /* Procedure */ #include "procedure.h" /* Procedure */
#define my_thd_charset default_charset_info #define my_thd_charset default_charset_info

View File

@@ -14,10 +14,6 @@
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA */ 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 "mariadb.h"
#include "sql_priv.h" #include "sql_priv.h"
#include "sql_select.h" #include "sql_select.h"

View File

@@ -338,7 +338,6 @@ TODO list:
#include "sql_base.h" // TMP_TABLE_KEY_EXTRA #include "sql_base.h" // TMP_TABLE_KEY_EXTRA
#include "debug_sync.h" // DEBUG_SYNC #include "debug_sync.h" // DEBUG_SYNC
#include "sql_table.h" #include "sql_table.h"
#ifdef HAVE_QUERY_CACHE
#include <m_ctype.h> #include <m_ctype.h>
#include <my_dir.h> #include <my_dir.h>
#include <hash.h> #include <hash.h>
@@ -5320,6 +5319,3 @@ err2:
} }
#endif /* DBUG_OFF */ #endif /* DBUG_OFF */
#endif /*HAVE_QUERY_CACHE*/

View File

@@ -13,8 +13,8 @@
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA */ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA */
#ifndef _SQL_CACHE_H #ifndef SQL_CACHE_INCLUDED
#define _SQL_CACHE_H #define SQL_CACHE_INCLUDED
#include "hash.h" #include "hash.h"
#include "my_base.h" /* ha_rows */ #include "my_base.h" /* ha_rows */
@@ -543,7 +543,6 @@ protected:
void disable_query_cache(THD *thd); void disable_query_cache(THD *thd);
}; };
#ifdef HAVE_QUERY_CACHE
struct Query_cache_query_flags struct Query_cache_query_flags
{ {
unsigned int client_long_flag:1; 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) (T->variables.query_cache_type == 0 || query_cache.query_cache_size == 0)
#define query_cache_is_cacheable_query(L) \ #define query_cache_is_cacheable_query(L) \
(((L)->sql_command == SQLCOM_SELECT) && (L)->safe_to_cache_query) (((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; extern MYSQL_PLUGIN_IMPORT Query_cache query_cache;
#endif #endif

View File

@@ -24,10 +24,6 @@
** **
*****************************************************************************/ *****************************************************************************/
#ifdef USE_PRAGMA_IMPLEMENTATION
#pragma implementation // gcc: Class implementation
#endif
#include "mariadb.h" #include "mariadb.h"
#include "sql_priv.h" #include "sql_priv.h"
#include "sql_class.h" #include "sql_class.h"

View File

@@ -3006,9 +3006,7 @@ public:
*/ */
struct st_mysql_stmt *current_stmt; struct st_mysql_stmt *current_stmt;
#endif #endif
#ifdef HAVE_QUERY_CACHE
Query_cache_tls query_cache_tls; Query_cache_tls query_cache_tls;
#endif
NET net; // client connection descriptor NET net; // client connection descriptor
/** Aditional network instrumentation for the server only. */ /** Aditional network instrumentation for the server only. */
NET_SERVER m_net_server_extension; NET_SERVER m_net_server_extension;

View File

@@ -22,10 +22,6 @@
needs something like 'ssh'. needs something like 'ssh'.
*/ */
#ifdef USE_PRAGMA_IMPLEMENTATION
#pragma implementation // gcc: Class implementation
#endif
#include "mariadb.h" #include "mariadb.h"
#include "sql_priv.h" #include "sql_priv.h"
#include "sql_crypt.h" #include "sql_crypt.h"

View File

@@ -16,11 +16,6 @@
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA */ 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 "sql_alloc.h" /* Sql_alloc */
#include "my_rnd.h" /* rand_struct */ #include "my_rnd.h" /* rand_struct */

View File

@@ -13,9 +13,6 @@
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA */ 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 "mariadb.h"
#include "sql_priv.h" #include "sql_priv.h"

View File

@@ -16,10 +16,6 @@
#ifndef _sql_cursor_h_ #ifndef _sql_cursor_h_
#define _sql_cursor_h_ #define _sql_cursor_h_
#ifdef USE_PRAGMA_INTERFACE
#pragma interface /* gcc class interface */
#endif
#include "sql_class.h" /* Query_arena */ #include "sql_class.h" /* Query_arena */
class JOIN; class JOIN;

View File

@@ -14,10 +14,6 @@
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA */ 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 "mariadb.h"
#include "sql_priv.h" #include "sql_priv.h"
#include "sql_select.h" #include "sql_select.h"

View File

@@ -62,10 +62,6 @@
#include "sql_select.h" #include "sql_select.h"
#include "transaction.h" #include "transaction.h"
#ifdef USE_PRAGMA_IMPLEMENTATION
#pragma implementation // gcc: Class implementation
#endif
#define HANDLER_TABLES_HASH_SIZE 120 #define HANDLER_TABLES_HASH_SIZE 120
static enum enum_ha_read_modes rkey_to_rnext[]= static enum enum_ha_read_modes rkey_to_rnext[]=

View File

@@ -16,10 +16,6 @@
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA */ 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 "sql_class.h" /* enum_ha_read_mode */
#include "my_base.h" /* ha_rkey_function, ha_rows */ #include "my_base.h" /* ha_rkey_function, ha_rows */
#include "sql_list.h" /* List */ #include "sql_list.h" /* List */

View File

@@ -23,10 +23,6 @@
@{ @{
*/ */
#ifdef USE_PRAGMA_IMPLEMENTATION
#pragma implementation // gcc: Class implementation
#endif
#include "mariadb.h" #include "mariadb.h"
#include "key.h" #include "key.h"
#include "sql_base.h" #include "sql_base.h"

View File

@@ -13,11 +13,6 @@
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA */ 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 "mariadb.h"
#include "sql_list.h" #include "sql_list.h"

View File

@@ -16,10 +16,6 @@
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA */ 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 "sql_alloc.h"
#include <iterator> #include <iterator>

View File

@@ -16,10 +16,6 @@
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA */ 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" #include "sql_basic_types.h"
/* /*

View File

@@ -5300,9 +5300,7 @@ mysql_execute_command(THD *thd, bool is_called_from_prepared_stmt)
REFRESH_GENERAL_LOG | REFRESH_GENERAL_LOG |
REFRESH_ENGINE_LOG | REFRESH_ENGINE_LOG |
REFRESH_ERROR_LOG | REFRESH_ERROR_LOG |
#ifdef HAVE_QUERY_CACHE
REFRESH_QUERY_CACHE_FREE | REFRESH_QUERY_CACHE_FREE |
#endif /* HAVE_QUERY_CACHE */
REFRESH_STATUS | REFRESH_STATUS |
REFRESH_SESSION_STATUS | REFRESH_SESSION_STATUS |
REFRESH_GLOBAL_STATUS | REFRESH_GLOBAL_STATUS |

View File

@@ -17,10 +17,6 @@
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA */ 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 "sql_list.h" /* List */
#include "table.h" /* TABLE_LIST */ #include "table.h" /* TABLE_LIST */

View File

@@ -225,7 +225,6 @@ bool reload_acl_and_cache(THD *thd, unsigned long long options,
} }
#endif #endif
} }
#ifdef HAVE_QUERY_CACHE
if (options & REFRESH_QUERY_CACHE_FREE) if (options & REFRESH_QUERY_CACHE_FREE)
{ {
query_cache.pack(thd); // FLUSH QUERY CACHE 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 query_cache.flush(); // RESET QUERY CACHE
} }
#endif /*HAVE_QUERY_CACHE*/
DBUG_ASSERT(!thd || thd->locked_tables_mode || DBUG_ASSERT(!thd || thd->locked_tables_mode ||
!thd->mdl_context.has_locks() || !thd->mdl_context.has_locks() ||

View File

@@ -25,10 +25,6 @@
@{ @{
*/ */
#ifdef USE_PRAGMA_IMPLEMENTATION
#pragma implementation // gcc: Class implementation
#endif
#include "mariadb.h" #include "mariadb.h"
#include "sql_priv.h" #include "sql_priv.h"
#include "unireg.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->first_successful_insert_id_in_prev_stmt > 0 &&
thd->substitute_null_with_insert_id)) thd->substitute_null_with_insert_id))
{ {
#ifdef HAVE_QUERY_CACHE
query_cache_abort(thd, &thd->query_cache_tls); query_cache_abort(thd, &thd->query_cache_tls);
#endif
COND *new_cond, *cond= this; COND *new_cond, *cond= this;
/* If this fails, we will catch it later before executing query */ /* If this fails, we will catch it later before executing query */
if ((new_cond= new (thd->mem_root) Item_func_eq(thd, args[0], if ((new_cond= new (thd->mem_root) Item_func_eq(thd, args[0],

View File

@@ -24,10 +24,6 @@
classes to use when handling where clause classes to use when handling where clause
*/ */
#ifdef USE_PRAGMA_INTERFACE
#pragma interface /* gcc class implementation */
#endif
#include "procedure.h" #include "procedure.h"
#include "sql_array.h" /* Array */ #include "sql_array.h" /* Array */
#include "records.h" /* READ_RECORD */ #include "records.h" /* READ_RECORD */

View File

@@ -16,10 +16,6 @@
/* This file is originally from the mysql distribution. Coded by monty */ /* 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 "mariadb.h"
#include <m_string.h> #include <m_string.h>
#include <m_ctype.h> #include <m_ctype.h>

View File

@@ -20,10 +20,6 @@
/* This file is originally from the mysql distribution. Coded by monty */ /* 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 "m_ctype.h" /* my_charset_bin */
#include <my_sys.h> /* alloc_root, my_free, my_realloc */ #include <my_sys.h> /* alloc_root, my_free, my_realloc */
#include "m_string.h" /* TRASH */ #include "m_string.h" /* TRASH */

View File

@@ -3171,14 +3171,8 @@ mysql_prepare_create_table_finalize(THD *thd, HA_CREATE_INFO *create_info,
key_info->parser_name= 0; key_info->parser_name= 0;
break; break;
case Key::SPATIAL: case Key::SPATIAL:
#ifdef HAVE_SPATIAL
key_info->flags= HA_SPATIAL; key_info->flags= HA_SPATIAL;
break; 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: case Key::FOREIGN_KEY:
key_number--; // Skip this key key_number--; // Skip this key
continue; 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) else if (key_info->algorithm == HA_KEY_ALG_RTREE)
{ {
#ifdef HAVE_RTREE_KEYS
if ((key_info->user_defined_key_parts & 1) == 1) if ((key_info->user_defined_key_parts & 1) == 1)
{ {
my_error(ER_WRONG_ARGUMENTS, MYF(0), "RTREE INDEX"); 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 */ /* TODO: To be deleted */
my_error(ER_NOT_SUPPORTED_YET, MYF(0), "RTREE INDEX"); my_error(ER_NOT_SUPPORTED_YET, MYF(0), "RTREE INDEX");
DBUG_RETURN(TRUE); 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 */ /* Take block size from key part or table part */

View File

@@ -260,10 +260,7 @@ const Type_collection *Type_handler_row::type_collection() const
bool Type_handler_data::init() bool Type_handler_data::init()
{ {
#ifdef HAVE_SPATIAL
return type_collection_geometry.init(this); 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; return ph;
} }
#ifdef HAVE_SPATIAL
const Type_handler *ha= Type_collection_geometry_handler_by_name(name); const Type_handler *ha= Type_collection_geometry_handler_by_name(name);
if (ha) return ha;
return ha;
#endif
return NULL;
} }
@@ -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_STRING: return &type_handler_string;
case MYSQL_TYPE_ENUM: return &type_handler_varchar; // Map to VARCHAR 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_SET: return &type_handler_varchar; // Map to VARCHAR
case MYSQL_TYPE_GEOMETRY: case MYSQL_TYPE_GEOMETRY: return &type_handler_geometry;
#ifdef HAVE_SPATIAL
return &type_handler_geometry;
#else
return NULL;
#endif
case MYSQL_TYPE_TIMESTAMP: return &type_handler_timestamp2;// Map to timestamp2 case MYSQL_TYPE_TIMESTAMP: return &type_handler_timestamp2;// Map to timestamp2
case MYSQL_TYPE_TIMESTAMP2: return &type_handler_timestamp2; case MYSQL_TYPE_TIMESTAMP2: return &type_handler_timestamp2;
case MYSQL_TYPE_DATE: return &type_handler_newdate; // Map to newdate 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_STRING: return &type_handler_string;
case MYSQL_TYPE_ENUM: return &type_handler_enum; case MYSQL_TYPE_ENUM: return &type_handler_enum;
case MYSQL_TYPE_SET: return &type_handler_set; case MYSQL_TYPE_SET: return &type_handler_set;
case MYSQL_TYPE_GEOMETRY: case MYSQL_TYPE_GEOMETRY: return &type_handler_geometry;
#ifdef HAVE_SPATIAL
return &type_handler_geometry;
#else
return NULL;
#endif
case MYSQL_TYPE_TIMESTAMP: return &type_handler_timestamp; case MYSQL_TYPE_TIMESTAMP: return &type_handler_timestamp;
case MYSQL_TYPE_TIMESTAMP2: return &type_handler_timestamp2; case MYSQL_TYPE_TIMESTAMP2: return &type_handler_timestamp2;
case MYSQL_TYPE_DATE: return &type_handler_date; case MYSQL_TYPE_DATE: return &type_handler_date;

View File

@@ -17,11 +17,6 @@
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA */ 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 "mysqld.h"
#include "lex_string.h" #include "lex_string.h"
#include "sql_type_timeofday.h" #include "sql_type_timeofday.h"

View File

@@ -16,8 +16,6 @@
#include "mariadb.h" #include "mariadb.h"
#ifdef HAVE_SPATIAL
#include "sql_class.h" #include "sql_class.h"
#include "sql_type_geom.h" #include "sql_type_geom.h"
#include "item_geofunc.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, return Binlog_type_info(Field_geom::type(), pack_length_no_ptr(), 1,
field_charset(), type_handler_geom()->geometry_type()); field_charset(), type_handler_geom()->geometry_type());
} }
#endif // HAVE_SPATIAL

View File

@@ -17,14 +17,9 @@
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA */ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA */
#ifdef USE_PRAGMA_IMPLEMENTATION
#pragma implementation // gcc: Class implementation
#endif
#include "mariadb.h" #include "mariadb.h"
#include "sql_type.h" #include "sql_type.h"
class Type_geom_attributes class Type_geom_attributes
{ {
protected: protected:
@@ -58,7 +53,6 @@ public:
}; };
#ifdef HAVE_SPATIAL
class Type_handler_geometry: public Type_handler_string_result class Type_handler_geometry: public Type_handler_string_result
{ {
public: public:
@@ -476,6 +470,4 @@ public:
Binlog_type_info binlog_type_info() const override; Binlog_type_info binlog_type_info() const override;
}; };
#endif // HAVE_SPATIAL
#endif // SQL_TYPE_GEOM_H_INCLUDED #endif // SQL_TYPE_GEOM_H_INCLUDED

View File

@@ -27,10 +27,6 @@
dynamic functions, so this shouldn't be a real problem. dynamic functions, so this shouldn't be a real problem.
*/ */
#ifdef USE_PRAGMA_IMPLEMENTATION
#pragma implementation // gcc: Class implementation
#endif
#include "mariadb.h" #include "mariadb.h"
#include "sql_priv.h" #include "sql_priv.h"
#include "unireg.h" #include "unireg.h"

View File

@@ -20,10 +20,6 @@
/* This file defines structures needed by udf functions */ /* This file defines structures needed by udf functions */
#ifdef USE_PRAGMA_INTERFACE
#pragma interface
#endif
enum Item_udftype {UDFTYPE_FUNCTION=1,UDFTYPE_AGGREGATE}; enum Item_udftype {UDFTYPE_FUNCTION=1,UDFTYPE_AGGREGATE};
typedef void (*Udf_func_clear)(UDF_INIT *, uchar *, uchar *); typedef void (*Udf_func_clear)(UDF_INIT *, uchar *, uchar *);

View File

@@ -7096,12 +7096,7 @@ fulltext:
spatial: spatial:
SPATIAL_SYM SPATIAL_SYM
{ {
#ifdef HAVE_SPATIAL
$$= Key::SPATIAL; $$= Key::SPATIAL;
#else
my_yyabort_error((ER_FEATURE_DISABLED, MYF(0), sym_group_geom.name,
sym_group_geom.needed_define));
#endif
} }
; ;

View File

@@ -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) static bool query_cache_flush(sys_var *self, THD *thd, enum_var_type type)
{ {
#ifdef HAVE_QUERY_CACHE
query_cache.flush(); query_cache.flush();
#endif /* HAVE_QUERY_CACHE */
return false; return false;
} }
/// @todo make SESSION_VAR (usability enhancement and a fix for a race condition) /// @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) DEFAULT(DEFAULT_THREAD_HANDLING)
); );
#ifdef HAVE_QUERY_CACHE
static bool fix_query_cache_size(sys_var *self, THD *thd, enum_var_type type) 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); 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", "Invalidate queries in query cache on LOCK for write",
SESSION_VAR(query_cache_wlock_invalidate), CMD_LINE(OPT_ARG), SESSION_VAR(query_cache_wlock_invalidate), CMD_LINE(OPT_ARG),
DEFAULT(FALSE)); DEFAULT(FALSE));
#endif /* HAVE_QUERY_CACHE */
static Sys_var_on_access_global<Sys_var_mybool, static Sys_var_on_access_global<Sys_var_mybool,
PRIV_SET_SYSTEM_GLOBAL_VAR_SECURE_AUTH> PRIV_SET_SYSTEM_GLOBAL_VAR_SECURE_AUTH>

Some files were not shown because too many files have changed in this diff Show More