Commit 184ef91d authored by monty@mashka.mysql.fi's avatar monty@mashka.mysql.fi

Merge

parents b8bf46ca b17eea55
...@@ -28,3 +28,4 @@ serg@sergbook.mysql.com ...@@ -28,3 +28,4 @@ serg@sergbook.mysql.com
sinisa@rhols221.adsl.netsonic.fi sinisa@rhols221.adsl.netsonic.fi
zak@balfor.local zak@balfor.local
bar@bar.mysql.r18.ru bar@bar.mysql.r18.ru
paul@teton.kitebird.com
...@@ -2,12 +2,12 @@ ...@@ -2,12 +2,12 @@
use Getopt::Long; use Getopt::Long;
$opt_distribution=$opt_user=$opt_result=$opt_config_options=$opt_config_env=""; $opt_distribution=$opt_user=$opt_result=$opt_config_options=$opt_config_env="";
$opt_dbd_options=$opt_perl_options=$opt_suffix=""; $opt_dbd_options=$opt_perl_options=$opt_make_options=$opt_suffix="";
$opt_tmp=$opt_version_suffix=""; $opt_tmp=$opt_version_suffix="";
$opt_help=$opt_Information=$opt_delete=$opt_debug=$opt_stage=$opt_rsh_mail=$opt_no_test=$opt_no_perl=$opt_with_low_memory=$opt_fast_benchmark=$opt_static_client=$opt_static_server=$opt_static_perl=$opt_sur=$opt_with_small_disk=$opt_local_perl=$opt_tcpip=$opt_build_thread=$opt_no_mysqltest=$opt_use_old_distribution=$opt_enable_shared=$opt_no_crash_me=$opt_no_strip=0; $opt_help=$opt_Information=$opt_delete=$opt_debug=$opt_stage=$opt_rsh_mail=$opt_no_test=$opt_no_perl=$opt_with_low_memory=$opt_fast_benchmark=$opt_static_client=$opt_static_server=$opt_static_perl=$opt_sur=$opt_with_small_disk=$opt_local_perl=$opt_tcpip=$opt_build_thread=$opt_no_mysqltest=$opt_use_old_distribution=$opt_enable_shared=$opt_no_crash_me=$opt_no_strip=0;
$opt_innodb=$opt_bdb=0; $opt_innodb=$opt_bdb=$opt_raid=$opt_libwrap=0;
GetOptions("Information","help","distribution=s","user=s","result=s","delete","no-test","no-mysqltest","perl-files=s","debug","config-options=s","config-env=s","stage=i","rsh-mail","with-low-memory","fast-benchmark","tmp=s","static-client","static-server","static-perl","no-perl","local-perl","perl-options=s","sur","with-small-disk","dbd-options=s","tcpip","suffix=s","build-thread=i","innodb","bdb","use-old-distribution","enable-shared","no-crash-me","no-strip","version-suffix=s", "with-other-libc=s") || usage(); GetOptions("Information","help","distribution=s","user=s","result=s","delete","no-test","no-mysqltest","perl-files=s","debug","config-options=s","config-env=s","stage=i","rsh-mail","with-low-memory","fast-benchmark","tmp=s","static-client","static-server","static-perl","no-perl","local-perl","perl-options=s","make-options=s","sur","with-small-disk","dbd-options=s","tcpip","suffix=s","build-thread=i","innodb","bdb","raid","libwrap","use-old-distribution","enable-shared","no-crash-me","no-strip","version-suffix=s", "with-other-libc=s") || usage();
usage() if ($opt_help || $opt_Information); usage() if ($opt_help || $opt_Information);
usage() if (!$opt_distribution); usage() if (!$opt_distribution);
...@@ -75,6 +75,19 @@ $ENV{"PERL5LIB"}="$pwd/$host/perl5:$pwd/$host/perl5/site_perl"; ...@@ -75,6 +75,19 @@ $ENV{"PERL5LIB"}="$pwd/$host/perl5:$pwd/$host/perl5/site_perl";
$slave_port=$mysql_tcp_port+16; $slave_port=$mysql_tcp_port+16;
$manager_port=$mysql_tcp_port+1; $manager_port=$mysql_tcp_port+1;
if ($opt_stage == 0)
{
system("mkdir Logs") if (! -d "Logs");
system("mv $log ${log}-old") if (-f $log);
unlink($log);
}
open(LOG,">>$log") || abort("Can't open log file, error $?");
select LOG;
$|=1;
select STDOUT;
$|=1;
if (-x "$host/bin/mysqladmin") if (-x "$host/bin/mysqladmin")
{ {
log_system("$host/bin/mysqladmin --no-defaults -u root -S $mysql_unix_port -s shutdown"); log_system("$host/bin/mysqladmin --no-defaults -u root -S $mysql_unix_port -s shutdown");
...@@ -97,25 +110,22 @@ if ($opt_stage == 0) ...@@ -97,25 +110,22 @@ if ($opt_stage == 0)
} }
rm_all("$host/test"); rm_all("$host/test");
system("mkdir $host/test") if (! -d "$host/test"); system("mkdir $host/test") if (! -d "$host/test");
system("mkdir Logs") if (! -d "Logs");
system("mv $log ${log}-old") if (-f $log);
unlink($log);
} }
open(LOG,">>$log") || abort("Can't open log file, error $?");
select LOG;
$|=1;
select STDOUT;
$|=1;
safe_cd($host); safe_cd($host);
if ($opt_stage == 0 && ! $opt_use_old_distribution) if ($opt_stage == 0 && ! $opt_use_old_distribution)
{ {
safe_system("gunzip < $opt_distribution | $tar xf -"); safe_system("gunzip < $opt_distribution | $tar xf -");
# Fix file times; This is needed because the time for files may be # Fix file times; This is needed because the time for files may be
# in the future # in the future. The following is done this way to ensure that
system("touch timestamp; find . -newer timestamp -print | xargs touch; rm -f timestamp"); # we don't get any errors from xargs touch
system("touch timestamp");
sleep(2);
system("touch timestamp2");
system("find . -newer timestamp -print | xargs touch");
unlink("timestamp");
unlink("timestamp2");
sleep(2); sleep(2);
# Ensure that files we don't want to rebuild are newer than other files # Ensure that files we don't want to rebuild are newer than other files
safe_cd($ver); safe_cd($ver);
...@@ -149,7 +159,8 @@ if ($opt_stage <= 1) ...@@ -149,7 +159,8 @@ if ($opt_stage <= 1)
} }
if ($opt_with_other_libc) if ($opt_with_other_libc)
{ {
$opt_with_other_libc = "--with-other-libc=$opt_with_other_libc"; $opt_with_other_libc= "--with-other-libc=$opt_with_other_libc";
$opt_config_options.= " $opt_with_other_libc";
} }
if (!$opt_enable_shared) if (!$opt_enable_shared)
{ {
...@@ -159,11 +170,19 @@ if ($opt_stage <= 1) ...@@ -159,11 +170,19 @@ if ($opt_stage <= 1)
{ {
$opt_config_options.= " --with-berkeley-db" $opt_config_options.= " --with-berkeley-db"
} }
if ($opt_raid)
{
$opt_config_options.= " --with-raid"
}
if ($opt_innodb) if ($opt_innodb)
{ {
$opt_config_options.= " --with-innodb" $opt_config_options.= " --with-innodb"
} }
check_system("$opt_config_env ./configure --prefix=/usr/local/mysql \"--with-comment=Official MySQL$opt_version_suffix binary\" --with-extra-charsets=complex \"--with-server-suffix=$opt_version_suffix\" --enable-thread-safe-client --enable-local-infile $opt_config_options","Thank you for choosing MySQL"); if ($opt_libwrap)
{
$opt_config_options.= " --with-libwrap"
}
check_system("$opt_config_env ./configure --prefix=/usr/local/mysql --with-comment=\"Official MySQL$opt_version_suffix binary\" --with-extra-charsets=complex --with-server-suffix=\"$opt_version_suffix\" --enable-thread-safe-client --enable-local-infile $opt_config_options","Thank you for choosing MySQL");
if (-d "$pwd/$host/include-mysql") if (-d "$pwd/$host/include-mysql")
{ {
safe_system("cp -r $pwd/$host/include-mysql/* $pwd/$host/$ver/include"); safe_system("cp -r $pwd/$host/include-mysql/* $pwd/$host/$ver/include");
...@@ -172,8 +191,11 @@ if ($opt_stage <= 1) ...@@ -172,8 +191,11 @@ if ($opt_stage <= 1)
if ($opt_stage <= 2) if ($opt_stage <= 2)
{ {
my ($command);
unlink($opt_distribution) if ($opt_delete && !$opt_use_old_distribution); unlink($opt_distribution) if ($opt_delete && !$opt_use_old_distribution);
safe_system("$make"); $command=$make;
$command.= " $opt_make_options" if (defined($opt_make_options) && $opt_make_options ne "");
safe_system($command);
} }
# #
...@@ -368,6 +390,9 @@ To set up the environment, like 'CC=cc CXX=gcc CXXFLAGS=-O3' ...@@ -368,6 +390,9 @@ To set up the environment, like 'CC=cc CXX=gcc CXXFLAGS=-O3'
--dbd-options 'options' --dbd-options 'options'
Options for Makefile.PL when configuring msql-mysql-modules. Options for Makefile.PL when configuring msql-mysql-modules.
--make-options 'options'
Options to make after configure. (Like 'CXXLD=gcc')
--version-suffix suffix --version-suffix suffix
Can be used to set a suffix (normally 'com' or '-max') for a distribution Can be used to set a suffix (normally 'com' or '-max') for a distribution
...@@ -547,13 +572,17 @@ sub rm_all ...@@ -547,13 +572,17 @@ sub rm_all
sub kill_all sub kill_all
{ {
my ($pattern) = @_; my ($pattern) = @_;
my ($USER,$BSD,$LINUX,$pscmd, $user, $pid); my ($USER,$BSD,$LINUX, $pscmd, $user, $pid);
$user=$ENV{'USER'}; $user=$ENV{'USER'};
$BSD = -f '/vmunix' || $ENV{"OS"} eq "SunOS4"; $BSD = -f '/vmunix' || $ENV{"OS"} eq "SunOS4" || $^O eq 'darwin';
$LINUX = $^O eq 'linux'; $LINUX = $^O eq 'linux';
$pscmd = $BSD ? "/bin/ps -auxww" : $LINUX ? "/bin/ps axuw" : "/bin/ps -ef"; $pscmd = $BSD ? "/bin/ps -auxww" : $LINUX ? "/bin/ps axuw" : "/bin/ps -ef";
open(PS, "$pscmd|") || die "can't run $pscmd: $!"; if (!open(PS, "$pscmd|"))
{
print "Warning: Can't run $pscmd: $!\n";
exit;
}
# Catch any errors with eval. A bad pattern, for instance. # Catch any errors with eval. A bad pattern, for instance.
process: process:
......
...@@ -46929,11 +46929,14 @@ not yet 100% confident in this code. ...@@ -46929,11 +46929,14 @@ not yet 100% confident in this code.
@appendixsubsec Changes in release 3.23.53 @appendixsubsec Changes in release 3.23.53
@itemize @bullet @itemize @bullet
@item @item
Fixed a @code{BDB}-related @code{ALTER TABLE} bug with dropping a column
and shutting down immediately thereafter.
@item
Fixed problem with @code{configure ... --localstatedir=...}. Fixed problem with @code{configure ... --localstatedir=...}.
@item @item
Fixed problem with @code{UNSIGNED BIGINT} on AIX (again). Fixed problem with @code{UNSIGNED BIGINT} on AIX (again).
@item @item
Fixed bug in pthread_mutex_trylock() on HPUX 11.0 Fixed bug in pthread_mutex_trylock() on HPUX 11.0.
@item @item
Multithreaded stress tests for InnoDB. Multithreaded stress tests for InnoDB.
@end itemize @end itemize
...@@ -89,6 +89,8 @@ case "$target_os" in ...@@ -89,6 +89,8 @@ case "$target_os" in
CFLAGS="$CFLAGS -DUNIV_MUST_NOT_INLINE -DUNIV_HPUX -DUNIV_HPUX10";; CFLAGS="$CFLAGS -DUNIV_MUST_NOT_INLINE -DUNIV_HPUX -DUNIV_HPUX10";;
hp*) hp*)
CFLAGS="$CFLAGS -DUNIV_MUST_NOT_INLINE -DUNIV_HPUX";; CFLAGS="$CFLAGS -DUNIV_MUST_NOT_INLINE -DUNIV_HPUX";;
aix*)
CFLAGS="$CFLAGS -DUNIV_AIX";;
irix*) irix*)
CFLAGS="$CFLAGS -DUNIV_MUST_NOT_INLINE";; CFLAGS="$CFLAGS -DUNIV_MUST_NOT_INLINE";;
osf*) osf*)
......
...@@ -11,6 +11,7 @@ Created 10/21/1995 Heikki Tuuri ...@@ -11,6 +11,7 @@ Created 10/21/1995 Heikki Tuuri
#include "ut0mem.h" #include "ut0mem.h"
#include "srv0srv.h" #include "srv0srv.h"
#include "fil0fil.h" #include "fil0fil.h"
#include "buf0buf.h"
#undef HAVE_FDATASYNC #undef HAVE_FDATASYNC
...@@ -2108,6 +2109,7 @@ os_aio_simulated_handle( ...@@ -2108,6 +2109,7 @@ os_aio_simulated_handle(
ibool ret; ibool ret;
ulint n; ulint n;
ulint i; ulint i;
ulint len2;
segment = os_aio_get_array_and_local_segment(&array, global_segment); segment = os_aio_get_array_and_local_segment(&array, global_segment);
...@@ -2263,6 +2265,29 @@ consecutive_loop: ...@@ -2263,6 +2265,29 @@ consecutive_loop:
/* Do the i/o with ordinary, synchronous i/o functions: */ /* Do the i/o with ordinary, synchronous i/o functions: */
if (slot->type == OS_FILE_WRITE) { if (slot->type == OS_FILE_WRITE) {
if (array == os_aio_write_array) {
/* Do a 'last millisecond' check that the page end
is sensible; reported page checksum errors from
Linux seem to wipe over the page end */
for (len2 = 0; len2 + UNIV_PAGE_SIZE <= total_len;
len2 += UNIV_PAGE_SIZE) {
if (mach_read_from_4(combined_buf + len2
+ FIL_PAGE_LSN + 4)
!= mach_read_from_4(combined_buf + len2
+ UNIV_PAGE_SIZE
- FIL_PAGE_END_LSN + 4)) {
ut_print_timestamp(stderr);
fprintf(stderr,
" InnoDB: ERROR: The page to be written seems corrupt!\n");
page_print(combined_buf + len2);
fprintf(stderr,
"InnoDB: ERROR: The page to be written seems corrupt!\n");
}
}
}
ret = os_file_write(slot->name, slot->file, combined_buf, ret = os_file_write(slot->name, slot->file, combined_buf,
slot->offset, slot->offset_high, total_len); slot->offset, slot->offset_high, total_len);
} else { } else {
......
...@@ -128,8 +128,28 @@ os_thread_create( ...@@ -128,8 +128,28 @@ os_thread_create(
pthread_attr_init(&attr); pthread_attr_init(&attr);
#ifdef UNIV_AIX
/* We must make sure a thread stack is at least 32 kB, otherwise
InnoDB might crash; we do not know if the default stack size on
AIX is always big enough. An empirical test on AIX-4.3 suggested
the size was 96 kB, though. */
ret = pthread_attr_setstacksize(&attr,
(size_t)(PTHREAD_STACK_MIN + 32 * 1024));
if (ret) {
fprintf(stderr,
"InnoDB: Error: pthread_attr_setstacksize returned %d\n", ret);
exit(1);
}
#endif
ret = pthread_create(&pthread, &attr, start_f, arg); ret = pthread_create(&pthread, &attr, start_f, arg);
if (ret) {
fprintf(stderr,
"InnoDB: Error: pthread_create returned %d\n", ret);
exit(1);
}
pthread_attr_destroy(&attr); pthread_attr_destroy(&attr);
if (srv_set_thread_priorities) { if (srv_set_thread_priorities) {
......
This diff is collapsed.
This diff is collapsed.
...@@ -13,8 +13,6 @@ the InnoDB parser. ...@@ -13,8 +13,6 @@ the InnoDB parser.
%{ %{
/* The value of the semantic attribute is a pointer to a query tree node /* The value of the semantic attribute is a pointer to a query tree node
que_node_t */ que_node_t */
#define YYSTYPE que_node_t*
#define alloca mem_alloc
#include <math.h> #include <math.h>
...@@ -25,6 +23,8 @@ que_node_t */ ...@@ -25,6 +23,8 @@ que_node_t */
#include "que0que.h" #include "que0que.h"
#include "row0sel.h" #include "row0sel.h"
#define YYSTYPE que_node_t*
/* #define __STDC__ */ /* #define __STDC__ */
int int
......
...@@ -26,6 +26,8 @@ How to make the InnoDB parser and lexer C files: ...@@ -26,6 +26,8 @@ How to make the InnoDB parser and lexer C files:
5. Rename lex.yy.c to lexyy.c. 5. Rename lex.yy.c to lexyy.c.
6. Remove the #include of unistd.h from about line 2500 of lexyy.c
These instructions seem to work at least with bison-1.28 and flex-2.5.4 on These instructions seem to work at least with bison-1.28 and flex-2.5.4 on
Linux. Linux.
*******************************************************/ *******************************************************/
......
...@@ -1348,7 +1348,9 @@ row_create_table_for_mysql( ...@@ -1348,7 +1348,9 @@ row_create_table_for_mysql(
"InnoDB: creating an InnoDB table with the same name in another\n" "InnoDB: creating an InnoDB table with the same name in another\n"
"InnoDB: database and moving the .frm file to the current database.\n" "InnoDB: database and moving the .frm file to the current database.\n"
"InnoDB: Then MySQL thinks the table exists, and DROP TABLE will\n" "InnoDB: Then MySQL thinks the table exists, and DROP TABLE will\n"
"InnoDB: succeed.\n"); "InnoDB: succeed.\n"
"InnoDB: You can look further help from section 15.1 of\n"
"InnoDB: http://www.innodb.com/ibman.html\n");
} }
trx->error_state = DB_SUCCESS; trx->error_state = DB_SUCCESS;
...@@ -1867,7 +1869,9 @@ row_drop_table_for_mysql( ...@@ -1867,7 +1869,9 @@ row_drop_table_for_mysql(
" InnoDB: Error: table %s does not exist in the InnoDB internal\n" " InnoDB: Error: table %s does not exist in the InnoDB internal\n"
"InnoDB: data dictionary though MySQL is trying to drop it.\n" "InnoDB: data dictionary though MySQL is trying to drop it.\n"
"InnoDB: Have you copied the .frm file of the table to the\n" "InnoDB: Have you copied the .frm file of the table to the\n"
"InnoDB: MySQL database directory from another database?\n", "InnoDB: MySQL database directory from another database?\n"
"InnoDB: You can look further help from section 15.1 of\n"
"InnoDB: http://www.innodb.com/ibman.html\n",
name); name);
goto funct_exit; goto funct_exit;
} }
...@@ -2189,7 +2193,9 @@ row_rename_table_for_mysql( ...@@ -2189,7 +2193,9 @@ row_rename_table_for_mysql(
fprintf(stderr, fprintf(stderr,
" InnoDB: Error: table %s exists in the InnoDB internal data\n" " InnoDB: Error: table %s exists in the InnoDB internal data\n"
"InnoDB: dictionary though MySQL is trying rename table %s to it.\n" "InnoDB: dictionary though MySQL is trying rename table %s to it.\n"
"InnoDB: Have you deleted the .frm file and not used DROP TABLE?\n", "InnoDB: Have you deleted the .frm file and not used DROP TABLE?\n"
"InnoDB: You can look further help from section 15.1 of\n"
"InnoDB: http://www.innodb.com/ibman.html\n",
new_name, old_name); new_name, old_name);
fprintf(stderr, fprintf(stderr,
......
objid tablename oid test
1 t1 4 9
2 metatable 1 9
3 metaindex 1 9
objid tablename oid
1 t1 4
2 metatable 1
3 metaindex 1
-- source include/have_bdb.inc
#
# Small basic test for ALTER TABLE bug ..
#
drop table if exists t1;
create table t1(objid BIGINT not null, tablename varchar(64), oid BIGINT not null, test BIGINT, PRIMARY KEY (objid), UNIQUE(tablename)) type=BDB;
insert into t1 values(1, 't1',4,9);
insert into t1 values(2, 'metatable',1,9);
insert into t1 values(3, 'metaindex',1,9 );
select * from t1;
alter table t1 drop column test;
-- source include/have_bdb.inc
select * from t1;
drop table t1;
\ No newline at end of file
...@@ -971,7 +971,9 @@ Cannot find table %s from the internal data dictionary\n\ ...@@ -971,7 +971,9 @@ Cannot find table %s from the internal data dictionary\n\
of InnoDB though the .frm file for the table exists. Maybe you\n\ of InnoDB though the .frm file for the table exists. Maybe you\n\
have deleted and recreated InnoDB data files but have forgotten\n\ have deleted and recreated InnoDB data files but have forgotten\n\
to delete the corresponding .frm files of InnoDB tables, or you\n\ to delete the corresponding .frm files of InnoDB tables, or you\n\
have moved .frm files to another database?", have moved .frm files to another database?\n\
Look from section 15.1 of http://www.innodb.com/ibman.html\n\
how you can resolve the problem.\n",
norm_name); norm_name);
free_share(share); free_share(share);
......
...@@ -1665,11 +1665,6 @@ int mysql_alter_table(THD *thd,char *new_db, char *new_name, ...@@ -1665,11 +1665,6 @@ int mysql_alter_table(THD *thd,char *new_db, char *new_name,
VOID(pthread_cond_broadcast(&COND_refresh)); VOID(pthread_cond_broadcast(&COND_refresh));
goto err; goto err;
} }
#ifdef HAVE_BERKELEY_DB
extern bool berkeley_flush_logs(void);
if (old_db_type == DB_TYPE_BERKELEY_DB && berkeley_flush_logs())
goto err;
#endif
thd->proc_info="end"; thd->proc_info="end";
mysql_update_log.write(thd, thd->query,thd->query_length); mysql_update_log.write(thd, thd->query,thd->query_length);
if (mysql_bin_log.is_open()) if (mysql_bin_log.is_open())
...@@ -1679,6 +1674,14 @@ int mysql_alter_table(THD *thd,char *new_db, char *new_name, ...@@ -1679,6 +1674,14 @@ int mysql_alter_table(THD *thd,char *new_db, char *new_name,
} }
VOID(pthread_cond_broadcast(&COND_refresh)); VOID(pthread_cond_broadcast(&COND_refresh));
VOID(pthread_mutex_unlock(&LOCK_open)); VOID(pthread_mutex_unlock(&LOCK_open));
#ifdef HAVE_BERKELEY_DB
extern bool berkeley_flush_logs(void);
if (old_db_type == DB_TYPE_BERKELEY_DB)
{
(void)berkeley_flush_logs();
table=open_ltable(thd,table_list,TL_READ);
}
#endif
end_temporary: end_temporary:
sprintf(tmp_name,ER(ER_INSERT_INFO),(ulong) (copied+deleted), sprintf(tmp_name,ER(ER_INSERT_INFO),(ulong) (copied+deleted),
......
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