Commit 056656f7 authored by unknown's avatar unknown

Fix not critical MyISAM bug in locking.

Free character sets properly (for embedded).
Add missing mutex in HANDLER CLOSE


Build-tools/Do-compile:
  Update for gcc 3.0
Docs/manual.texi:
  Update for gcc 3.0
myisam/mi_locking.c:
  Fix not critical bug in locking
myisam/myisamdef.h:
  Fix not critical bug in locking
mysys/my_init.c:
  Free character sets properly
mysys/my_seek.c:
  Remove warning
sql-bench/server-cfg.sh:
  Fix benchmarks to run with MySQL
sql/sql_handler.cc:
  Add missing mutex
sql/sql_update.cc:
  Clean up procinfo
parent 7304ce4f
......@@ -19,7 +19,7 @@ if ($opt_innodb || $opt_bdb)
chomp($host=`hostname`);
$full_host_name=$host;
info("Compiling MySQL$version_suffix at $host, stage: $opt_stage\n");
info("Compiling MySQL$version_suffix at $host$suffix, stage: $opt_stage\n");
$connect_option= ($opt_tcpip ? "--host=$host" : "");
$host =~ /^([^.-]*)/;
$host=$1 . $opt_suffix;
......@@ -36,6 +36,10 @@ if (defined($gcc_version) && ! $opt_config_env)
{
$opt_config_env= 'CC=gcc CFLAGS="-O2 -fno-omit-frame-pointer" CXX=gcc CXXFLAGS="-O2 -fno-omit-frame-pointer"';
}
elsif ($tmp =~ /version 3\.0\./)
{
$opt_config_env= 'CC=gcc CFLAGS="-O3 -fno-omit-frame-pointer" CXXFLAGS="-O3 -fno-omit-frame-pointer -felide-constructors -fno-exceptions -fno-rtti"';
}
else
{
$opt_config_env= 'CC=gcc CFLAGS="-O3 -fno-omit-frame-pointer" CXX=gcc CXXFLAGS="-O3 -fno-omit-frame-pointer -felide-constructors -fno-exceptions -fno-rtti"';
......@@ -107,7 +111,6 @@ $|=1;
safe_cd("$host");
if ($opt_stage == 0 && ! $opt_use_old_distribution)
{
my ($name);
safe_system("gunzip < $opt_distribution | $tar xf -");
# Fix file times; This is needed because the time for files may be
......
......@@ -7704,6 +7704,11 @@ also work. There have been some problems with the @code{glibc} RPMs from
RedHat, so if you have problems, check whether or not there are any updates!
The @code{glibc} 2.0.7-19 and 2.0.7-29 RPMs are known to work.
If you are using gcc 3.0 and above to compile MySQL, you must install
the @code{libstdc++v3} library before compiling MySQL; If you don't do
this you will get an error about a missing @code{__cxa_pure_virtual}
symbol during linking!
On some older Linux distributions, @code{configure} may produce an error
like this:
......@@ -7757,7 +7762,7 @@ shell> CXX=gcc ./configure
@end example
If you are running gcc 3.0 and above, you can't use the above trick with
CXX=gcc, but you have to install libstd++.
setting to CXX=gcc.
@node Linux-SPARC, Linux-Alpha, Linux-x86, Linux
@subsubsection Linux SPARC Notes
......@@ -305,10 +305,9 @@ int _mi_readinfo(register MI_INFO *info, int lock_type, int check_keybuffer)
MYISAM_SHARE *share=info->s;
if (!share->tot_locks)
{
if ((info->tmp_lock_type=lock_type) != F_RDLCK)
if (my_lock(share->kfile,lock_type,0L,F_TO_EOF,
info->lock_wait | MY_SEEK_NOT_DONE))
DBUG_RETURN(1);
if (my_lock(share->kfile,lock_type,0L,F_TO_EOF,
info->lock_wait | MY_SEEK_NOT_DONE))
DBUG_RETURN(1);
if (mi_state_info_read_dsk(share->kfile, &share->state, 1))
{
int error=my_errno ? my_errno : -1;
......
......@@ -589,7 +589,7 @@ enum myisam_log_commands {
#define myisam_log_record(a,b,c,d,e) if (myisam_log_file >= 0) _myisam_log_record(a,b,c,d,e)
#define fast_mi_writeinfo(INFO) if (!(INFO)->s->tot_locks) (void) _mi_writeinfo((INFO),0)
#define fast_mi_readinfo(INFO) (!(INFO)->lock_type == F_UNLCK) && _mi_readinfo((INFO),F_RDLCK,1)
#define fast_mi_readinfo(INFO) ((INFO)->lock_type == F_UNLCK) && _mi_readinfo((INFO),F_RDLCK,1)
#ifdef __cplusplus
extern "C" {
......
......@@ -125,6 +125,7 @@ void my_end(int infoflag)
DBUG_PRINT("error",("%s",errbuff[0]));
}
}
free_charsets();
if (infoflag & MY_GIVE_INFO || info_file != stderr)
{
#ifdef HAVE_GETRUSAGE
......@@ -149,7 +150,6 @@ Voluntary context switches %ld, Involuntary context switches %ld\n",
#if defined(MSDOS) && !defined(__WIN__)
fprintf(info_file,"\nRun time: %.1f\n",(double) clock()/CLOCKS_PER_SEC);
#endif
free_charsets();
#if defined(SAFEMALLOC)
TERMINATE(stderr); /* Give statistic on screen */
#elif defined(__WIN__) && defined(_MSC_VER)
......
......@@ -35,7 +35,7 @@ my_off_t my_seek(File fd, my_off_t pos, int whence,
DBUG_PRINT("error",("lseek: %lu, errno: %d",newpos,errno));
DBUG_RETURN(MY_FILEPOS_ERROR);
}
if (newpos != pos)
if ((my_off_t) newpos != pos)
{
DBUG_PRINT("exit",("pos: %lu", (ulong) newpos));
}
......
......@@ -335,6 +335,12 @@ sub reconnect_on_errors
return 0;
}
sub fix_for_insert
{
my ($self,$cmd) = @_;
return $cmd;
}
#
# Optimize tables for better performance
#
......@@ -354,7 +360,6 @@ sub vacuum
}
}
#############################################################################
# Definitions for mSQL
#############################################################################
......@@ -548,6 +553,12 @@ sub reconnect_on_errors
return 0;
}
sub fix_for_insert
{
my ($self,$cmd) = @_;
return $cmd;
}
#############################################################################
# Definitions for PostgreSQL #
#############################################################################
......@@ -806,6 +817,12 @@ sub reconnect_on_errors
return 0;
}
sub fix_for_insert
{
my ($self,$cmd) = @_;
return $cmd;
}
sub vacuum
{
my ($self,$full_vacuum,$dbh_ref,@tables)=@_;
......@@ -1072,6 +1089,12 @@ sub small_rollback_segment
return 0;
}
sub fix_for_insert
{
my ($self,$cmd) = @_;
return $cmd;
}
sub reconnect_on_errors
{
return 0;
......@@ -1811,7 +1834,7 @@ sub query {
sub fix_for_insert
{
my ($self,$cmd) = @_;
$cmd =~ s/\\'//g;
$cmd =~ s/\\\'//g;
return $cmd;
}
......@@ -1844,6 +1867,7 @@ sub reconnect_on_errors
return 0;
}
#############################################################################
# Configuration for Access
#############################################################################
......@@ -2021,6 +2045,12 @@ sub reconnect_on_errors
return 1;
}
sub fix_for_insert
{
my ($self,$cmd) = @_;
return $cmd;
}
#############################################################################
# Configuration for Microsoft SQL server
#############################################################################
......@@ -2209,6 +2239,12 @@ sub reconnect_on_errors
return 0;
}
sub fix_for_insert
{
my ($self,$cmd) = @_;
return $cmd;
}
#############################################################################
# Configuration for Sybase
#############################################################################
......@@ -2384,6 +2420,12 @@ sub reconnect_on_errors
return 0;
}
sub fix_for_insert
{
my ($self,$cmd) = @_;
return $cmd;
}
#
# optimize the tables ....
#
......@@ -2617,6 +2659,12 @@ sub reconnect_on_errors
return 0;
}
sub fix_for_insert
{
my ($self,$cmd) = @_;
return $cmd;
}
#############################################################################
# Configuration for IBM DB2
#############################################################################
......@@ -2791,6 +2839,12 @@ sub reconnect_on_errors
return 0;
}
sub fix_for_insert
{
my ($self,$cmd) = @_;
return $cmd;
}
#############################################################################
# Configuration for MIMER
#############################################################################
......@@ -2992,6 +3046,12 @@ sub reconnect_on_errors
return 0;
}
sub fix_for_insert
{
my ($self,$cmd) = @_;
return $cmd;
}
#############################################################################
# Configuration for InterBase
#############################################################################
......@@ -3205,6 +3265,12 @@ sub reconnect_on_errors
return 1;
}
sub fix_for_insert
{
my ($self,$cmd) = @_;
return $cmd;
}
#############################################################################
# Configuration for FrontBase
#############################################################################
......@@ -3410,4 +3476,10 @@ sub reconnect_on_errors
return 1;
}
sub fix_for_insert
{
my ($self,$cmd) = @_;
return $cmd;
}
1;
......@@ -63,7 +63,11 @@ int mysql_ha_close(THD *thd, TABLE_LIST *tables)
TABLE **ptr=find_table_ptr_by_name(thd, tables->db, tables->name);
if (*ptr)
{
VOID(pthread_mutex_lock(&LOCK_open));
close_thread_table(thd, ptr);
VOID(pthread_mutex_unlock(&LOCK_open));
}
send_ok(&thd->net);
return 0;
......
......@@ -199,7 +199,7 @@ int mysql_update(THD *thd,
}
init_read_record(&info,thd,table,select,0,1);
thd->proc_info="searching";
thd->proc_info="Searching rows for update";
while (!(error=info.read_record(&info)) && !thd->killed)
{
......@@ -261,7 +261,7 @@ int mysql_update(THD *thd,
ha_rows updated=0L,found=0L;
thd->count_cuted_fields=1; /* calc cuted fields */
thd->cuted_fields=0L;
thd->proc_info="updating";
thd->proc_info="Updating";
query_id=thd->query_id;
while (!(error=info.read_record(&info)) && !thd->killed)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment