Below is the list of changes that have just been committed into a local
5.1 repository of tsmith. When tsmith does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet@stripped, 2007-01-18 10:30:39-07:00, tsmith@stripped +16 -0
Merge siva.hindu.god:/home/tsmith/m/bk/mrg-jan17/51
into siva.hindu.god:/home/tsmith/m/bk/mrg-jan17/maint/51
MERGE: 1.2402.2.3
client/mysqlbinlog.cc@stripped, 2007-01-18 10:18:56-07:00, tsmith@stripped +0 -0
Auto merged
MERGE: 1.138.1.3
configure.in@stripped, 2007-01-18 10:18:56-07:00, tsmith@stripped +0 -0
Auto merged
MERGE: 1.415.2.2
include/config-win.h@stripped, 2007-01-18 10:18:56-07:00, tsmith@stripped +0 -0
Auto merged
MERGE: 1.91.1.3
include/my_global.h@stripped, 2007-01-18 10:18:56-07:00, tsmith@stripped +0 -0
Auto merged
MERGE: 1.152.1.5
include/my_pthread.h@stripped, 2007-01-18 10:18:56-07:00, tsmith@stripped +0 -0
Auto merged
MERGE: 1.98.1.6
mysql-test/extra/binlog_tests/mix_innodb_myisam_binlog.test@stripped, 2007-01-18 10:18:56-07:00, tsmith@stripped +0 -0
Auto merged
MERGE: 1.31.1.1
mysql-test/mysql-test-run.pl@stripped, 2007-01-18 10:18:56-07:00, tsmith@stripped +0 -0
Auto merged
MERGE: 1.259.1.2
mysql-test/t/disabled.def@stripped, 2007-01-18 10:18:57-07:00, tsmith@stripped +0 -0
Auto merged
MERGE: 1.224.1.1
sql/field.cc@stripped, 2007-01-18 10:18:57-07:00, tsmith@stripped +0 -0
Auto merged
MERGE: 1.362.1.2
sql/field.h@stripped, 2007-01-18 10:18:57-07:00, tsmith@stripped +0 -0
Auto merged
MERGE: 1.199.1.3
sql/log_event.cc@stripped, 2007-01-18 10:18:57-07:00, tsmith@stripped +0 -1
Auto merged
MERGE: 1.252.1.12
sql/mysqld.cc@stripped, 2007-01-18 10:18:57-07:00, tsmith@stripped +0 -0
Auto merged
MERGE: 1.599.1.7
sql/sql_class.h@stripped, 2007-01-18 10:18:58-07:00, tsmith@stripped +0 -0
Auto merged
MERGE: 1.341.1.2
sql/sql_parse.cc@stripped, 2007-01-18 10:18:58-07:00, tsmith@stripped +0 -0
Auto merged
MERGE: 1.611.1.12
sql/table.cc@stripped, 2007-01-18 10:18:58-07:00, tsmith@stripped +0 -0
Auto merged
MERGE: 1.265.1.3
storage/myisam/mi_packrec.c@stripped, 2007-01-18 10:30:31-07:00, tsmith@stripped +0 -1
Use local
MERGE: 1.43.1.1
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: tsmith
# Host: siva.hindu.god
# Root: /home/tsmith/m/bk/mrg-jan17/maint/51/RESYNC
--- 1.93/include/config-win.h 2007-01-12 04:24:31 -07:00
+++ 1.94/include/config-win.h 2007-01-18 10:18:56 -07:00
@@ -248,7 +248,6 @@
#define tell(A) _telli64(A)
#endif
-#define set_timespec(ABSTIME,SEC) { (ABSTIME).tv_sec=time((time_t*)0) + (time_t) (SEC); (ABSTIME).tv_nsec=0; }
#define STACK_DIRECTION -1
--- 1.101/include/my_pthread.h 2007-01-17 11:45:38 -07:00
+++ 1.102/include/my_pthread.h 2007-01-18 10:18:56 -07:00
@@ -73,16 +73,41 @@
} pthread_cond_t;
-struct timespec { /* For pthread_cond_timedwait() */
- time_t tv_sec;
- long tv_nsec;
-};
-
typedef int pthread_mutexattr_t;
#define win_pthread_self my_thread_var->pthread_self
#define pthread_handler_t EXTERNC void * __cdecl
typedef void * (__cdecl *pthread_handler)(void *);
+/*
+ Struct and macros to be used in combination with the
+ windows implementation of pthread_cond_timedwait
+*/
+
+/*
+ Declare a union to make sure FILETIME is properly aligned
+ so it can be used directly as a 64 bit value. The value
+ stored is in 100ns units.
+ */
+ union ft64 {
+ FILETIME ft;
+ __int64 i64;
+ };
+struct timespec {
+ union ft64 tv;
+ /* The max timeout value in millisecond for pthread_cond_timedwait */
+ long max_timeout_msec;
+};
+#define set_timespec(ABSTIME,SEC) { \
+ GetSystemTimeAsFileTime(&((ABSTIME).tv.ft)); \
+ (ABSTIME).tv.i64+= (__int64)(SEC)*10000000; \
+ (ABSTIME).max_timeout_msec= (long)((SEC)*1000); \
+}
+#define set_timespec_nsec(ABSTIME,NSEC) { \
+ GetSystemTimeAsFileTime(&((ABSTIME).tv.ft)); \
+ (ABSTIME).tv.i64+= (__int64)(NSEC)/100; \
+ (ABSTIME).max_timeout_msec= (long)((NSEC)/1000000); \
+}
+
void win_pthread_init(void);
int win_pthread_setspecific(void *A,void *B,uint length);
int pthread_create(pthread_t *,pthread_attr_t *,pthread_handler,void *);
@@ -158,8 +183,6 @@
#define pthread_condattr_init(A)
#define pthread_condattr_destroy(A)
-/*Irena: compiler does not like this: */
-/*#define my_pthread_getprio(pthread_t thread_id) pthread_dummy(0) */
#define my_pthread_getprio(thread_id) pthread_dummy(0)
#else /* Normal threads */
@@ -383,6 +406,47 @@
#define pthread_mutex_trylock(a) my_pthread_mutex_trylock((a))
int my_pthread_mutex_trylock(pthread_mutex_t *mutex);
#endif
+
+/*
+ The defines set_timespec and set_timespec_nsec should be used
+ for calculating an absolute time at which
+ pthread_cond_timedwait should timeout
+*/
+#ifdef HAVE_TIMESPEC_TS_SEC
+#ifndef set_timespec
+#define set_timespec(ABSTIME,SEC) \
+{ \
+ (ABSTIME).ts_sec=time(0) + (time_t) (SEC); \
+ (ABSTIME).ts_nsec=0; \
+}
+#endif /* !set_timespec */
+#ifndef set_timespec_nsec
+#define set_timespec_nsec(ABSTIME,NSEC) \
+{ \
+ ulonglong now= my_getsystime() + (NSEC/100); \
+ (ABSTIME).ts_sec= (now / ULL(10000000)); \
+ (ABSTIME).ts_nsec= (now % ULL(10000000) * 100 + ((NSEC) % 100)); \
+}
+#endif /* !set_timespec_nsec */
+#else
+#ifndef set_timespec
+#define set_timespec(ABSTIME,SEC) \
+{\
+ struct timeval tv;\
+ gettimeofday(&tv,0);\
+ (ABSTIME).tv_sec=tv.tv_sec+(time_t) (SEC);\
+ (ABSTIME).tv_nsec=tv.tv_usec*1000;\
+}
+#endif /* !set_timespec */
+#ifndef set_timespec_nsec
+#define set_timespec_nsec(ABSTIME,NSEC) \
+{\
+ ulonglong now= my_getsystime() + (NSEC/100); \
+ (ABSTIME).tv_sec= (time_t) (now / ULL(10000000)); \
+ (ABSTIME).tv_nsec= (long) (now % ULL(10000000) * 100 + ((NSEC) % 100)); \
+}
+#endif /* !set_timespec_nsec */
+#endif /* HAVE_TIMESPEC_TS_SEC */
/* safe_mutex adds checking to mutex for easier debugging */
--- 1.44/storage/myisam/mi_packrec.c 2007-01-17 12:47:47 -07:00
+++ 1.45/storage/myisam/mi_packrec.c 2007-01-18 10:30:31 -07:00
@@ -591,9 +591,8 @@
static uint copy_decode_table(uint16 *to_pos, uint offset,
uint16 *decode_table)
{
- uint prev_offset;
+ uint prev_offset= offset;
DBUG_ENTER("copy_decode_table");
- prev_offset= offset;
/* Descent on the left side. */
if (!(*decode_table & IS_CHAR))
--- 1.366/sql/field.cc 2007-01-18 08:33:29 -07:00
+++ 1.367/sql/field.cc 2007-01-18 10:18:57 -07:00
@@ -8534,10 +8534,12 @@
void Field_bit::set_default()
{
- my_ptrdiff_t const offset= (my_ptrdiff_t) (table->s->default_values -
- table->record[0]);
- uchar bits= (uchar) get_rec_bits(bit_ptr + offset, bit_ofs, bit_len);
- set_rec_bits(bits, bit_ptr, bit_ofs, bit_len);
+ if (bit_len > 0)
+ {
+ my_ptrdiff_t const offset= table->s->default_values - table->record[0];
+ uchar bits= get_rec_bits(bit_ptr + offset, bit_ofs, bit_len);
+ set_rec_bits(bits, bit_ptr, bit_ofs, bit_len);
+ }
Field::set_default();
}
--- 1.204/sql/field.h 2007-01-18 08:33:30 -07:00
+++ 1.205/sql/field.h 2007-01-18 10:18:57 -07:00
@@ -1505,6 +1505,13 @@
};
+/**
+ BIT field represented as chars for non-MyISAM tables.
+
+ @todo The inheritance relationship is backwards since Field_bit is
+ an extended version of Field_bit_as_char and not the other way
+ around. Hence, we should refactor it to fix the hierarchy order.
+ */
class Field_bit_as_char: public Field_bit {
public:
Field_bit_as_char(char *ptr_arg, uint32 len_arg, uchar *null_ptr_arg,
--- 1.262/sql/log_event.cc 2007-01-17 11:48:31 -07:00
+++ 1.263/sql/log_event.cc 2007-01-18 10:18:57 -07:00
@@ -5606,8 +5606,8 @@
if (bitmap_is_set(cols, field_ptr - begin_ptr))
{
DBUG_ASSERT((const char *)table->record[0] <= f->ptr);
- DBUG_ASSERT(f->ptr < ((const char *)table->record[0] + table->s->reclength +
- (f->pack_length_in_rec() == 0)));
+ DBUG_ASSERT(f->ptr < (char*)(table->record[0] + table->s->reclength +
+ (f->pack_length_in_rec() == 0)));
DBUG_PRINT("info", ("unpacking column '%s' to 0x%lx", f->field_name,
(long) f->ptr));
--- 1.602/sql/mysqld.cc 2007-01-17 11:32:06 -07:00
+++ 1.603/sql/mysqld.cc 2007-01-18 10:18:57 -07:00
@@ -3467,6 +3467,9 @@
int main(int argc, char **argv)
#endif
{
+ MY_INIT(argv[0]); // init my_sys library & pthreads
+ /* nothing should come before this line ^^^ */
+
rpl_filter= new Rpl_filter;
binlog_filter= new Rpl_filter;
if (!rpl_filter || !binlog_filter)
@@ -3474,8 +3477,6 @@
sql_perror("Could not allocate replication and binlog filters");
exit(1);
}
-
- MY_INIT(argv[0]); // init my_sys library & pthreads
/*
Perform basic logger initialization logger. Should be called after
--- 1.616/sql/sql_parse.cc 2007-01-17 11:45:40 -07:00
+++ 1.617/sql/sql_parse.cc 2007-01-18 10:18:58 -07:00
@@ -2955,6 +2955,12 @@
goto end_with_restore_list;
#ifndef HAVE_READLINK
+ if (lex->create_info.data_file_name)
+ push_warning(thd, MYSQL_ERROR::WARN_LEVEL_WARN, 0,
+ "DATA DIRECTORY option ignored");
+ if (lex->create_info.index_file_name)
+ push_warning(thd, MYSQL_ERROR::WARN_LEVEL_WARN, 0,
+ "INDEX DIRECTORY option ignored");
lex->create_info.data_file_name=lex->create_info.index_file_name=0;
#else
/* Fix names if symlinked tables */
--- 1.267/sql/table.cc 2007-01-18 07:53:37 -07:00
+++ 1.268/sql/table.cc 2007-01-18 10:18:58 -07:00
@@ -122,7 +122,6 @@
share->version= refresh_version;
share->flush_version= flush_version;
-#ifdef HAVE_ROW_BASED_REPLICATION
/*
This constant is used to mark that no table map version has been
assigned. No arithmetic is done on the value: it will be
@@ -140,8 +139,6 @@
share->table_map_id= ~0UL;
share->cached_row_logging_check= -1;
-#endif
-
memcpy((char*) &share->mem_root, (char*) &mem_root, sizeof(mem_root));
pthread_mutex_init(&share->mutex, MY_MUTEX_INIT_FAST);
pthread_cond_init(&share->cond, NULL);
@@ -193,7 +190,6 @@
share->path.length= share->normalized_path.length= strlen(path);
share->frm_version= FRM_VER_TRUE_VARCHAR;
-#ifdef HAVE_ROW_BASED_REPLICATION
/*
Temporary tables are not replicated, but we set up these fields
anyway to be able to catch errors.
@@ -201,7 +197,6 @@
share->table_map_version= ~(ulonglong)0;
share->table_map_id= ~0UL;
share->cached_row_logging_check= -1;
-#endif
DBUG_VOID_RETURN;
}
--- 1.260/mysql-test/mysql-test-run.pl 2007-01-12 04:24:31 -07:00
+++ 1.261/mysql-test/mysql-test-run.pl 2007-01-18 10:18:56 -07:00
@@ -160,6 +160,7 @@
our $exe_my_print_defaults;
our $exe_perror;
our $lib_udf_example;
+our $lib_example_plugin;
our $exe_libtool;
our $opt_bench= 0;
@@ -231,10 +232,12 @@
our $opt_record;
my $opt_report_features;
our $opt_check_testcases;
+our $opt_mark_progress;
our $opt_skip;
our $opt_skip_rpl;
our $max_slave_num= 0;
+our $max_master_num= 1;
our $use_innodb;
our $opt_skip_test;
our $opt_skip_im;
@@ -413,6 +416,15 @@
$max_slave_num= $test->{slave_num};
mtr_error("Too many slaves") if $max_slave_num > 3;
}
+
+ # Count max number of masters used by a test case
+ if ( $test->{master_num} > $max_master_num)
+ {
+ $max_master_num= $test->{master_num};
+ mtr_error("Too many masters") if $max_master_num > 2;
+ mtr_error("Too few masters") if $max_master_num < 1;
+ }
+
$use_innodb||= $test->{'innodb_test'};
}
@@ -536,6 +548,7 @@
# Test case authoring
'record' => \$opt_record,
'check-testcases' => \$opt_check_testcases,
+ 'mark-progress' => \$opt_mark_progress,
# Extra options used when starting mysqld
'mysqld=s' => \@opt_extra_mysqld_opt,
@@ -1211,6 +1224,19 @@
$path_ndb_testrun_log= "$opt_vardir/log/ndb_testrun.log";
$path_snapshot= "$opt_tmpdir/snapshot_$opt_master_myport/";
+
+ if ( $opt_valgrind and $opt_debug )
+ {
+ # When both --valgrind and --debug is selected, send
+ # all output to the trace file, making it possible to
+ # see the exact location where valgrind complains
+ foreach my $mysqld (@{$master}, @{$slave})
+ {
+ my $sidx= $mysqld->{idx} ? "$mysqld->{idx}" : "";
+ $mysqld->{path_myerr}=
+ "$opt_vardir/log/" . $mysqld->{type} . "$sidx.trace";
+ }
+ }
}
#
@@ -1259,9 +1285,10 @@
sub datadir_list_setup () {
# Make a list of all data_dirs
- @data_dir_lst = (
- $master->[0]->{'path_myddir'},
- $master->[1]->{'path_myddir'});
+ for (my $idx= 0; $idx < $max_master_num; $idx++)
+ {
+ push(@data_dir_lst, $master->[$idx]->{'path_myddir'});
+ }
for (my $idx= 0; $idx < $max_slave_num; $idx++)
{
@@ -1499,6 +1526,11 @@
mtr_file_exists(vs_config_dirs('sql', 'udf_example.dll'),
"$glob_basedir/sql/.libs/udf_example.so",);
+ # Look for the ha_example library
+ $lib_example_plugin=
+ mtr_file_exists(vs_config_dirs('storage/example', 'ha_example.dll'),
+ "$glob_basedir/storage/example/.libs/ha_example.so",);
+
# Look for mysqltest executable
if ( $glob_use_embedded_server )
{
@@ -1655,6 +1687,14 @@
}
# --------------------------------------------------------------------------
+ # Add the path where mysqld will find ha_example.so
+ # --------------------------------------------------------------------------
+ if ( $lib_example_plugin )
+ {
+ push(@ld_library_paths, dirname($lib_example_plugin));
+ }
+
+ # --------------------------------------------------------------------------
# Valgrind need to be run with debug libraries otherwise it's almost
# impossible to add correct supressions, that means if "/usr/lib/debug"
# is available, it should be added to
@@ -1928,10 +1968,11 @@
$ENV{'UDF_EXAMPLE_LIB'}=
($lib_udf_example ? basename($lib_udf_example) : "");
- $ENV{'LD_LIBRARY_PATH'}=
- ($lib_udf_example ? dirname($lib_udf_example) : "") .
- ($ENV{'LD_LIBRARY_PATH'} ? ":$ENV{'LD_LIBRARY_PATH'}" : "");
-
+ # ----------------------------------------------------
+ # Add the path where mysqld will find ha_example.so
+ # ----------------------------------------------------
+ $ENV{'EXAMPLE_PLUGIN'}=
+ ($lib_example_plugin ? basename($lib_example_plugin) : "");
# ----------------------------------------------------
# We are nice and report a bit about our settings
@@ -2730,8 +2771,10 @@
install_db('master', $master->[0]->{'path_myddir'});
- # FIXME check if testcase really is using second master
- copy_install_db('master', $master->[1]->{'path_myddir'});
+ if ($max_master_num)
+ {
+ copy_install_db('master', $master->[1]->{'path_myddir'});
+ }
# Install the number of slave databses needed
for (my $idx= 0; $idx < $max_slave_num; $idx++)
@@ -3540,11 +3583,10 @@
if ( $glob_use_embedded_server )
{
$prefix= "--server-arg=";
- } else {
- # We can't pass embedded server --no-defaults
- mtr_add_arg($args, "--no-defaults");
}
+ mtr_add_arg($args, "%s--no-defaults", $prefix);
+
mtr_add_arg($args, "%s--console", $prefix);
mtr_add_arg($args, "%s--basedir=%s", $prefix, $path_my_basedir);
mtr_add_arg($args, "%s--character-sets-dir=%s", $prefix, $path_charsetsdir);
@@ -3623,6 +3665,9 @@
# Turn on logging, will be sent to tables
mtr_add_arg($args, "%s--log=", $prefix);
}
+
+ mtr_add_arg($args, "%s--plugin_dir=%s", $prefix,
+ dirname($lib_example_plugin));
}
if ( $type eq 'slave' )
@@ -4273,7 +4318,8 @@
}
- if ( $clusters->[0]->{'pid'} and ! $master->[1]->{'pid'} )
+ if ( $clusters->[0]->{'pid'} and ! $master->[1]->{'pid'} and
+ $tinfo->{'master_num'} > 1 )
{
# Test needs cluster, start an extra mysqld connected to cluster
@@ -4485,6 +4531,10 @@
mtr_add_arg($args, "--character-sets-dir=%s", $path_charsetsdir);
mtr_add_arg($args, "--logdir=%s/log", $opt_vardir);
+ # Log line number and time for each line in .test file
+ mtr_add_arg($args, "--mark-progress")
+ if $opt_mark_progress;
+
if ($tinfo->{'component_id'} eq 'im')
{
mtr_add_arg($args, "--socket=%s", $instance_manager->{'path_sock'});
@@ -4940,6 +4990,7 @@
record TESTNAME (Re)genereate the result file for TESTNAME
check-testcases Check testcases for sideeffects
+ mark-progress Log line number and elapsed time to <testname>.progress
Options that pass on options
--- 1.226/mysql-test/t/disabled.def 2007-01-17 11:45:38 -07:00
+++ 1.227/mysql-test/t/disabled.def 2007-01-18 10:18:57 -07:00
@@ -38,4 +38,5 @@
flush2 : Bug#24805 Pushbuild can't handle test with --disable-log-bin
mysql_upgrade : Bug#25074 mysql_upgrade gives inconsisten results
+plugin : Bug#25659 memory leak via "plugins" test
--- 1.154/include/my_global.h 2007-01-12 04:24:31 -07:00
+++ 1.155/include/my_global.h 2007-01-18 10:18:56 -07:00
@@ -1138,41 +1138,7 @@
#define MY_HOW_OFTEN_TO_ALARM 2 /* How often we want info on screen */
#define MY_HOW_OFTEN_TO_WRITE 1000 /* How often we want info on screen */
-#ifdef HAVE_TIMESPEC_TS_SEC
-#ifndef set_timespec
-#define set_timespec(ABSTIME,SEC) \
-{ \
- (ABSTIME).ts_sec=time(0) + (time_t) (SEC); \
- (ABSTIME).ts_nsec=0; \
-}
-#endif /* !set_timespec */
-#ifndef set_timespec_nsec
-#define set_timespec_nsec(ABSTIME,NSEC) \
-{ \
- ulonglong now= my_getsystime() + (NSEC/100); \
- (ABSTIME).ts_sec= (now / ULL(10000000)); \
- (ABSTIME).ts_nsec= (now % ULL(10000000) * 100 + ((NSEC) % 100)); \
-}
-#endif /* !set_timespec_nsec */
-#else
-#ifndef set_timespec
-#define set_timespec(ABSTIME,SEC) \
-{\
- struct timeval tv;\
- gettimeofday(&tv,0);\
- (ABSTIME).tv_sec=tv.tv_sec+(time_t) (SEC);\
- (ABSTIME).tv_nsec=tv.tv_usec*1000;\
-}
-#endif /* !set_timespec */
-#ifndef set_timespec_nsec
-#define set_timespec_nsec(ABSTIME,NSEC) \
-{\
- ulonglong now= my_getsystime() + (NSEC/100); \
- (ABSTIME).tv_sec= (time_t) (now / ULL(10000000)); \
- (ABSTIME).tv_nsec= (long) (now % ULL(10000000) * 100 + ((NSEC) % 100)); \
-}
-#endif /* !set_timespec_nsec */
-#endif /* HAVE_TIMESPEC_TS_SEC */
+
/*
Define-funktions for reading and storing in machine independent format
| Thread |
|---|
| • bk commit into 5.1 tree (tsmith:1.2408) | tim | 18 Jan |