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_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_<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 }
/* 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)

View file

@ -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)

View file

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

View file

@ -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"

View file

@ -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)

View file

@ -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"

View file

@ -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 */

View file

@ -19,8 +19,6 @@
#include <my_sys.h>
#include <m_string.h>
#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 */

View file

@ -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*/

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;
if (all)
{
#ifdef HAVE_QUERY_CACHE
if (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 */
#ifdef USE_PRAGMA_INTERFACE
#pragma interface /* gcc class implementation */
#endif
#include "sql_const.h"
#include "sql_basic_types.h"
#include "mysqld.h" /* server_id */

View file

@ -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"

View file

@ -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 */

View file

@ -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 <mysql.h>

View file

@ -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 */

View file

@ -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 <m_ctype.h>

View file

@ -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"

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;
#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(),

View file

@ -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"
/*

View file

@ -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 */
{

View file

@ -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 <m_ctype.h>
#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*/

View file

@ -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 */

View file

@ -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"

View file

@ -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

View file

@ -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"
/*

View file

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

View file

@ -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"

View file

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

View file

@ -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"
/*

View file

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

View file

@ -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:

View file

@ -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

View file

@ -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 */

View file

@ -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

View file

@ -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 <my_bitmap.h>
#include "rpl_constants.h"
#include <vector>

View file

@ -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;

View file

@ -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 */

View file

@ -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

View file

@ -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 */

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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);

View file

@ -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"

View file

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

View file

@ -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"

View file

@ -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"

View file

@ -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

View file

@ -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"

View file

@ -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"

View file

@ -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

View file

@ -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;

View file

@ -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"

View file

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

View file

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

View file

@ -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"

View file

@ -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.

View file

@ -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"

View file

@ -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

View file

@ -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"

View file

@ -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

View file

@ -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"

View file

@ -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

View file

@ -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*/

View file

@ -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 <my_compiler.h>
#include <json_lib.h>
#ifdef HAVE_SPATIAL
class Gis_read_stream;
#include "gcalc_tools.h"
@ -651,5 +649,4 @@ public:
struct Geometry_buffer : public
my_aligned_storage<sizeof(Gis_point), MY_ALIGNOF(Gis_point)> {};
#endif /*HAVE_SPATIAL*/
#endif
#endif /* SPATIAL_INCLUDED */

View file

@ -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"

View file

@ -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

View file

@ -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"

View file

@ -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 <m_ctype.h>
#include <my_dir.h>
#include <hash.h>
@ -5320,6 +5319,3 @@ err2:
}
#endif /* DBUG_OFF */
#endif /*HAVE_QUERY_CACHE*/

View file

@ -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

View file

@ -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"

View file

@ -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;

View file

@ -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"

View file

@ -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 */

View file

@ -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"

View file

@ -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;

View file

@ -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"

View file

@ -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[]=

View file

@ -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 */

View file

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

View file

@ -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"

View file

@ -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 <iterator>

View file

@ -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"
/*

View file

@ -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 |

View file

@ -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 */

View file

@ -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() ||

View file

@ -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],

View file

@ -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 */

View file

@ -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 <m_string.h>
#include <m_ctype.h>

View file

@ -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 <my_sys.h> /* alloc_root, my_free, my_realloc */
#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;
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 */

View file

@ -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;
}
@ -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;

View file

@ -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"

View file

@ -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

View file

@ -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

View file

@ -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"

View file

@ -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 *);

View file

@ -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
}
;

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)
{
#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<Sys_var_mybool,
PRIV_SET_SYSTEM_GLOBAL_VAR_SECURE_AUTH>

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