From 577a20f0943006687059981949d3c93cb2ae58ab Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 25 Jan 2005 12:24:50 -0800 Subject: Add BUG# to subject and X-Bug header for all outgoing emails re: bug fixes, and update the URL for the manual page on installing from the source tree. Fake bug number for testing: Bug #1234 BitKeeper/triggers/post-commit: Update URL for docs page --- BitKeeper/triggers/post-commit | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/BitKeeper/triggers/post-commit b/BitKeeper/triggers/post-commit index 1c4608835d6..5dc351024e0 100755 --- a/BitKeeper/triggers/post-commit +++ b/BitKeeper/triggers/post-commit @@ -20,13 +20,19 @@ if [ "$BK_STATUS" = OK ] then CHANGESET=`bk -R prs -r+ -h -d':P:::I:' ChangeSet` -BUG=`bk -R prs -r+ -h -d':C:' ChangeSet | sed -ne 's/^.*[Bb][Uu][Gg] *# *\([0-9][0-9]*\).*$/ BUG#\1/p'` +BUG=`bk -R prs -r+ -h -d':C:' ChangeSet | sed -ne 's/^.*[Bb][Uu][Gg] *# *\([0-9][0-9]*\).*$/\1/p'` if [ "$BUG" = "" ] then TO=dev-public@mysql.com + BS="" + BH="" else TO=dev-bugs@mysql.com + BS=" BUG#$BUG" +# need newline here + BH="X-Bug: $BUG +" fi #++ # dev-public@ / dev-bugs@ @@ -37,8 +43,8 @@ fi List-ID: From: $FROM To: $TO -Subject: bk commit - $VERSION tree ($CHANGESET)$BUG - +Subject: bk commit - $VERSION tree ($CHANGESET)$BS +$BH EOF bk changes -v -r+ bk cset -r+ -d @@ -53,14 +59,15 @@ EOF List-ID: From: $FROM To: $INTERNALS -Subject: bk commit into $VERSION tree ($CHANGESET) +Subject: bk commit into $VERSION tree ($CHANGESET)$BS +$BH Below is the list of changes that have just been committed into a local $VERSION repository of $USER. When $USER 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://www.mysql.com/doc/I/n/Installing_source_tree.html +see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html EOF bk changes -v -r+ @@ -80,7 +87,7 @@ EOF List-ID: From: $FROM To: $DOCS -Subject: bk commit - $VERSION tree (Manual) ($CHANGESET) +Subject: bk commit - $VERSION tree (Manual) ($CHANGESET)$BS EOF bk changes -v -r+ -- cgit v1.2.1 From bdecd73e1a795cfc227e94f9a1b05089dd9f7f5b Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 1 Feb 2005 18:35:09 +0400 Subject: A fix (bug #7971: set_bit/clear_bit names conflict w/Linux kernel headers >= 2.6.9-rcxx) extra/replace.c: A fix (bug #7971: set_bit/clear_bit names conflict w/Linux kernel headers >= 2.6.9-rcxx) set_bit replaced with internal_set_bit clear_bit replaced with internal_clear_bit --- extra/replace.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/extra/replace.c b/extra/replace.c index 5444f443382..706d4941768 100644 --- a/extra/replace.c +++ b/extra/replace.c @@ -376,8 +376,8 @@ static REP_SET *make_new_set(REP_SETS *sets); static void make_sets_invisible(REP_SETS *sets); static void free_last_set(REP_SETS *sets); static void free_sets(REP_SETS *sets); -static void set_bit(REP_SET *set, uint bit); -static void clear_bit(REP_SET *set, uint bit); +static void internal_set_bit(REP_SET *set, uint bit); +static void internal_clear_bit(REP_SET *set, uint bit); static void or_bits(REP_SET *to,REP_SET *from); static void copy_bits(REP_SET *to,REP_SET *from); static int cmp_bits(REP_SET *set1,REP_SET *set2); @@ -454,7 +454,7 @@ REPLACE *init_replace(my_string *from, my_string *to,uint count, { if (from[i][0] == '\\' && from[i][1] == '^') { - set_bit(start_states,states+1); + internal_set_bit(start_states,states+1); if (!from[i][2]) { start_states->table_offset=i; @@ -463,8 +463,8 @@ REPLACE *init_replace(my_string *from, my_string *to,uint count, } else if (from[i][0] == '\\' && from[i][1] == '$') { - set_bit(start_states,states); - set_bit(word_states,states); + internal_set_bit(start_states,states); + internal_set_bit(word_states,states); if (!from[i][2] && start_states->table_offset == (uint) ~0) { start_states->table_offset=i; @@ -473,11 +473,11 @@ REPLACE *init_replace(my_string *from, my_string *to,uint count, } else { - set_bit(word_states,states); + internal_set_bit(word_states,states); if (from[i][0] == '\\' && (from[i][1] == 'b' && from[i][2])) - set_bit(start_states,states+1); + internal_set_bit(start_states,states+1); else - set_bit(start_states,states); + internal_set_bit(start_states,states); } for (pos=from[i], len=0; *pos ; pos++) { @@ -583,9 +583,9 @@ REPLACE *init_replace(my_string *from, my_string *to,uint count, follow[i].len > found_end) found_end=follow[i].len; if (chr && follow[i].chr) - set_bit(new_set,i+1); /* To next set */ + internal_set_bit(new_set,i+1); /* To next set */ else - set_bit(new_set,i); + internal_set_bit(new_set,i); } } if (found_end) @@ -602,7 +602,7 @@ REPLACE *init_replace(my_string *from, my_string *to,uint count, if (follow[bit_nr-1].len < found_end || (new_set->found_len && (chr == 0 || !follow[bit_nr].chr))) - clear_bit(new_set,i); + internal_clear_bit(new_set,i); else { if (chr == 0 || !follow[bit_nr].chr) @@ -751,13 +751,13 @@ static void free_sets(REP_SETS *sets) return; } -static void set_bit(REP_SET *set, uint bit) +static void internal_set_bit(REP_SET *set, uint bit) { set->bits[bit / WORD_BIT] |= 1 << (bit % WORD_BIT); return; } -static void clear_bit(REP_SET *set, uint bit) +static void internal_clear_bit(REP_SET *set, uint bit) { set->bits[bit / WORD_BIT] &= ~ (1 << (bit % WORD_BIT)); return; -- cgit v1.2.1 From 8abafe3535367c20c892441b79ea527d099d7186 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 10 Feb 2005 16:56:57 +0100 Subject: Bug#8391 - "merge" fails on Linux/IA64 It was a thread stack overrun. IA64 had its own stack size section already. Enlarged its default stack size from 192K to 256K. --- include/my_pthread.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/my_pthread.h b/include/my_pthread.h index c4138a47b3c..f8cd3e0de71 100644 --- a/include/my_pthread.h +++ b/include/my_pthread.h @@ -637,7 +637,7 @@ extern int pthread_dummy(int); MySQL can survive with 32K, but some glibc libraries require > 128K stack To resolve hostnames */ -#define DEFAULT_THREAD_STACK (192*1024L) +#define DEFAULT_THREAD_STACK (256*1024L) #else #define DEFAULT_THREAD_STACK (192*1024) #endif -- cgit v1.2.1 From 9f4f798049fabca4ef4441ce9583b5c145d572f3 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 10 Feb 2005 21:23:48 +0100 Subject: BUG#6749: If there is no current database, then nothing should be binlogged if binlog-do-db or binlog-ignore-db are in effect. (In the future 5.1? 5.0? I think each statement should be verified against the filtering criteria based on the database it *uses* and not the *current* one. But, right now the *current* database is what counts according to the semantics of the manual.) sql/log.cc: BUG#6749: If there is no current database, then nothing should be binlogged if binlog-do-db or binlog-ignore-db are in effect. (In the future I think that each statement should be verified against the filtering criteria based on the database it *uses* and not the *current* one. But, right now the *current* database is what counts according to the semantics of the manual.) --- sql/log.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sql/log.cc b/sql/log.cc index 38844877f1b..46b44837e0f 100644 --- a/sql/log.cc +++ b/sql/log.cc @@ -1274,7 +1274,7 @@ bool MYSQL_LOG::write(Log_event* event_info) binlog_[wild_]{do|ignore}_table?" (WL#1049)" */ if ((thd && !(thd->options & OPTION_BIN_LOG)) || - (local_db && !db_ok(local_db, binlog_do_db, binlog_ignore_db))) + (!db_ok(local_db, binlog_do_db, binlog_ignore_db))) { VOID(pthread_mutex_unlock(&LOCK_log)); DBUG_PRINT("error",("!db_ok('%s')", local_db)); -- cgit v1.2.1 From f59911fc1ce9abd93775a64e7e8988cfcbd0677f Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 10 Feb 2005 19:04:38 -0800 Subject: Set of fixes requested by Kent in IRC. Tested (except the windows changes since I am trusting Kent...). No windows compiles here folks... VC++Files/tests/mysql_client_test.dsp: fix request by Kent sql/item.cc: fix requested by kent --- VC++Files/tests/mysql_client_test.dsp | 12 ++++++------ sql/item.cc | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/VC++Files/tests/mysql_client_test.dsp b/VC++Files/tests/mysql_client_test.dsp index 07014487bd1..3d1e6728181 100644 --- a/VC++Files/tests/mysql_client_test.dsp +++ b/VC++Files/tests/mysql_client_test.dsp @@ -66,18 +66,18 @@ LINK32=link.exe # PROP Output_Dir ".\Release" # PROP Intermediate_Dir ".\Release" # PROP Target_Dir "" -# ADD BASE CPP /nologo /MTd /I "../include" /I "../" /W3 /Ob1 /G6 /D "DBUG_OFF" /D "_WINDOWS" /D "SAFE_MUTEX" /D "USE_TLS" /D "MYSQL_CLIENT" /D "__WIN__" /D "_WIN32" /GF /Gy /Fp".\Release/client_test.pch" /Fo".\Release/" /Fd".\Release/" /c /GX -# ADD CPP /nologo /MTd /I "../include" /I "../" /W3 /Ob1 /G6 /D "DBUG_OFF" /D "_WINDOWS" /D "SAFE_MUTEX" /D "USE_TLS" /D "MYSQL_CLIENT" /D "__WIN__" /D "_WIN32" /GF /Gy /Fp".\Release/client_test.pch" /Fo".\Release/" /Fd".\Release/" /c /GX -# ADD BASE MTL /nologo /tlb".\Release\client_test.tlb" /win32 -# ADD MTL /nologo /tlb".\Release\client_test.tlb" /win32 +# ADD BASE CPP /nologo /MTd /I "../include" /I "../" /W3 /Ob1 /G6 /D "DBUG_OFF" /D "_WINDOWS" /D "SAFE_MUTEX" /D "USE_TLS" /D "MYSQL_CLIENT" /D "__WIN__" /D "_WIN32" /GF /Gy /Fp".\Release/mysql_client_test.pch" /Fo".\Release/" /Fd".\Release/" /c /GX +# ADD CPP /nologo /MTd /I "../include" /I "../" /W3 /Ob1 /G6 /D "DBUG_OFF" /D "_WINDOWS" /D "SAFE_MUTEX" /D "USE_TLS" /D "MYSQL_CLIENT" /D "__WIN__" /D "_WIN32" /GF /Gy /Fp".\Release/mysql_client_test.pch" /Fo".\Release/" /Fd".\Release/" /c /GX +# ADD BASE MTL /nologo /tlb".\Release\mysql_client_test.tlb" /win32 +# ADD MTL /nologo /tlb".\Release\mysql_client_test.tlb" /win32 # ADD BASE RSC /l 1033 # ADD RSC /l 1033 BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib odbc32.lib odbccp32.lib Ws2_32.lib /nologo /out:"..\tests\client_test.exe" /incremental:no /pdb:".\Release\client_test.pdb" /pdbtype:sept /subsystem:console -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib odbc32.lib odbccp32.lib Ws2_32.lib /nologo /out:"..\tests\client_test.exe" /incremental:no /pdb:".\Release\client_test.pdb" /pdbtype:sept /subsystem:console +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib odbc32.lib odbccp32.lib Ws2_32.lib /nologo /out:"..\tests\mysql_client_test.exe" /incremental:no /pdb:".\Release\mysql_client_test.pdb" /pdbtype:sept /subsystem:console +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib odbc32.lib odbccp32.lib Ws2_32.lib /nologo /out:"..\tests\mysql_client_test.exe" /incremental:no /pdb:".\Release\mysql_client_test.pdb" /pdbtype:sept /subsystem:console !ENDIF diff --git a/sql/item.cc b/sql/item.cc index 17d41fda677..4b3acbe5a3c 100644 --- a/sql/item.cc +++ b/sql/item.cc @@ -2797,7 +2797,7 @@ bool Item_type_holder::join_types(THD *thd, Item *item, TABLE *table) bool use_new_field= 0, use_expression_type= 0; Item_result new_result_type= type_convertor[item_type][item->result_type()]; Field *field= get_holder_example_field(thd, item, table); - bool item_is_a_field= field; + bool item_is_a_field= (field != NULL); /* Check if both items point to fields: in this case we can adjust column types of result table in the union smartly. -- cgit v1.2.1 From 954094562473aad37baf40f97df2a8787eca6f1c Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 10 Feb 2005 22:15:38 -0800 Subject: select.result, select.test: Added a test case for bug #7520. table.cc: Fixed bug #7520. The bug was caused by a wrong calculation of the field max_key_length for a TABLE structure when there was an index on a blob field. sql/table.cc: Fixed bug #7520. The bug was caused by a wrong calculation of the field max_key_length for a TABLE structure when there was an index on a blob field. mysql-test/t/select.test: Added a test case for bug #7520. mysql-test/r/select.result: Added a test case for bug #7520. --- mysql-test/r/select.result | 13 +++++++++++++ mysql-test/t/select.test | 15 +++++++++++++++ sql/table.cc | 1 + 3 files changed, 29 insertions(+) diff --git a/mysql-test/r/select.result b/mysql-test/r/select.result index cc90547722f..4c6ad1c34f0 100644 --- a/mysql-test/r/select.result +++ b/mysql-test/r/select.result @@ -2364,3 +2364,16 @@ EXPLAIN SELECT i FROM t1 WHERE i=1; table type possible_keys key key_len ref rows Extra t1 const PRIMARY PRIMARY 4 const 1 Using index DROP TABLE t1; +CREATE TABLE t1 ( a BLOB, INDEX (a(20)) ); +CREATE TABLE t2 ( a BLOB, INDEX (a(20)) ); +INSERT INTO t1 VALUES ('one'),('two'),('three'),('four'),('five'); +INSERT INTO t2 VALUES ('one'),('two'),('three'),('four'),('five'); +EXPLAIN SELECT * FROM t1 LEFT JOIN t2 USE INDEX (a) ON t1.a=t2.a; +table type possible_keys key key_len ref rows Extra +t1 ALL NULL NULL NULL NULL 5 +t2 ref a a 23 t1.a 5 +EXPLAIN SELECT * FROM t1 LEFT JOIN t2 FORCE INDEX (a) ON t1.a=t2.a; +table type possible_keys key key_len ref rows Extra +t1 ALL NULL NULL NULL NULL 5 +t2 ref a a 23 t1.a 5 +DROP TABLE t1, t2; diff --git a/mysql-test/t/select.test b/mysql-test/t/select.test index e6b1ffbe8d7..9be08b8390b 100644 --- a/mysql-test/t/select.test +++ b/mysql-test/t/select.test @@ -1909,3 +1909,18 @@ EXPLAIN SELECT i FROM t1 WHERE i=1; EXPLAIN SELECT i FROM t1 WHERE i=1; DROP TABLE t1; + +# +# Test case for bug 7520: a wrong cost of the index for a BLOB field +# + +CREATE TABLE t1 ( a BLOB, INDEX (a(20)) ); +CREATE TABLE t2 ( a BLOB, INDEX (a(20)) ); + +INSERT INTO t1 VALUES ('one'),('two'),('three'),('four'),('five'); +INSERT INTO t2 VALUES ('one'),('two'),('three'),('four'),('five'); + +EXPLAIN SELECT * FROM t1 LEFT JOIN t2 USE INDEX (a) ON t1.a=t2.a; +EXPLAIN SELECT * FROM t1 LEFT JOIN t2 FORCE INDEX (a) ON t1.a=t2.a; + +DROP TABLE t1, t2; diff --git a/sql/table.cc b/sql/table.cc index 573fa11a4c4..244c7fa94f3 100644 --- a/sql/table.cc +++ b/sql/table.cc @@ -486,6 +486,7 @@ int openfrm(const char *name, const char *alias, uint db_stat, uint prgflag, if (!(field->flags & BINARY_FLAG)) keyinfo->flags|= HA_END_SPACE_KEY; } + set_if_bigger(outparam->max_key_length, keyinfo->key_length); if (i == 0 && key != primary_key) field->flags |= ((keyinfo->flags & HA_NOSAME) && -- cgit v1.2.1 From d78bd41f554240bbf80b517b62e0556288e908c0 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 10 Feb 2005 23:47:57 -0800 Subject: select.result: Adjusted results of the test case for bug #7520 for 4.1. mysql-test/r/select.result: Adjusted results of the test case for bug #7520 for 4.1. --- mysql-test/r/select.result | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/mysql-test/r/select.result b/mysql-test/r/select.result index 607cd11f089..70ac33964ad 100644 --- a/mysql-test/r/select.result +++ b/mysql-test/r/select.result @@ -2392,11 +2392,11 @@ CREATE TABLE t2 ( a BLOB, INDEX (a(20)) ); INSERT INTO t1 VALUES ('one'),('two'),('three'),('four'),('five'); INSERT INTO t2 VALUES ('one'),('two'),('three'),('four'),('five'); EXPLAIN SELECT * FROM t1 LEFT JOIN t2 USE INDEX (a) ON t1.a=t2.a; -table type possible_keys key key_len ref rows Extra -t1 ALL NULL NULL NULL NULL 5 -t2 ref a a 23 t1.a 5 +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 5 +1 SIMPLE t2 ref a a 23 test.t1.a 2 EXPLAIN SELECT * FROM t1 LEFT JOIN t2 FORCE INDEX (a) ON t1.a=t2.a; -table type possible_keys key key_len ref rows Extra -t1 ALL NULL NULL NULL NULL 5 -t2 ref a a 23 t1.a 5 +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 5 +1 SIMPLE t2 ref a a 23 test.t1.a 2 DROP TABLE t1, t2; -- cgit v1.2.1