mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
merge, CMake bugfixes, remove sp-error from experimental
This commit is contained in:
@ -7,8 +7,8 @@ cmake -P cmake/check_minimal_version.cmake >/dev/null 2>&1 || HAVE_CMAKE=no
|
||||
perl --version >/dev/null 2>&1 || HAVE_CMAKE=no
|
||||
if test "$HAVE_CMAKE" = "no"
|
||||
then
|
||||
sh ./configure.am $@
|
||||
sh ./configure.am "$@"
|
||||
else
|
||||
perl ./cmake/configure.pl $@
|
||||
perl ./cmake/configure.pl "$@"
|
||||
fi
|
||||
|
||||
|
@ -38,12 +38,55 @@ sub set_installdir
|
||||
}
|
||||
}
|
||||
|
||||
# CMake understands CC and CXX env.variables correctly, if they contain 1 or 2 tokens
|
||||
# e.g CXX=gcc and CXX="ccache gcc" are ok. However it could have a problem if there
|
||||
# (recognizing gcc) with more tokens ,e.g CXX="ccache gcc --pipe".
|
||||
# The problem is simply fixed by splitting compiler and flags, e.g
|
||||
# CXX="ccache gcc --pipe" => CXX=ccache gcc CXXFLAGS=--pipe
|
||||
|
||||
sub check_compiler
|
||||
{
|
||||
my ($varname, $flagsvarname) = @_;
|
||||
my @tokens = split(/ /,$ENV{$varname});
|
||||
if($#tokens >= 2)
|
||||
{
|
||||
$ENV{$varname} = $tokens[0]." ".$tokens[1];
|
||||
my $flags;
|
||||
|
||||
for(my $i=2; $i<=$#tokens; $i++)
|
||||
{
|
||||
$flags= $flags." ".$tokens[$i];
|
||||
}
|
||||
if(defined $ENV{$flagsvarname})
|
||||
{
|
||||
$flags = $flags." ".$ENV{$flagsvarname};
|
||||
}
|
||||
$ENV{$flagsvarname}=$flags;
|
||||
print("$varname=$ENV{$varname}\n");
|
||||
print("$flagsvarname=$ENV{$flagsvarname}\n");
|
||||
}
|
||||
}
|
||||
|
||||
check_compiler("CC", "CFLAGS");
|
||||
check_compiler("CXX", "CXXFLAGS");
|
||||
|
||||
foreach my $option (@ARGV)
|
||||
{
|
||||
if (substr ($option, 0, 2) == "--")
|
||||
if (substr ($option, 0, 2) eq "--")
|
||||
{
|
||||
$option = substr($option, 2);
|
||||
}
|
||||
else
|
||||
{
|
||||
# This must be environment variable
|
||||
my @v = split('=', $option);
|
||||
my $name = shift(@v);
|
||||
if(@v)
|
||||
{
|
||||
$ENV{$name} = join('=', @v);
|
||||
}
|
||||
next;
|
||||
}
|
||||
if($option =~ /srcdir/)
|
||||
{
|
||||
$srcdir = substr($option,7);
|
||||
|
@ -15,7 +15,6 @@ main.outfile_loaddata @solaris # Bug#46895 2010-01-20 alik Test "outfi
|
||||
main.plugin # Bug#47146 Linking problem with example plugin when dtrace enabled
|
||||
main.signal_demo3 @solaris # Bug#47791 2010-01-20 alik Several test cases fail on Solaris with error Thread stack overrun
|
||||
main.sp @solaris # Bug#47791 2010-01-20 alik Several test cases fail on Solaris with error Thread stack overrun
|
||||
main.sp-error @windows # Bug#43201 2010-02-22 alik sp-error.test fails on Windows debug build in embedded mode. The patch will come from -bugfixing.
|
||||
|
||||
rpl.rpl_heartbeat_basic # BUG#43828 2009-10-22 luis fails sporadically
|
||||
rpl.rpl_heartbeat_2slaves # BUG#43828 2009-10-22 luis fails sporadically
|
||||
|
@ -152,7 +152,6 @@ our $exe_mysqldump;
|
||||
our $exe_mysqlslap;
|
||||
our $exe_mysqlimport;
|
||||
our $exe_mysqlshow;
|
||||
our $exe_mysql_fix_system_tables;
|
||||
our $file_mysql_fix_privilege_tables;
|
||||
our $exe_mysqltest;
|
||||
our $exe_ndbd;
|
||||
@ -1680,14 +1679,6 @@ sub executable_setup () {
|
||||
$exe_mysql_upgrade= "";
|
||||
}
|
||||
|
||||
if ( ! $glob_win32 )
|
||||
{
|
||||
# Look for mysql_fix_system_table script
|
||||
$exe_mysql_fix_system_tables=
|
||||
mtr_script_exists("$glob_basedir/scripts/mysql_fix_privilege_tables",
|
||||
"$path_client_bindir/mysql_fix_privilege_tables");
|
||||
}
|
||||
|
||||
# Look for mysql_fix_privilege_tables.sql script
|
||||
$file_mysql_fix_privilege_tables=
|
||||
mtr_file_exists("$glob_basedir/scripts/mysql_fix_privilege_tables.sql",
|
||||
@ -2159,20 +2150,6 @@ sub environment_setup () {
|
||||
$ENV{'MYSQL_UPGRADE'}= mysql_upgrade_arguments();
|
||||
}
|
||||
|
||||
# ----------------------------------------------------
|
||||
# Setup env so childs can execute mysql_fix_system_tables
|
||||
# ----------------------------------------------------
|
||||
if ( !$opt_extern && ! $glob_win32 )
|
||||
{
|
||||
my $cmdline_mysql_fix_system_tables=
|
||||
"$exe_mysql_fix_system_tables --no-defaults --host=localhost " .
|
||||
"--user=root --password= " .
|
||||
"--basedir=$glob_basedir --bindir=$path_client_bindir --verbose " .
|
||||
"--port=$master->[0]->{'port'} " .
|
||||
"--socket=$master->[0]->{'path_sock'}";
|
||||
$ENV{'MYSQL_FIX_SYSTEM_TABLES'}= $cmdline_mysql_fix_system_tables;
|
||||
|
||||
}
|
||||
$ENV{'MYSQL_FIX_PRIVILEGE_TABLES'}= $file_mysql_fix_privilege_tables;
|
||||
|
||||
# ----------------------------------------------------
|
||||
|
@ -42,7 +42,7 @@ IF (WIN32)
|
||||
SET (MYSYS_SOURCES ${MYSYS_SOURCES} my_winthread.c my_wincond.c my_winerr.c my_winfile.c my_windac.c my_conio.c)
|
||||
ENDIF()
|
||||
|
||||
IF(CMAKE_COMPILER_IS_GNUCC AND NOT HAVE_CXX_NEW)
|
||||
IF(NOT HAVE_CXX_NEW)
|
||||
# gcc as C++ compiler does not have new/delete
|
||||
SET(MYSYS_SOURCES ${MYSYS_SOURCES} my_new.cc)
|
||||
ADD_DEFINITIONS( -DUSE_MYSYS_NEW)
|
||||
|
@ -66,6 +66,7 @@ INSTALL(FILES
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mysql_system_tables_data.sql
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/fill_help_tables.sql
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mysql_test_data_timezone.sql
|
||||
${FIX_PRIVILEGES_SQL}
|
||||
DESTINATION ${INSTALL_MYSQLSHAREDIR}
|
||||
)
|
||||
|
||||
|
@ -2865,9 +2865,7 @@ bool Item_func_case::fix_fields(THD *thd, Item **ref)
|
||||
buff should match stack usage from
|
||||
Item_func_case::val_int() -> Item_func_case::find_item()
|
||||
*/
|
||||
#ifndef EMBEDDED_LIBRARY
|
||||
uchar buff[MAX_FIELD_WIDTH*2+sizeof(String)*2+sizeof(String*)*2+sizeof(double)*2+sizeof(longlong)*2];
|
||||
#endif
|
||||
bool res= Item_func::fix_fields(thd, ref);
|
||||
/*
|
||||
Call check_stack_overrun after fix_fields to be sure that stack variable
|
||||
@ -4081,9 +4079,7 @@ Item_cond::fix_fields(THD *thd, Item **ref)
|
||||
DBUG_ASSERT(fixed == 0);
|
||||
List_iterator<Item> li(list);
|
||||
Item *item;
|
||||
#ifndef EMBEDDED_LIBRARY
|
||||
uchar buff[sizeof(char*)]; // Max local vars in function
|
||||
#endif
|
||||
not_null_tables_cache= used_tables_cache= 0;
|
||||
const_item_cache= 1;
|
||||
/*
|
||||
|
@ -151,9 +151,7 @@ Item_func::fix_fields(THD *thd, Item **ref)
|
||||
{
|
||||
DBUG_ASSERT(fixed == 0);
|
||||
Item **arg,**arg_end;
|
||||
#ifndef EMBEDDED_LIBRARY // Avoid compiler warning
|
||||
uchar buff[STACK_BUFF_ALLOC]; // Max argument in function
|
||||
#endif
|
||||
|
||||
used_tables_cache= not_null_tables_cache= 0;
|
||||
const_item_cache=1;
|
||||
@ -2839,9 +2837,7 @@ bool
|
||||
udf_handler::fix_fields(THD *thd, Item_result_field *func,
|
||||
uint arg_count, Item **arguments)
|
||||
{
|
||||
#ifndef EMBEDDED_LIBRARY // Avoid compiler warning
|
||||
uchar buff[STACK_BUFF_ALLOC]; // Max argument in function
|
||||
#endif
|
||||
DBUG_ENTER("Item_udf_func::fix_fields");
|
||||
|
||||
if (check_stack_overrun(thd, STACK_MIN_SIZE, buff))
|
||||
|
@ -2534,14 +2534,14 @@ inline bool is_user_table(TABLE * table)
|
||||
#ifndef EMBEDDED_LIBRARY
|
||||
extern "C" void unireg_abort(int exit_code) __attribute__((noreturn));
|
||||
void kill_delayed_threads(void);
|
||||
bool check_stack_overrun(THD *thd, long margin, uchar *dummy);
|
||||
#else
|
||||
extern "C" void unireg_clear(int exit_code);
|
||||
#define unireg_abort(exit_code) do { unireg_clear(exit_code); DBUG_RETURN(exit_code); } while(0)
|
||||
inline void kill_delayed_threads(void) {}
|
||||
#define check_stack_overrun(A, B, C) 0
|
||||
#endif
|
||||
|
||||
bool check_stack_overrun(THD *thd, long margin, uchar *dummy);
|
||||
|
||||
/* This must match the path length limit in the ER_NOT_RW_DIR error msg. */
|
||||
#define ER_NOT_RW_DIR_PATHSIZE 200
|
||||
bool is_usable_directory(THD *thd, const char *varname,
|
||||
|
@ -2266,9 +2266,7 @@ int SQL_SELECT::test_quick_select(THD *thd, key_map keys_to_use,
|
||||
keys_to_use.intersect(head->keys_in_use_for_query);
|
||||
if (!keys_to_use.is_clear_all())
|
||||
{
|
||||
#ifndef EMBEDDED_LIBRARY // Avoid compiler warning
|
||||
uchar buff[STACK_BUFF_ALLOC];
|
||||
#endif
|
||||
MEM_ROOT alloc;
|
||||
SEL_TREE *tree= NULL;
|
||||
KEY_PART *key_parts;
|
||||
|
@ -5171,7 +5171,6 @@ bool check_global_access(THD *thd, ulong want_access)
|
||||
Check stack size; Send error if there isn't enough stack to continue
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef EMBEDDED_LIBRARY
|
||||
|
||||
#if STACK_DIRECTION < 0
|
||||
#define used_stack(A,B) (long) (A - B)
|
||||
@ -5209,7 +5208,7 @@ bool check_stack_overrun(THD *thd, long margin,
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
#endif /* EMBEDDED_LIBRARY */
|
||||
|
||||
|
||||
#define MY_YACC_INIT 1000 // Start with big alloc
|
||||
#define MY_YACC_MAX 32000 // Because of 'short'
|
||||
|
@ -2516,9 +2516,7 @@ static ha_rows get_quick_record_count(THD *thd, SQL_SELECT *select,
|
||||
{
|
||||
int error;
|
||||
DBUG_ENTER("get_quick_record_count");
|
||||
#ifndef EMBEDDED_LIBRARY // Avoid compiler warning
|
||||
uchar buff[STACK_BUFF_ALLOC];
|
||||
#endif
|
||||
if (check_stack_overrun(thd, STACK_MIN_SIZE, buff))
|
||||
DBUG_RETURN(0); // Fatal error flag is set
|
||||
if (select)
|
||||
|
Reference in New Issue
Block a user