summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xBUILD/compile-pentium-max2
-rwxr-xr-xBuild-tools/Bootstrap2
-rwxr-xr-xBuild-tools/Do-compile13
-rw-r--r--configure.in2
-rw-r--r--include/my_pthread.h5
-rw-r--r--innobase/include/data0data.ic2
-rw-r--r--mysql-test/r/raid.result1
-rw-r--r--mysql-test/t/raid.test1
-rw-r--r--sql/sql_db.cc7
-rw-r--r--sql/sql_select.cc17
-rw-r--r--sql/sql_udf.cc11
11 files changed, 39 insertions, 24 deletions
diff --git a/BUILD/compile-pentium-max b/BUILD/compile-pentium-max
index d41274d4f5e..34a497807df 100755
--- a/BUILD/compile-pentium-max
+++ b/BUILD/compile-pentium-max
@@ -9,6 +9,6 @@ strip=yes
extra_configs="$extra_configs --with-innodb --with-berkeley-db \
--with-embedded-server --enable-thread-safe-client \
- --with-openssl --with-vio"
+ --with-openssl --with-vio --with-raid"
. "$path/FINISH.sh"
diff --git a/Build-tools/Bootstrap b/Build-tools/Bootstrap
index 930d053b113..a46d83ca91c 100755
--- a/Build-tools/Bootstrap
+++ b/Build-tools/Bootstrap
@@ -257,7 +257,7 @@ if (defined $opt_changelog)
$msg= "Adding $target_dir/ChangeLog";
$msg.= " (down to revision $opt_changelog)" if $opt_changelog ne "";
&logger($msg);
- $command= "bk changes -v";
+ $command= "bk changes -mv";
$command.= " -r" if ($opt_changelog ne "" || $opt_revision);
$command.= $opt_changelog if $opt_changelog ne "";
$command.= ".." if ($opt_changelog ne "" && !$opt_revision);
diff --git a/Build-tools/Do-compile b/Build-tools/Do-compile
index e92654ccffd..bd6c89d7ded 100755
--- a/Build-tools/Do-compile
+++ b/Build-tools/Do-compile
@@ -280,7 +280,7 @@ if ($opt_stage <= 3)
{
my $flags= "";
log_timestamp();
- log_system("rm -fr mysql-3* mysql-4* $pwd/$host/*.tar.gz");
+ log_system("rm -fr mysql-{3,4,5}* $pwd/$host/mysql*.t*gz");
# No need to add the debug symbols, if the binaries are not stripped (saves space)
unless ($opt_with_debug || $opt_no_strip)
{
@@ -289,7 +289,7 @@ if ($opt_stage <= 3)
$flags.= "--no-strip" if ($opt_no_strip || $opt_with_debug);
check_system("scripts/make_binary_distribution --tmp=$opt_tmp --suffix=$opt_suffix $flags",".tar.gz created");
- safe_system("mv mysql*.tar.gz $pwd/$host");
+ safe_system("mv mysql*.t*gz $pwd/$host");
if (-f "client/.libs/mysqladmin")
{
safe_system("cp client/.libs/mysqladmin $pwd/$host/bin");
@@ -301,11 +301,8 @@ if ($opt_stage <= 3)
safe_system("$make clean") if ($opt_with_small_disk);
}
-$tar_file=<$pwd/$host/*.tar.gz>;
-if (!defined($tar_file))
-{
- $tar_file=<$pwd/$host/*.tgz>;
-}
+$tar_file=<$pwd/$host/mysql*.t*gz>;
+abort ("Could not find tarball!") unless ($tar_file);
#
# Unpack the binary distribution
@@ -318,7 +315,7 @@ if ($opt_stage <= 4 && !$opt_no_test)
safe_system("gunzip < $tar_file | $tar xf -");
}
-$tar_file =~ /(mysql[^\/]*)\.tar/;
+$tar_file =~ /(mysql[^\/]*)\.(tar\.gz|tgz)/;
$ver=$1;
$test_dir="$pwd/$host/test/$ver";
$ENV{"LD_LIBRARY_PATH"}= ("$test_dir/lib" .
diff --git a/configure.in b/configure.in
index bc9bad931ad..86a3daf84da 100644
--- a/configure.in
+++ b/configure.in
@@ -1815,7 +1815,7 @@ AC_CHECK_FUNCS(alarm bmove \
sigset sigthreadmask pthread_sigmask pthread_setprio pthread_setprio_np \
pthread_setschedparam pthread_attr_setprio pthread_attr_setschedparam \
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 \
fsync fdatasync fchmod getpass getpassphrase initgroups mlockall)
diff --git a/include/my_pthread.h b/include/my_pthread.h
index 59367ee903c..40302f48bd5 100644
--- a/include/my_pthread.h
+++ b/include/my_pthread.h
@@ -384,6 +384,11 @@ struct tm *localtime_r(const time_t *clock, struct tm *res);
#define pthread_condattr_destroy pthread_condattr_delete
#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 */
#define pthread_cond_destroy(A) pthread_dummy(0)
#define pthread_mutex_destroy(A) pthread_dummy(0)
diff --git a/innobase/include/data0data.ic b/innobase/include/data0data.ic
index bc5a93cb2f8..def80d3f430 100644
--- a/innobase/include/data0data.ic
+++ b/innobase/include/data0data.ic
@@ -430,4 +430,4 @@ dtuple_contains_null(
}
return(FALSE);
-} \ No newline at end of file
+}
diff --git a/mysql-test/r/raid.result b/mysql-test/r/raid.result
index fd47a9451f6..3d27a599cf3 100644
--- a/mysql-test/r/raid.result
+++ b/mysql-test/r/raid.result
@@ -1,5 +1,6 @@
create database test_raid;
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 TABLE IF EXISTS t1,t2;
CREATE TABLE t1 (
diff --git a/mysql-test/t/raid.test b/mysql-test/t/raid.test
index 4032993f2da..43ad58ab368 100644
--- a/mysql-test/t/raid.test
+++ b/mysql-test/t/raid.test
@@ -9,6 +9,7 @@ enable_query_log;
create database test_raid;
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 TABLE IF EXISTS t1,t2;
CREATE TABLE t1 (
diff --git a/sql/sql_db.cc b/sql/sql_db.cc
index 3fa3f5b0907..ca9989d986c 100644
--- a/sql/sql_db.cc
+++ b/sql/sql_db.cc
@@ -219,7 +219,7 @@ exit2:
/*
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!
*/
@@ -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));
/* 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)
{
char newpath[FN_REFLEN];
diff --git a/sql/sql_select.cc b/sql/sql_select.cc
index 36ef97cbf30..3e824ddc9f5 100644
--- a/sql/sql_select.cc
+++ b/sql/sql_select.cc
@@ -2823,6 +2823,8 @@ make_join_readinfo(JOIN *join,uint options)
{
uint i;
SELECT_LEX *select_lex = &(join->thd->lex.select_lex);
+ bool statistics= test(!(join->select_options & SELECT_DESCRIBE));
+
DBUG_ENTER("make_join_readinfo");
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;
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
{
@@ -2916,24 +2919,28 @@ make_join_readinfo(JOIN *join,uint options)
{
if (tab->select && tab->select->quick)
{
- statistic_increment(select_range_count, &LOCK_status);
+ if (statistics)
+ statistic_increment(select_range_count, &LOCK_status);
}
else
{
select_lex->options|=QUERY_NO_INDEX_USED;
- statistic_increment(select_scan_count, &LOCK_status);
+ if (statistics)
+ statistic_increment(select_scan_count, &LOCK_status);
}
}
else
{
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
{
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)
diff --git a/sql/sql_udf.cc b/sql/sql_udf.cc
index 54613f82f00..431f8a13d28 100644
--- a/sql/sql_udf.cc
+++ b/sql/sql_udf.cc
@@ -116,6 +116,7 @@ void udf_init()
udf_func *tmp;
TABLE_LIST tables;
READ_RECORD read_record_info;
+ TABLE *table;
int error;
DBUG_ENTER("ufd_init");
@@ -148,13 +149,11 @@ void udf_init()
if (open_and_lock_tables(new_thd, &tables))
{
DBUG_PRINT("error",("Can't open udf table"));
- sql_print_error("Can't open mysql/func table");
- close_thread_tables(new_thd);
- delete new_thd;
- DBUG_VOID_RETURN;
+ sql_print_error("Can't open the mysql/func table. Please run the mysql_install_db script to create it.");
+ goto end;
}
- TABLE *table = tables.table;
+ table= tables.table;
init_read_record(&read_record_info, new_thd, table, NULL,1,0);
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);
end_read_record(&read_record_info);
new_thd->version--; // Force close to free memory
+
+end:
close_thread_tables(new_thd);
delete new_thd;
/* Remember that we don't have a THD */