Commit graph

155 commits

Author SHA1 Message Date
Anurag Shekhar
064c990b12 merging with 5.0 bugteam tree 2009-07-15 15:43:45 +05:30
Anurag Shekhar
7c670fc3e1 Bug#37740 Server crashes on execute statement with full text search and
match against.


Server crashes when executing prepared statement with duplicating
MATCH() function calls in SELECT and ORDER BY expressions, e.g.:
SELECT MATCH(a) AGAINST('test') FROM t1 ORDER BY MATCH(a) AGAINST('test')

This query gets optimized by the server, so the value returned
by MATCH() from the SELECT list is reused for ORDER BY purposes.
To make this optimization server is comparing items from
SELECT and ORDER BY lists. We were getting server crash because
comparision function for MATCH() item is not intended to be called
at this point of execution.

In 5.0 and 5.1 this problem is workarounded by resetting MATCH()
item to the state as it was during PREPARE.

In 6.0 correct comparision function will be implemented and
duplicating MATCH() items from the ORDER BY list will be
optimized.
2009-07-15 15:00:58 +05:30
Sergey Vojtovich
f3d921c082 BUG#42907 - Multi-term boolean fulltext query containing a
single quote fails in 5.1.x

Performing fulltext prefix search (a word with truncation
operator) may cause a dead-loop.

The problem was in smarter index merge algorithm - it was writing
record reference to an incorrect memory area.
2009-04-23 16:24:08 +05:00
Sergey Vojtovich
8006c5cd57 Merge 5.0-bugteam -> 5.1-bugteam. 2009-02-12 14:10:07 +04:00
Sergey Vojtovich
659a2183dd BUG#36737 - having + full text operator crashes mysql
MATCH() function accepts column list as an argument. It was possible to override
this requirement with aliased non-column select expression. Which results in
server crash.

With this fix aliased non-column select expressions are not accepted by MATCH()
function, returning an error.
2009-02-12 13:49:44 +04:00
Sergey Vojtovich
51f2783577 Merge. 2008-12-09 13:27:46 +04:00
Sergey Vojtovich
85d4cbae24 BUG#37245 - Full text search problem
Certain boolean mode queries with truncation operator did
not return matching records and calculate relevancy
incorrectly.
2008-11-28 18:17:13 +04:00
Sergey Vojtovich
c411255507 Merge. 2008-11-18 15:38:28 +04:00
Sergey Vojtovich
83f96dcf47 BUG#38842 - Fix for 25951 seems incorrect
With fix for bug 25951 index hints are ignored for fulltext
searches, as handling of fulltext indexes is different from
handling regular indexes. Meaning it is not possible to
implement true index hints support for fulltext indexes within
the scope of current fulltext architecture.

The problem is that prior to fix for bug 25951, some useful
index hints still could be given for boolean mode searches.

This patch implements special index hints support for fulltext
indexes with the following characteristics:
- all index hints are still ignored for NLQ mode searches -
  it cannot work without an index;
- for 5.1 and up index hints FOR ORDER BY and FOR GROUP BY are
  still ignored for fulltext indexes;
- boolean mode searches honor USE/FORCE/IGNORE INDEX hints;
- as opposed to index hints for regular indexes, index hints
  for fulltext BOOLEAN mode searches affect the usage of the
  index for the whole query.
2008-11-11 13:10:51 +04:00
anozdrin/alik@quad.
d36d243d3d Fix for Bug#32538: View definition picks up character set,
but not collation.

The problem here was that text literals in a view were always
dumped with character set introducer. That lead to loosing
collation information.

The fix is to dump character set introducer only if it was
in the original query. That is now possible because there 
is no problem any more of loss of character set of string
literals in views -- after WL#4052 the view is dumped 
in the original character set.
2008-02-12 22:09:16 +03:00
svoj@june.mysql.com
beb5f7f462 Merge mysql.com:/home/svoj/devel/mysql/BUG11392/mysql-5.0-engines
into  mysql.com:/home/svoj/devel/mysql/BUG11392/mysql-5.1-engines
2007-11-02 13:20:38 +04:00
svoj@june.mysql.com
0ea269caac Merge mysql.com:/home/svoj/devel/mysql/BUG11392/mysql-4.1-engines
into  mysql.com:/home/svoj/devel/mysql/BUG11392/mysql-5.0-engines
2007-11-02 12:58:20 +04:00
svoj@mysql.com/june.mysql.com
cbd3dfbbcb BUG#11392 - fulltext search bug
Fulltext boolean mode phrase search may crash server on platforms
where size of pointer is not equal to size of unsigned integer
(in other words some 64-bit platforms).

The problem was integer overflow.

Affects 4.1 only.
2007-10-30 14:46:43 +04:00
svoj@mysql.com/april.(none)
c16c5db7a8 BUG#29464 - load data infile into table with big5 chinese fulltext index
hangs 100% cpu

Moved a test case for BUG#29464 into fulltext3.test, since it requires big5
character set.
2007-07-13 03:29:25 +05:00
svoj@mysql.com/april.(none)
e11d75e45b BUG#29445 - match ... against () never returns
Part 2:
Searching fulltext index for a word with boolean mode truncation
operator may cause infinite loop.

The problem was that "smarter index merge" was used with "trunc-words",
which must never happen.

Affects 5.1 only.
2007-07-13 03:25:27 +05:00
serg@janus.mylan
859304f708 fix for smarter index mergein fulltext
to work for queries like "+a (b)"
2007-07-11 15:26:19 +02:00
svoj@mysql.com/june.mysql.com
31c8efc812 BUG#29445 - match ... against () never returns
Part 1:
Do not perform index search for a plus-word with truncation operator
in case there are other plus-words in expression.

Specifically this optimization was enforced for expression like
"+word1 +word2*", but wasn't enforced for expression like
"+word1 word2*".
2007-07-10 15:37:39 +05:00
svoj@mysql.com/june.mysql.com
69acbc7759 BUG#29464 - load data infile into table with big5 chinese fulltext index
hangs 100% cpu

Fulltext parser may fall into infinite loop when it gets illegal
multibyte sequence (or a sequence that doesn't have mapping to unicode).

Affects 5.1 only.
2007-07-05 15:17:06 +05:00
svoj@june.mysql.com
ef2c0228da Merge mysql.com:/home/svoj/devel/mysql/BUG25951/mysql-5.0-engines
into  mysql.com:/home/svoj/devel/mysql/BUG25951/mysql-5.1-engines
2007-04-18 13:27:04 +05:00
svoj@mysql.com/june.mysql.com
c7ac1e1c6a Merge mysql.com:/home/svoj/devel/mysql/BUG25951/mysql-4.1-engines
into  mysql.com:/home/svoj/devel/mysql/BUG25951/mysql-5.0-engines
2007-04-18 12:39:04 +05:00
svoj@mysql.com/april.(none)
005d8c5284 BUG#25951 - ignore/use index does not work with fulltext
IGNORE/USE/FORCE INDEX hints were honored when choosing FULLTEXT
index.

With this fix these hints are ignored. For regular indexes we may
perform table scan instead of index lookup when IGNORE INDEX was
specified. We cannot do this for FULLTEXT in NLQ mode.
2007-04-13 02:31:34 +05:00
bar@bar.intranet.mysql.r18.ru
cefa1cf9e0 Merge mysql.com:/usr/home/bar/mysql-5.0.b18908
into  mysql.com:/usr/home/bar/mysql-5.1-rpl
2006-11-01 16:48:03 +04:00
bar@mysql.com/bar.intranet.mysql.r18.ru
0e3a1eece7 Bug#18908: ERROR 1406 (22001): Data too long for column :: using utf8
Problem: Too confusing error message when cannot convert
between string and column character sets on INSERT and UPDATE.
Fix: producing a better error message, instead of "Data too long"
in such cases
Additional changes: Adding "DROP TABLE IF EXISTS" into several
tests to be safe against failures in previous tests.
2006-10-30 10:14:03 +04:00
sergefp@mysql.com
699291a8e6 BUG#14940 "MySQL choose wrong index", v.2
- Make the range-et-al optimizer produce E(#table records after table 
                                           condition is applied),
- Make the join optimizer use this value,
- Add "filtered" column to EXPLAIN EXTENDED to show 
  fraction of records left after table condition is applied
- Adjust test results, add comments
2006-07-28 21:27:01 +04:00
msvensson@neptunus.(none)
13c5e780ed Merge neptunus.(none):/home/msvensson/mysql/mysql-5.0
into  neptunus.(none):/home/msvensson/mysql/mysql-5.1
2006-03-22 16:48:35 +01:00
msvensson@neptunus.(none)
451a7129bb Bug#18071 Result from MATCH() uses too many decimals
- Use FORMAT as a workaround to only output the first 6 decimals of the value returned
from MATCH
 - This has been done before
2006-03-22 14:57:24 +01:00
msvensson@neptunus.(none)
c4b1fb68b4 Bug#10460 SHOW CREATE TABLE uses inconsistent upper/lower case 2006-02-22 10:09:59 +01:00
serg@serg.mylan
b283fb79d0 MATCH(a,b) AGAINST (... IN NATURAL LANGUAGE MODE)
remove explicit $<ulong_num>$ from sql_yacc.yy
2006-02-14 13:19:54 +01:00
konstantin@mysql.com
e1f807af26 Merge mysql.com:/home/kostja/mysql/mysql-5.0-root
into  mysql.com:/home/kostja/mysql/mysql-5.1-merge
2006-02-09 13:35:59 +03:00
svoj@april.(none)
328b59a5ed Merge april.(none):/home/svoj/devel/mysql/merge/mysql-4.1
into  april.(none):/home/svoj/devel/mysql/merge/mysql-5.0
2006-02-07 15:30:32 +04:00
svoj@april.(none)
332be5bdd9 BUG#14496: Crash or strange results with prepared statement,
MATCH and FULLTEXT
Fixed that fulltext query using PS results in unexpected behaviour
when executed 2 or more times.
2006-02-01 20:40:12 +04:00
svoj@april.(none)
714cf5688b BUG#16722 - Fulltext: implicit limit for query word number (depends on length of the query)
Remove implicit limit for query word number.
2006-01-26 15:12:59 +04:00
svoj@april.(none)
74c475b23d Merge svojtovich@bk-internal.mysql.com:/home/bk/mysql-5.1-new
into  april.(none):/home/svoj/devel/mysql/BUG14194/mysql-5.1-new
2006-01-16 22:27:36 +04:00
svoj@april.(none)
4426d2ea30 BUG#14194: Problem with fulltext boolean search and apostrophe
Fixed that single apostrophe was considered as a word character.
2006-01-13 23:34:38 +04:00
svoj@april.(none)
5581ef960a BUG#13835: max key length is 1000 bytes when trying to create a fulltext index
Allow fulltext index on VARCHAR columns longer than max key length.
2006-01-13 21:25:12 +04:00
serg@serg.mylan
6a83b75764 Merge serg.mylan:/usr/home/serg/Abk/mysql-4.1
into serg.mylan:/usr/home/serg/Abk/mysql-5.0
2005-11-26 20:23:20 +01:00
serg@serg.mylan
701de9be0a followup for for the bug#5686 2005-11-26 19:36:11 +01:00
bell@sanja.is.com.ua
a2b8128398 Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-4.1
into  sanja.is.com.ua:/home/bell/mysql/bk/work-bug6-5.0
2005-11-15 19:22:00 +02:00
svoj@mysql.com
5d8cefe0b4 Fix for BUG#5686 - #1034 - Incorrect key file for table - only utf8 2005-11-12 11:25:14 +04:00
timour@mysql.com
354ce1d024 Merge mysql.com:/home/timka/mysql/src/5.0-virgin
into  mysql.com:/home/timka/mysql/src/5.0-2486-merge
2005-08-12 19:27:54 +03:00
timour@mysql.com
a247282aa6 Implementation of WL#2486 -
"Process NATURAL and USING joins according to SQL:2003".

* Some of the main problems fixed by the patch:
  - in "select *" queries the * expanded correctly according to
    ANSI for arbitrary natural/using joins
  - natural/using joins are correctly transformed into JOIN ... ON
    for any number/nesting of the joins.
  - column references are correctly resolved against natural joins
    of any nesting and combined with arbitrary other joins.

* This patch also contains a fix for name resolution of items
  inside the ON condition of JOIN ... ON - in this case items must
  be resolved only against the JOIN operands. To support such
  'local' name resolution, the patch introduces a stack of
  name resolution contexts used at parse time.

NOTICE:
- This patch is not complete in the sense that
  - there are 2 test cases that still do not pass -
    one in join.test, one in select.test. Both are marked
    with a comment "TODO: WL#2486".
  - it does not include a new test specific for the task
2005-08-12 17:57:19 +03:00
igor@rurik.mysql.com
b5f33d2bc4 Manual merge 2005-08-02 12:09:49 -07:00
svoj@mysql.com
0f98bf44ef Merge mysql.com:/home/svoj/devel/mysql/BUG11684/mysql-4.0
into  mysql.com:/home/svoj/devel/mysql/BUG11684/mysql-4.1
2005-08-02 12:12:37 +05:00
svoj@mysql.com
19fe33e16c BUG#11684 fix.
Repair crashes mysql when table has fulltext index.
2005-08-02 11:33:26 +05:00
jimw@mysql.com
99e35c84ac Merge mysql.com:/home/jimw/my/mysql-4.1-clean
into  mysql.com:/home/jimw/my/mysql-5.0-clean
2005-06-20 15:02:45 -07:00
jimw@mysql.com
176143413e 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)
2005-06-17 21:44:17 +02:00
serg@serg.mylan
79573a5ee8 after merge fixes 2005-03-09 19:22:30 +01:00
serg@serg.mylan
1e09c15a8b don't close binlog in the destructor - use explictit MYSQL_LOG::cleanup for this 2005-03-09 12:29:51 +01:00
dean@mysql.com
2f7595ea84 Merge mysql.com:/home/dellis/bkl/bug-4.1
into mysql.com:/home/dellis/bkl/bug-5.0
2005-02-16 17:35:00 -06:00
dean@mysql.com
e7f410a14a Merge 2005-02-16 04:04:34 -06:00