mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
Merge with 4.1
BitKeeper/etc/logging_ok: auto-union BitKeeper/triggers/post-commit: Auto merged innobase/row/row0mysql.c: Auto merged myisam/ft_boolean_search.c: Auto merged mysql-test/r/ctype_ucs.result: Auto merged mysql-test/r/distinct.result: Auto merged mysql-test/r/fulltext.result: Auto merged mysql-test/r/select.result: Auto merged mysql-test/r/subselect.result: Auto merged mysql-test/r/union.result: Auto merged mysql-test/t/ctype_ucs.test: Auto merged mysql-test/t/subselect.test: Auto merged mysql-test/t/union.test: Auto merged sql/item_strfunc.cc: Auto merged sql/sql_cache.cc: Auto merged sql/sql_class.cc: Auto merged sql/sql_list.h: Auto merged sql/examples/ha_archive.cc: Auto merged sql/sql_parse.cc: Auto merged sql/sql_select.cc: Auto merged sql/sql_string.h: Auto merged vio/viosocket.c: Auto merged scripts/mysql_create_system_tables.sh: simple merge sql/field.cc: simple merge sql/item.h: simple merge sql/sql_lex.h: simple merge sql/sql_yacc.yy: Merge (join_table_list was not comptely merged. Need to run test to know how things works...) sql/table.cc: Keep code from 5.0, except delted one not needed line strings/ctype-ucs2.c: Auto merge
This commit is contained in:
@ -624,3 +624,17 @@ ucs2_bin 00610009
|
||||
ucs2_bin 0061
|
||||
ucs2_bin 00610020
|
||||
drop table t1;
|
||||
SET NAMES latin1;
|
||||
SET collation_connection='ucs2_swedish_ci';
|
||||
CREATE TABLE t1 (Field1 int(10) default '0');
|
||||
INSERT INTO t1 VALUES ('-1');
|
||||
SELECT * FROM t1;
|
||||
Field1
|
||||
-1
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (Field1 int(10) unsigned default '0');
|
||||
INSERT INTO t1 VALUES ('-1');
|
||||
Warnings:
|
||||
Warning 1265 Data truncated for column 'Field1' at row 1
|
||||
DROP TABLE t1;
|
||||
SET NAMES latin1;
|
||||
|
@ -408,3 +408,10 @@ insert t1 values (1, "aaaa"), (2, "bbbb");
|
||||
insert t2 values (10, "aaaa"), (2, "cccc");
|
||||
replace t1 select * from t2;
|
||||
drop table t1, t2;
|
||||
CREATE TABLE t1 (t VARCHAR(200) CHARACTER SET utf8 COLLATE utf8_unicode_ci, FULLTEXT (t));
|
||||
SET NAMES latin1;
|
||||
INSERT INTO t1 VALUES('Mit freundlichem Gr<47><72> aus Osnabr<62>ck');
|
||||
SELECT COUNT(*) FROM t1 WHERE MATCH(t) AGAINST ('"osnabr<62>ck"' IN BOOLEAN MODE);
|
||||
COUNT(*)
|
||||
1
|
||||
DROP TABLE t1;
|
||||
|
@ -74,15 +74,15 @@ Table Op Msg_type Msg_text
|
||||
test.t1 preload_keys status OK
|
||||
show status like "key_read%";
|
||||
Variable_name Value
|
||||
Key_read_requests 0
|
||||
Key_reads 0
|
||||
Key_read_requests 581
|
||||
Key_reads 581
|
||||
select count(*) from t1 where b = 'test1';
|
||||
count(*)
|
||||
4181
|
||||
show status like "key_read%";
|
||||
Variable_name Value
|
||||
Key_read_requests 217
|
||||
Key_reads 45
|
||||
Key_read_requests 798
|
||||
Key_reads 581
|
||||
flush tables;
|
||||
flush status;
|
||||
show status like "key_read%";
|
||||
@ -98,15 +98,15 @@ Table Op Msg_type Msg_text
|
||||
test.t1 preload_keys status OK
|
||||
show status like "key_read%";
|
||||
Variable_name Value
|
||||
Key_read_requests 0
|
||||
Key_reads 0
|
||||
Key_read_requests 10
|
||||
Key_reads 10
|
||||
select count(*) from t1 where b = 'test1';
|
||||
count(*)
|
||||
4181
|
||||
show status like "key_read%";
|
||||
Variable_name Value
|
||||
Key_read_requests 217
|
||||
Key_reads 45
|
||||
Key_read_requests 227
|
||||
Key_reads 52
|
||||
flush tables;
|
||||
flush status;
|
||||
show status like "key_read%";
|
||||
@ -123,8 +123,8 @@ test.t1 preload_keys status OK
|
||||
test.t2 preload_keys status OK
|
||||
show status like "key_read%";
|
||||
Variable_name Value
|
||||
Key_read_requests 0
|
||||
Key_reads 0
|
||||
Key_read_requests 587
|
||||
Key_reads 587
|
||||
select count(*) from t1 where b = 'test1';
|
||||
count(*)
|
||||
4181
|
||||
@ -133,8 +133,8 @@ count(*)
|
||||
2584
|
||||
show status like "key_read%";
|
||||
Variable_name Value
|
||||
Key_read_requests 351
|
||||
Key_reads 73
|
||||
Key_read_requests 938
|
||||
Key_reads 613
|
||||
flush tables;
|
||||
flush status;
|
||||
show status like "key_read%";
|
||||
@ -147,8 +147,8 @@ test.t3 preload_keys error Table 'test.t3' doesn't exist
|
||||
test.t2 preload_keys status OK
|
||||
show status like "key_read%";
|
||||
Variable_name Value
|
||||
Key_read_requests 0
|
||||
Key_reads 0
|
||||
Key_read_requests 355
|
||||
Key_reads 355
|
||||
flush tables;
|
||||
flush status;
|
||||
show status like "key_read%";
|
||||
|
@ -1173,3 +1173,25 @@ show columns from t4;
|
||||
Field Type Null Key Default Extra
|
||||
sdate date YES NULL
|
||||
drop table t1, t2, t3, t4;
|
||||
create table t1 (a int not null, b char (10) not null);
|
||||
insert into t1 values(1,'a'),(2,'b'),(3,'c'),(3,'c');
|
||||
select * from ((select * from t1 limit 1)) a;
|
||||
a b
|
||||
1 a
|
||||
select * from ((select * from t1 limit 1) union (select * from t1 limit 1)) a;
|
||||
a b
|
||||
1 a
|
||||
select * from ((select * from t1 limit 1) union (select * from t1 limit 1) union (select * from t1 limit 1)) a;
|
||||
a b
|
||||
1 a
|
||||
select * from ((((select * from t1))) union (select * from t1) union (select * from t1)) a;
|
||||
a b
|
||||
1 a
|
||||
2 b
|
||||
3 c
|
||||
select * from ((select * from t1) union (((select * from t1))) union (select * from t1)) a;
|
||||
a b
|
||||
1 a
|
||||
2 b
|
||||
3 c
|
||||
drop table t1;
|
||||
|
@ -392,3 +392,24 @@ SET collation_connection='ucs2_general_ci';
|
||||
SET NAMES latin1;
|
||||
SET collation_connection='ucs2_bin';
|
||||
-- source include/ctype_filesort.inc
|
||||
|
||||
SET NAMES latin1;
|
||||
#
|
||||
# Bug#8235
|
||||
#
|
||||
# This bug also helped to find another problem that
|
||||
# INSERT of a UCS2 string containing a negative number
|
||||
# into a unsigned int column didn't produce warnings.
|
||||
# This test covers both problems.
|
||||
#
|
||||
SET collation_connection='ucs2_swedish_ci';
|
||||
CREATE TABLE t1 (Field1 int(10) default '0');
|
||||
# no warnings, negative numbers are allowed
|
||||
INSERT INTO t1 VALUES ('-1');
|
||||
SELECT * FROM t1;
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (Field1 int(10) unsigned default '0');
|
||||
# this should generate a "Data truncated" warning
|
||||
INSERT INTO t1 VALUES ('-1');
|
||||
DROP TABLE t1;
|
||||
SET NAMES latin1;
|
||||
|
@ -322,3 +322,11 @@ insert t2 values (10, "aaaa"), (2, "cccc");
|
||||
replace t1 select * from t2;
|
||||
drop table t1, t2;
|
||||
|
||||
#
|
||||
# bug#8351
|
||||
#
|
||||
CREATE TABLE t1 (t VARCHAR(200) CHARACTER SET utf8 COLLATE utf8_unicode_ci, FULLTEXT (t));
|
||||
SET NAMES latin1;
|
||||
INSERT INTO t1 VALUES('Mit freundlichem Gr<47><72> aus Osnabr<62>ck');
|
||||
SELECT COUNT(*) FROM t1 WHERE MATCH(t) AGAINST ('"osnabr<62>ck"' IN BOOLEAN MODE);
|
||||
DROP TABLE t1;
|
||||
|
@ -717,3 +717,15 @@ union
|
||||
order by sdate;
|
||||
show columns from t4;
|
||||
drop table t1, t2, t3, t4;
|
||||
|
||||
#
|
||||
# Bug #2435 UNION with parentheses not supported
|
||||
#
|
||||
create table t1 (a int not null, b char (10) not null);
|
||||
insert into t1 values(1,'a'),(2,'b'),(3,'c'),(3,'c');
|
||||
select * from ((select * from t1 limit 1)) a;
|
||||
select * from ((select * from t1 limit 1) union (select * from t1 limit 1)) a;
|
||||
select * from ((select * from t1 limit 1) union (select * from t1 limit 1) union (select * from t1 limit 1)) a;
|
||||
select * from ((((select * from t1))) union (select * from t1) union (select * from t1)) a;
|
||||
select * from ((select * from t1) union (((select * from t1))) union (select * from t1)) a;
|
||||
drop table t1;
|
||||
|
Reference in New Issue
Block a user