Commit 7c7843a2 authored by unknown's avatar unknown

Manual merge


myisam/sort.c:
  Auto merged
mysql-test/r/fulltext.result:
  Auto merged
mysql-test/t/fulltext.test:
  Auto merged
sql/sql_select.cc:
  Auto merged
strings/ctype-big5.c:
  Auto merged
parents 6eb7a80a c2b83502
...@@ -587,11 +587,13 @@ int thr_write_keys(MI_SORT_PARAM *sort_param) ...@@ -587,11 +587,13 @@ int thr_write_keys(MI_SORT_PARAM *sort_param)
while (!got_error && while (!got_error &&
!my_b_read(&sinfo->tempfile_for_exceptions,(byte*)&key_length, !my_b_read(&sinfo->tempfile_for_exceptions,(byte*)&key_length,
sizeof(key_length)) && sizeof(key_length)))
!my_b_read(&sinfo->tempfile_for_exceptions,(byte*)mergebuf,
(uint) key_length))
{ {
if (_mi_ck_write(info,sinfo->key,(uchar*) mergebuf, byte ft_buf[HA_FT_MAXBYTELEN + HA_FT_WLEN + 10];
if (key_length > sizeof(ft_buf) ||
my_b_read(&sinfo->tempfile_for_exceptions, (byte*)ft_buf,
(uint)key_length) ||
_mi_ck_write(info, sinfo->key, (uchar*)ft_buf,
key_length - info->s->rec_reflength)) key_length - info->s->rec_reflength))
got_error=1; got_error=1;
} }
......
...@@ -128,3 +128,9 @@ SELECT * FROM t1; ...@@ -128,3 +128,9 @@ SELECT * FROM t1;
a a
DROP TABLE t1; DROP TABLE t1;
CREATE TABLE t1 (a CHAR(50) CHARACTER SET big5 NOT NULL, FULLTEXT(a));
INSERT INTO t1 VALUES(0xA741ADCCA66EB6DC20A7DAADCCABDCA66E);
SELECT HEX(a) FROM t1 WHERE MATCH(a) AGAINST (0xA741ADCCA66EB6DC IN BOOLEAN MODE);
HEX(a)
A741ADCCA66EB6DC20A7DAADCCABDCA66E
DROP TABLE t1;
...@@ -422,3 +422,11 @@ SELECT COUNT(*) FROM t1 WHERE MATCH(t) AGAINST ('"osnabr ...@@ -422,3 +422,11 @@ SELECT COUNT(*) FROM t1 WHERE MATCH(t) AGAINST ('"osnabr
COUNT(*) COUNT(*)
1 1
DROP TABLE t1; DROP TABLE t1;
CREATE TABLE t1 (a VARCHAR(30), FULLTEXT(a));
INSERT INTO t1 VALUES('bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb');
SET myisam_repair_threads=2;
REPAIR TABLE t1;
Table Op Msg_type Msg_text
test.t1 repair status OK
SET myisam_repair_threads=@@global.myisam_repair_threads;
DROP TABLE t1;
...@@ -28,4 +28,12 @@ INSERT INTO t1 VALUES (' ...@@ -28,4 +28,12 @@ INSERT INTO t1 VALUES ('
SELECT * FROM t1; SELECT * FROM t1;
DROP TABLE t1; DROP TABLE t1;
#
# BUG#12075 - FULLTEXT non-functional for big5 strings
#
CREATE TABLE t1 (a CHAR(50) CHARACTER SET big5 NOT NULL, FULLTEXT(a));
INSERT INTO t1 VALUES(0xA741ADCCA66EB6DC20A7DAADCCABDCA66E);
SELECT HEX(a) FROM t1 WHERE MATCH(a) AGAINST (0xA741ADCCA66EB6DC IN BOOLEAN MODE);
DROP TABLE t1;
# End of 4.1 tests # End of 4.1 tests
...@@ -339,4 +339,15 @@ INSERT INTO t1 VALUES('Mit freundlichem Gr ...@@ -339,4 +339,15 @@ INSERT INTO t1 VALUES('Mit freundlichem Gr
SELECT COUNT(*) FROM t1 WHERE MATCH(t) AGAINST ('"osnabrck"' IN BOOLEAN MODE); SELECT COUNT(*) FROM t1 WHERE MATCH(t) AGAINST ('"osnabrck"' IN BOOLEAN MODE);
DROP TABLE t1; DROP TABLE t1;
#
# BUG#11684 - repair crashes mysql when table has fulltext index
#
CREATE TABLE t1 (a VARCHAR(30), FULLTEXT(a));
INSERT INTO t1 VALUES('bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb');
SET myisam_repair_threads=2;
REPAIR TABLE t1;
SET myisam_repair_threads=@@global.myisam_repair_threads;
DROP TABLE t1;
# End of 4.1 tests # End of 4.1 tests
...@@ -1705,14 +1705,13 @@ public: ...@@ -1705,14 +1705,13 @@ public:
bool using_indirect_summary_function; bool using_indirect_summary_function;
/* If >0 convert all blob fields to varchar(convert_blob_length) */ /* If >0 convert all blob fields to varchar(convert_blob_length) */
uint convert_blob_length; uint convert_blob_length;
bool need_const; /* <=> const items are saved in tmp table */
CHARSET_INFO *table_charset; CHARSET_INFO *table_charset;
bool schema_table; bool schema_table;
TMP_TABLE_PARAM() TMP_TABLE_PARAM()
:copy_field(0), group_parts(0), :copy_field(0), group_parts(0),
group_length(0), group_null_parts(0), convert_blob_length(0), group_length(0), group_null_parts(0), convert_blob_length(0),
need_const(0), schema_table(0) schema_table(0)
{} {}
~TMP_TABLE_PARAM() ~TMP_TABLE_PARAM()
{ {
......
...@@ -8254,8 +8254,7 @@ create_tmp_table(THD *thd,TMP_TABLE_PARAM *param,List<Item> &fields, ...@@ -8254,8 +8254,7 @@ create_tmp_table(THD *thd,TMP_TABLE_PARAM *param,List<Item> &fields,
param->using_indirect_summary_function=1; param->using_indirect_summary_function=1;
continue; continue;
} }
if (item->const_item() && (int) hidden_field_count <= 0 && if (item->const_item() && (int) hidden_field_count <= 0)
!param->need_const)
continue; // We don't have to store this continue; // We don't have to store this
} }
if (type == Item::SUM_FUNC_ITEM && !group && !save_sum_fields) if (type == Item::SUM_FUNC_ITEM && !group && !save_sum_fields)
......
...@@ -61,12 +61,12 @@ static uchar NEAR ctype_big5[257] = ...@@ -61,12 +61,12 @@ static uchar NEAR ctype_big5[257] =
2,2,2,2,2,2,2,2,2,2,2,16,16,16,16,32, 2,2,2,2,2,2,2,2,2,2,2,16,16,16,16,32,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 3,3,3,3,3,3,3,3,3,3,0,0,0,0,0,0,
}; };
static uchar NEAR to_lower_big5[]= static uchar NEAR to_lower_big5[]=
......
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