mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Added testing of pthread_key_delete (to fix compile problem on SCO) (Bug #2461)
DROP DATABASE now assumes RAID directories are in hex. (Bug #2627) Don't increment 'select_full_range' and similar statistics for EXPLAIN queries. (Bug #2506) Test in configure if pthread_key_delete() exists (to fix compile problem on SCO) (Bug #2461) BUILD/compile-pentium-max: Added --with-raid configure.in: Added testing of pthread_key_delete (to fix compile problem on SCO) (Bug #2461) include/my_pthread.h: Added testing of pthread_key_delete (to fix compile problem on SCO) (Bug #2461) innobase/include/data0data.ic: Added missing newline mysql-test/r/raid.result: Test of DROP DATABASE with RAID directories in hex mysql-test/t/raid.test: Test of DROP DATABASE with RAID directories in hex sql/sql_db.cc: DROP DATABASE could not drop databases with RAID tables that had more than 9 RAID_CHUNKS because DROP DATABASE assumed raid tables where in decimal while the RAID CREATE code assumed directories was in hex.(Bug #2627) sql/sql_select.cc: Don't increment 'select_full_range' and similar statistics for EXPLAIN queries. (Bug #2506) sql/sql_udf.cc: mysqld crashed if mysql.func table didn't exists (Bug #2577)
This commit is contained in:
@ -9,6 +9,6 @@ strip=yes
|
|||||||
|
|
||||||
extra_configs="$extra_configs --with-innodb --with-berkeley-db \
|
extra_configs="$extra_configs --with-innodb --with-berkeley-db \
|
||||||
--with-embedded-server --enable-thread-safe-client \
|
--with-embedded-server --enable-thread-safe-client \
|
||||||
--with-openssl --with-vio"
|
--with-openssl --with-vio --with-raid"
|
||||||
|
|
||||||
. "$path/FINISH.sh"
|
. "$path/FINISH.sh"
|
||||||
|
@ -1815,7 +1815,7 @@ AC_CHECK_FUNCS(alarm bmove \
|
|||||||
sigset sigthreadmask pthread_sigmask pthread_setprio pthread_setprio_np \
|
sigset sigthreadmask pthread_sigmask pthread_setprio pthread_setprio_np \
|
||||||
pthread_setschedparam pthread_attr_setprio pthread_attr_setschedparam \
|
pthread_setschedparam pthread_attr_setprio pthread_attr_setschedparam \
|
||||||
pthread_attr_create pthread_getsequence_np pthread_attr_setstacksize \
|
pthread_attr_create pthread_getsequence_np pthread_attr_setstacksize \
|
||||||
pthread_attr_getstacksize \
|
pthread_attr_getstacksize pthread_key_delete \
|
||||||
pthread_condattr_create rwlock_init pthread_rwlock_rdlock \
|
pthread_condattr_create rwlock_init pthread_rwlock_rdlock \
|
||||||
fsync fdatasync fchmod getpass getpassphrase initgroups mlockall)
|
fsync fdatasync fchmod getpass getpassphrase initgroups mlockall)
|
||||||
|
|
||||||
|
@ -384,6 +384,11 @@ struct tm *localtime_r(const time_t *clock, struct tm *res);
|
|||||||
#define pthread_condattr_destroy pthread_condattr_delete
|
#define pthread_condattr_destroy pthread_condattr_delete
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* FSU THREADS */
|
||||||
|
#if !defined(HAVE_PTHREAD_KEY_DELETE) && !defined(pthread_key_delete)
|
||||||
|
#define pthread_key_delete(A) pthread_dummy(0)
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_CTHREADS_WRAPPER /* For MacOSX */
|
#ifdef HAVE_CTHREADS_WRAPPER /* For MacOSX */
|
||||||
#define pthread_cond_destroy(A) pthread_dummy(0)
|
#define pthread_cond_destroy(A) pthread_dummy(0)
|
||||||
#define pthread_mutex_destroy(A) pthread_dummy(0)
|
#define pthread_mutex_destroy(A) pthread_dummy(0)
|
||||||
|
@ -430,4 +430,4 @@ dtuple_contains_null(
|
|||||||
}
|
}
|
||||||
|
|
||||||
return(FALSE);
|
return(FALSE);
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
create database test_raid;
|
create database test_raid;
|
||||||
create table test_raid.r1 (i int) raid_type=1;
|
create table test_raid.r1 (i int) raid_type=1;
|
||||||
|
create table test_raid.r2 (i int) raid_type=1 raid_chunks=32;
|
||||||
drop database test_raid;
|
drop database test_raid;
|
||||||
DROP TABLE IF EXISTS t1,t2;
|
DROP TABLE IF EXISTS t1,t2;
|
||||||
CREATE TABLE t1 (
|
CREATE TABLE t1 (
|
||||||
|
@ -9,6 +9,7 @@ enable_query_log;
|
|||||||
|
|
||||||
create database test_raid;
|
create database test_raid;
|
||||||
create table test_raid.r1 (i int) raid_type=1;
|
create table test_raid.r1 (i int) raid_type=1;
|
||||||
|
create table test_raid.r2 (i int) raid_type=1 raid_chunks=32;
|
||||||
drop database test_raid;
|
drop database test_raid;
|
||||||
DROP TABLE IF EXISTS t1,t2;
|
DROP TABLE IF EXISTS t1,t2;
|
||||||
CREATE TABLE t1 (
|
CREATE TABLE t1 (
|
||||||
|
@ -219,7 +219,7 @@ exit2:
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
Removes files with known extensions plus all found subdirectories that
|
Removes files with known extensions plus all found subdirectories that
|
||||||
are 2 digits (raid directories).
|
are 2 hex digits (raid directories).
|
||||||
thd MUST be set when calling this function!
|
thd MUST be set when calling this function!
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -245,7 +245,10 @@ static long mysql_rm_known_files(THD *thd, MY_DIR *dirp, const char *db,
|
|||||||
DBUG_PRINT("info",("Examining: %s", file->name));
|
DBUG_PRINT("info",("Examining: %s", file->name));
|
||||||
|
|
||||||
/* Check if file is a raid directory */
|
/* Check if file is a raid directory */
|
||||||
if (isdigit(file->name[0]) && isdigit(file->name[1]) &&
|
if ((isdigit(file->name[0]) ||
|
||||||
|
(file->name[0] >= 'a' && file->name[0] <= 'f')) &&
|
||||||
|
(isdigit(file->name[1]) ||
|
||||||
|
(file->name[1] >= 'a' && file->name[1] <= 'f')) &&
|
||||||
!file->name[2] && !level)
|
!file->name[2] && !level)
|
||||||
{
|
{
|
||||||
char newpath[FN_REFLEN];
|
char newpath[FN_REFLEN];
|
||||||
|
@ -2823,6 +2823,8 @@ make_join_readinfo(JOIN *join,uint options)
|
|||||||
{
|
{
|
||||||
uint i;
|
uint i;
|
||||||
SELECT_LEX *select_lex = &(join->thd->lex.select_lex);
|
SELECT_LEX *select_lex = &(join->thd->lex.select_lex);
|
||||||
|
bool statistics= test(!(join->select_options & SELECT_DESCRIBE));
|
||||||
|
|
||||||
DBUG_ENTER("make_join_readinfo");
|
DBUG_ENTER("make_join_readinfo");
|
||||||
|
|
||||||
for (i=join->const_tables ; i < join->tables ; i++)
|
for (i=join->const_tables ; i < join->tables ; i++)
|
||||||
@ -2907,7 +2909,8 @@ make_join_readinfo(JOIN *join,uint options)
|
|||||||
{
|
{
|
||||||
select_lex->options|=QUERY_NO_GOOD_INDEX_USED;
|
select_lex->options|=QUERY_NO_GOOD_INDEX_USED;
|
||||||
tab->read_first_record= join_init_quick_read_record;
|
tab->read_first_record= join_init_quick_read_record;
|
||||||
statistic_increment(select_range_check_count, &LOCK_status);
|
if (statistics)
|
||||||
|
statistic_increment(select_range_check_count, &LOCK_status);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -2916,24 +2919,28 @@ make_join_readinfo(JOIN *join,uint options)
|
|||||||
{
|
{
|
||||||
if (tab->select && tab->select->quick)
|
if (tab->select && tab->select->quick)
|
||||||
{
|
{
|
||||||
statistic_increment(select_range_count, &LOCK_status);
|
if (statistics)
|
||||||
|
statistic_increment(select_range_count, &LOCK_status);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
select_lex->options|=QUERY_NO_INDEX_USED;
|
select_lex->options|=QUERY_NO_INDEX_USED;
|
||||||
statistic_increment(select_scan_count, &LOCK_status);
|
if (statistics)
|
||||||
|
statistic_increment(select_scan_count, &LOCK_status);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (tab->select && tab->select->quick)
|
if (tab->select && tab->select->quick)
|
||||||
{
|
{
|
||||||
statistic_increment(select_full_range_join_count, &LOCK_status);
|
if (statistics)
|
||||||
|
statistic_increment(select_full_range_join_count, &LOCK_status);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
select_lex->options|=QUERY_NO_INDEX_USED;
|
select_lex->options|=QUERY_NO_INDEX_USED;
|
||||||
statistic_increment(select_full_join_count, &LOCK_status);
|
if (statistics)
|
||||||
|
statistic_increment(select_full_join_count, &LOCK_status);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!table->no_keyread)
|
if (!table->no_keyread)
|
||||||
|
@ -116,6 +116,7 @@ void udf_init()
|
|||||||
udf_func *tmp;
|
udf_func *tmp;
|
||||||
TABLE_LIST tables;
|
TABLE_LIST tables;
|
||||||
READ_RECORD read_record_info;
|
READ_RECORD read_record_info;
|
||||||
|
TABLE *table;
|
||||||
int error;
|
int error;
|
||||||
DBUG_ENTER("ufd_init");
|
DBUG_ENTER("ufd_init");
|
||||||
|
|
||||||
@ -148,13 +149,11 @@ void udf_init()
|
|||||||
if (open_and_lock_tables(new_thd, &tables))
|
if (open_and_lock_tables(new_thd, &tables))
|
||||||
{
|
{
|
||||||
DBUG_PRINT("error",("Can't open udf table"));
|
DBUG_PRINT("error",("Can't open udf table"));
|
||||||
sql_print_error("Can't open mysql/func table");
|
sql_print_error("Can't open the mysql/func table. Please run the mysql_install_db script to create it.");
|
||||||
close_thread_tables(new_thd);
|
goto end;
|
||||||
delete new_thd;
|
|
||||||
DBUG_VOID_RETURN;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
TABLE *table = tables.table;
|
table= tables.table;
|
||||||
init_read_record(&read_record_info, new_thd, table, NULL,1,0);
|
init_read_record(&read_record_info, new_thd, table, NULL,1,0);
|
||||||
while (!(error = read_record_info.read_record(&read_record_info)))
|
while (!(error = read_record_info.read_record(&read_record_info)))
|
||||||
{
|
{
|
||||||
@ -200,6 +199,8 @@ void udf_init()
|
|||||||
sql_print_error(ER(ER_GET_ERRNO), my_errno);
|
sql_print_error(ER(ER_GET_ERRNO), my_errno);
|
||||||
end_read_record(&read_record_info);
|
end_read_record(&read_record_info);
|
||||||
new_thd->version--; // Force close to free memory
|
new_thd->version--; // Force close to free memory
|
||||||
|
|
||||||
|
end:
|
||||||
close_thread_tables(new_thd);
|
close_thread_tables(new_thd);
|
||||||
delete new_thd;
|
delete new_thd;
|
||||||
/* Remember that we don't have a THD */
|
/* Remember that we don't have a THD */
|
||||||
|
Reference in New Issue
Block a user