mirror of
https://github.com/MariaDB/server.git
synced 2025-01-17 20:42:30 +01:00
Merge neptunus.(none):/home/msvensson/mysql/bug9714
into neptunus.(none):/home/msvensson/mysql/mysql-5.0
This commit is contained in:
commit
2627475a86
14 changed files with 103 additions and 63 deletions
38
configure.in
38
configure.in
|
@ -336,7 +336,7 @@ AC_SUBST(LD)
|
|||
AC_SUBST(INSTALL_SCRIPT)
|
||||
|
||||
export CC CXX CFLAGS LD LDFLAGS AR
|
||||
|
||||
echo "GXX: $GXX"
|
||||
if test "$GXX" = "yes"
|
||||
then
|
||||
# mysqld requires -fno-implicit-templates.
|
||||
|
@ -344,36 +344,16 @@ then
|
|||
# mysqld doesn't use run-time-type-checking, so we disable it.
|
||||
CXXFLAGS="$CXXFLAGS -fno-implicit-templates -fno-exceptions -fno-rtti"
|
||||
|
||||
# If you are using 'gcc' 3.0 (not g++) to compile C++ programs on Linux,
|
||||
# we will gets some problems when linking static programs.
|
||||
# The following code is used to fix this problem.
|
||||
|
||||
#CXX_VERNO=`echo $CXX_VERSION | sed -e 's/[[^0-9. ]]//g; s/^ *//g; s/ .*//g'`
|
||||
echo "CXX: $CXX"
|
||||
if echo $CXX | grep gcc > /dev/null 2>&1
|
||||
then
|
||||
GCC_VERSION=`gcc -v 2>&1 | grep version | sed -e 's/[[^0-9. ]]//g; s/^ *//g; s/ .*//g'`
|
||||
case $SYSTEM_TYPE in
|
||||
*freebsd*)
|
||||
# The libsupc++ library on freebsd with gcc 3.4.2 is dependent on
|
||||
# libstdc++, disable it since other solution works fine
|
||||
GCC_VERSION="NOSUPCPP_$GCC_VERSION"
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
echo "Using gcc version '$GCC_VERSION'"
|
||||
case "$GCC_VERSION" in
|
||||
3.4.*|3.5.*)
|
||||
# Statically link the language support function's found in libsupc++.a
|
||||
LIBS="$LIBS -lsupc++"
|
||||
echo "Using -libsupc++ for static linking with gcc"
|
||||
;;
|
||||
*)
|
||||
# Using -lsupc++ doesn't work in gcc 3.3 on SuSE 9.2
|
||||
# (causes link failures when linking things staticly)
|
||||
CXXFLAGS="$CXXFLAGS -DUSE_MYSYS_NEW -DDEFINE_CXA_PURE_VIRTUAL"
|
||||
echo "Using MYSYS_NEW for static linking with gcc"
|
||||
;;
|
||||
esac
|
||||
echo "Setting CXXFLAGS"
|
||||
# If you are using 'gcc' 3.0 (not g++) to compile C++ programs on Linux,
|
||||
# we will gets some problems when linking static programs.
|
||||
# The following code is used to fix this problem.
|
||||
CXXFLAGS="$CXXFLAGS -DUSE_MYSYS_NEW -DDEFINE_CXA_PURE_VIRTUAL"
|
||||
echo "Using MYSYS_NEW for static linking with gcc"
|
||||
fi
|
||||
fi
|
||||
|
||||
|
|
|
@ -431,11 +431,20 @@ int ha_archive::free_share(ARCHIVE_SHARE *share)
|
|||
}
|
||||
|
||||
|
||||
/*
|
||||
/*
|
||||
We just implement one additional file extension.
|
||||
*/
|
||||
static const char *ha_archive_exts[] = {
|
||||
ARZ,
|
||||
ARN,
|
||||
ARM,
|
||||
NullS
|
||||
};
|
||||
|
||||
const char **ha_archive::bas_ext() const
|
||||
{ static const char *ext[]= { ARZ, ARN, ARM, NullS }; return ext; }
|
||||
{
|
||||
return ha_archive_exts;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
|
|
|
@ -186,8 +186,14 @@ static int free_share(EXAMPLE_SHARE *share)
|
|||
exist for the storage engine. This is also used by the default rename_table and
|
||||
delete_table method in handler.cc.
|
||||
*/
|
||||
static const char *ha_example_exts[] = {
|
||||
NullS
|
||||
};
|
||||
|
||||
const char **ha_example::bas_ext() const
|
||||
{ static const char *ext[]= { NullS }; return ext; }
|
||||
{
|
||||
return ha_example_exts;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
|
|
|
@ -384,8 +384,15 @@ int ha_tina::find_current_row(byte *buf)
|
|||
If frm_error() is called in table.cc this is called to find out what file
|
||||
extensions exist for this handler.
|
||||
*/
|
||||
static const char *ha_tina_exts[] = {
|
||||
".CSV",
|
||||
NullS
|
||||
};
|
||||
|
||||
const char **ha_tina::bas_ext() const
|
||||
{ static const char *ext[]= { ".CSV", NullS }; return ext; }
|
||||
{
|
||||
return ha_tina_exts;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
|
|
|
@ -371,10 +371,15 @@ void berkeley_cleanup_log_files(void)
|
|||
/*****************************************************************************
|
||||
** Berkeley DB tables
|
||||
*****************************************************************************/
|
||||
static const char *ha_berkeley_exts[] = {
|
||||
ha_berkeley_ext,
|
||||
NullS
|
||||
};
|
||||
|
||||
const char **ha_berkeley::bas_ext() const
|
||||
{ static const char *ext[]= { ha_berkeley_ext, NullS }; return ext; }
|
||||
|
||||
{
|
||||
return ha_berkeley_exts;
|
||||
}
|
||||
|
||||
ulong ha_berkeley::index_flags(uint idx, uint part, bool all_parts) const
|
||||
{
|
||||
|
|
|
@ -25,10 +25,13 @@
|
|||
#include "ha_blackhole.h"
|
||||
|
||||
|
||||
static const char *ha_black_hole_exts[] = {
|
||||
NullS
|
||||
};
|
||||
|
||||
const char **ha_blackhole::bas_ext() const
|
||||
{
|
||||
static const char *ext[]= { NullS };
|
||||
return ext;
|
||||
{
|
||||
return ha_blackhole_exts;
|
||||
}
|
||||
|
||||
int ha_blackhole::open(const char *name, int mode, uint test_if_locked)
|
||||
|
|
|
@ -941,14 +941,13 @@ static int free_share(FEDERATED_SHARE *share)
|
|||
also used by the default rename_table and delete_table method
|
||||
in handler.cc.
|
||||
*/
|
||||
static const char *ha_federated_exts[] = {
|
||||
NullS
|
||||
};
|
||||
|
||||
const char **ha_federated::bas_ext() const
|
||||
{
|
||||
static const char *ext[]=
|
||||
{
|
||||
NullS
|
||||
};
|
||||
return ext;
|
||||
return ha_federated_exts;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -26,9 +26,14 @@
|
|||
/*****************************************************************************
|
||||
** HEAP tables
|
||||
*****************************************************************************/
|
||||
static const char *ha_heap_exts[] = {
|
||||
NullS
|
||||
};
|
||||
|
||||
const char **ha_heap::bas_ext() const
|
||||
{ static const char *ext[1]= { NullS }; return ext; }
|
||||
{
|
||||
return ha_heap_exts;
|
||||
}
|
||||
|
||||
/*
|
||||
Hash index statistics is updated (copied from HP_KEYDEF::hash_buckets to
|
||||
|
|
|
@ -2138,17 +2138,20 @@ ha_innobase::get_row_type() const
|
|||
|
||||
/********************************************************************
|
||||
Gives the file extension of an InnoDB single-table tablespace. */
|
||||
static const char* ha_innobase_exts[] = {
|
||||
".ibd",
|
||||
NullS
|
||||
};
|
||||
|
||||
const char**
|
||||
ha_innobase::bas_ext() const
|
||||
/*========================*/
|
||||
/* out: file extension string */
|
||||
{
|
||||
static const char* ext[] = {".ibd", NullS};
|
||||
|
||||
return(ext);
|
||||
return ha_innobase_exts;
|
||||
}
|
||||
|
||||
|
||||
/*********************************************************************
|
||||
Normalizes a table name string. A normalized name consists of the
|
||||
database name catenated to '/' and table name. An example:
|
||||
|
|
|
@ -123,8 +123,16 @@ void mi_check_print_warning(MI_CHECK *param, const char *fmt,...)
|
|||
|
||||
}
|
||||
|
||||
static const char *ha_myisam_exts[] = {
|
||||
".MYI",
|
||||
".MYD",
|
||||
NullS
|
||||
};
|
||||
|
||||
const char **ha_myisam::bas_ext() const
|
||||
{ static const char *ext[]= { ".MYI",".MYD", NullS }; return ext; }
|
||||
{
|
||||
return ha_myisam_exts;
|
||||
}
|
||||
|
||||
|
||||
const char *ha_myisam::index_type(uint key_number)
|
||||
|
|
|
@ -32,8 +32,16 @@
|
|||
** MyISAM MERGE tables
|
||||
*****************************************************************************/
|
||||
|
||||
static const char *ha_myisammrg_exts[] = {
|
||||
".MRG",
|
||||
NullS
|
||||
};
|
||||
|
||||
const char **ha_myisammrg::bas_ext() const
|
||||
{ static const char *ext[]= { ".MRG", NullS }; return ext; }
|
||||
{
|
||||
return ha_myisammrg_exts;
|
||||
}
|
||||
|
||||
|
||||
const char *ha_myisammrg::index_type(uint key_number)
|
||||
{
|
||||
|
|
|
@ -3074,10 +3074,15 @@ int ha_ndbcluster::extra_opt(enum ha_extra_function operation, ulong cache_size)
|
|||
DBUG_RETURN(extra(operation));
|
||||
}
|
||||
|
||||
static const char *ha_ndbcluster_exts[] = {
|
||||
ha_ndb_ext,
|
||||
NullS
|
||||
};
|
||||
|
||||
const char** ha_ndbcluster::bas_ext() const
|
||||
{ static const char *ext[]= { ha_ndb_ext, NullS }; return ext; }
|
||||
|
||||
{
|
||||
return ha_ndbcluster_exts;
|
||||
}
|
||||
|
||||
/*
|
||||
How many seeks it will take to read through the table
|
||||
|
|
12
sql/item.cc
12
sql/item.cc
|
@ -43,11 +43,11 @@ void Hybrid_type_traits::fix_length_and_dec(Item *item, Item *arg) const
|
|||
item->max_length= item->float_length(arg->decimals);
|
||||
}
|
||||
|
||||
static const Hybrid_type_traits real_traits_instance;
|
||||
|
||||
const Hybrid_type_traits *Hybrid_type_traits::instance()
|
||||
{
|
||||
static const Hybrid_type_traits real_traits;
|
||||
return &real_traits;
|
||||
return &real_traits_instance;
|
||||
}
|
||||
|
||||
|
||||
|
@ -67,11 +67,11 @@ Hybrid_type_traits::val_str(Hybrid_type *val, String *to, uint8 decimals) const
|
|||
}
|
||||
|
||||
/* Hybrid_type_traits_decimal */
|
||||
static const Hybrid_type_traits_decimal decimal_traits_instance;
|
||||
|
||||
const Hybrid_type_traits_decimal *Hybrid_type_traits_decimal::instance()
|
||||
{
|
||||
static const Hybrid_type_traits_decimal decimal_traits;
|
||||
return &decimal_traits;
|
||||
return &decimal_traits_instance;
|
||||
}
|
||||
|
||||
|
||||
|
@ -143,11 +143,11 @@ Hybrid_type_traits_decimal::val_str(Hybrid_type *val, String *to,
|
|||
}
|
||||
|
||||
/* Hybrid_type_traits_integer */
|
||||
static const Hybrid_type_traits_integer integer_traits_instance;
|
||||
|
||||
const Hybrid_type_traits_integer *Hybrid_type_traits_integer::instance()
|
||||
{
|
||||
static const Hybrid_type_traits_integer integer_traits;
|
||||
return &integer_traits;
|
||||
return &integer_traits_instance;
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -506,7 +506,6 @@ Item_sum_distinct::Item_sum_distinct(THD *thd, Item_sum_distinct *original)
|
|||
This is to speedup SUM/AVG(DISTINCT) evaluation for 8-32 bit integer
|
||||
values.
|
||||
*/
|
||||
|
||||
struct Hybrid_type_traits_fast_decimal: public
|
||||
Hybrid_type_traits_integer
|
||||
{
|
||||
|
@ -521,13 +520,16 @@ struct Hybrid_type_traits_fast_decimal: public
|
|||
val->traits= Hybrid_type_traits_decimal::instance();
|
||||
val->traits->div(val, u);
|
||||
}
|
||||
static const Hybrid_type_traits_fast_decimal *instance()
|
||||
{
|
||||
static const Hybrid_type_traits_fast_decimal fast_decimal_traits;
|
||||
return &fast_decimal_traits;
|
||||
}
|
||||
static const Hybrid_type_traits_fast_decimal *instance();
|
||||
};
|
||||
|
||||
static const Hybrid_type_traits_fast_decimal fast_decimal_traits_instance;
|
||||
|
||||
const Hybrid_type_traits_fast_decimal
|
||||
*Hybrid_type_traits_fast_decimal::instance()
|
||||
{
|
||||
return &fast_decimal_traits_instance;
|
||||
}
|
||||
|
||||
void Item_sum_distinct::fix_length_and_dec()
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue