From 9a67ecc3e4c080aeb53eb947a70531e035805d25 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 8 Jun 2005 01:25:06 +0200 Subject: [PATCH 1/3] Fix Windows build warning and file missing from projects. VC++Files/libmysql/libmysql.dsp: Add missing file VC++Files/client/mysqlclient.dsp: Add missing file vio/viosocket.c: Add missing parameter --- VC++Files/client/mysqlclient.dsp | 4 ++++ VC++Files/libmysql/libmysql.dsp | 4 ++++ vio/viosocket.c | 1 + 3 files changed, 9 insertions(+) diff --git a/VC++Files/client/mysqlclient.dsp b/VC++Files/client/mysqlclient.dsp index 599bad92d7f..9a6fd933041 100644 --- a/VC++Files/client/mysqlclient.dsp +++ b/VC++Files/client/mysqlclient.dsp @@ -322,6 +322,10 @@ SOURCE=..\mysys\mulalloc.c # End Source File # Begin Source File +SOURCE=..\mysys\my_access.c +# End Source File +# Begin Source File + SOURCE=..\mysys\my_alloc.c # End Source File # Begin Source File diff --git a/VC++Files/libmysql/libmysql.dsp b/VC++Files/libmysql/libmysql.dsp index 21e393f137d..9bc7dfb8a1d 100644 --- a/VC++Files/libmysql/libmysql.dsp +++ b/VC++Files/libmysql/libmysql.dsp @@ -295,6 +295,10 @@ SOURCE=..\mysys\mulalloc.c # End Source File # Begin Source File +SOURCE=..\mysys\my_access.c +# End Source File +# Begin Source File + SOURCE=..\mysys\my_alloc.c # End Source File # Begin Source File diff --git a/vio/viosocket.c b/vio/viosocket.c index 172d9127dc2..904b75583a9 100644 --- a/vio/viosocket.c +++ b/vio/viosocket.c @@ -379,6 +379,7 @@ int vio_close_pipe(Vio * vio) void vio_ignore_timeout(Vio *vio __attribute__((unused)), + uint which __attribute__((unused)), uint timeout __attribute__((unused))) { } From 61b2a6b08312555eb2800a27d982edc13d5f0e86 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 17 Jun 2005 21:44:17 +0200 Subject: [PATCH 2/3] Fix hang/crash with Boolean full-text search against an unindexed field for which the query contained more words than we allocated space. (Bug #7858) myisam/ft_boolean_search.c: Fix calculation of max number of elements -- "words" may not have spaces between them. mysql-test/t/fulltext.test: Modify test to be specific to reported bug (fix for old bug wasn't quite enough) mysql-test/r/fulltext.result: Update results --- myisam/ft_boolean_search.c | 2 +- mysql-test/r/fulltext.result | 2 +- mysql-test/t/fulltext.test | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/myisam/ft_boolean_search.c b/myisam/ft_boolean_search.c index 62c68322595..8045ddd4657 100644 --- a/myisam/ft_boolean_search.c +++ b/myisam/ft_boolean_search.c @@ -398,7 +398,7 @@ FT_INFO * ft_init_boolean_search(MI_INFO *info, uint keynr, byte *query, Hack: instead of init_queue, we'll use reinit queue to be able to alloc queue with alloc_root() */ - res=ftb->queue.max_elements=1+query_len/(min(ft_min_word_len,2)+1); + res=ftb->queue.max_elements=1+query_len/2; if (!(ftb->queue.root= (byte **)alloc_root(&ftb->mem_root, (res+1)*sizeof(void*)))) goto err; diff --git a/mysql-test/r/fulltext.result b/mysql-test/r/fulltext.result index dd5b0407eb3..7ac7e1ca72b 100644 --- a/mysql-test/r/fulltext.result +++ b/mysql-test/r/fulltext.result @@ -338,7 +338,7 @@ insert into t2 values (3, 1, 'xxbuz'); select * from t1 join t2 using(`t1_id`) where match (t1.name, t2.name) against('xxfoo' in boolean mode); t1_id name t2_id t1_id name 1 data1 1 1 xxfoo -select * from t2 where match name against ('a* b* c* d* e* f*' in boolean mode); +select * from t2 where match name against ('*a*b*c*d*e*f*' in boolean mode); t2_id t1_id name drop table t1,t2; create table t1 (a text, fulltext key (a)); diff --git a/mysql-test/t/fulltext.test b/mysql-test/t/fulltext.test index 4809f6f0357..d5493daf63e 100644 --- a/mysql-test/t/fulltext.test +++ b/mysql-test/t/fulltext.test @@ -253,9 +253,9 @@ insert into t2 values (3, 1, 'xxbuz'); select * from t1 join t2 using(`t1_id`) where match (t1.name, t2.name) against('xxfoo' in boolean mode); # -# bug with many short (< ft_min_word_len) words in boolean search +# Bug #7858: bug with many short (< ft_min_word_len) words in boolean search # -select * from t2 where match name against ('a* b* c* d* e* f*' in boolean mode); +select * from t2 where match name against ('*a*b*c*d*e*f*' in boolean mode); drop table t1,t2; # From 7b24dad470ad5cd3526ad081672adc25f1e1a672 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 20 Jun 2005 18:54:45 +0200 Subject: [PATCH 3/3] Fix handling of command-line on Windows, missed as part of earlier commit. (Bug #10840) client/mysql.cc: Add cast of unsigned value stored in signed char --- client/mysql.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/client/mysql.cc b/client/mysql.cc index b9b9b938da0..5454c76e720 100644 --- a/client/mysql.cc +++ b/client/mysql.cc @@ -989,7 +989,8 @@ static int read_lines(bool execute_commands) a nil, it still needs the space in the linebuffer for it. This is, naturally, undocumented. */ - } while (linebuffer[0] <= linebuffer[1] + 1); + } while ((unsigned char)linebuffer[0] <= + (unsigned char)linebuffer[1] + 1); line= buffer.c_ptr(); #endif /* __NETWARE__ */ #else