mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Fixed problem when comparing a key for a multi-byte-character set. (bug 152)
Use 0x.... as strings if 'new' mode. (bug 152) Don't report -max on windows when InnoDB is enabled. (bug 332) Reset current_linfo; This could cause a hang when doing PURGE LOGS. Fix for row numbers in EXPLAIN (bug 322) Fix that USE_FRM works for all table types (bug 97)
This commit is contained in:
@ -212,3 +212,55 @@ select * from t1 where match a against ("te*" in boolean mode)+0;
|
||||
a
|
||||
test
|
||||
drop table t1;
|
||||
create table t1 (word varchar(255) not null, word2 varchar(255) not null, index(word));
|
||||
insert into t1 (word) values ('ss'),(0xDF),(0xE4),('ae');
|
||||
update t1 set word2=word;
|
||||
select word, word=0xdf as t from t1 having t > 0;
|
||||
word t
|
||||
<EFBFBD> 1
|
||||
select word, word=cast(0xdf AS CHAR) as t from t1 having t > 0;
|
||||
word t
|
||||
ss 1
|
||||
<EFBFBD> 1
|
||||
select * from t1 where word=0xDF;
|
||||
word word2
|
||||
<EFBFBD> <09>
|
||||
select * from t1 where word=CAST(0xDF as CHAR);
|
||||
word word2
|
||||
ss ss
|
||||
<EFBFBD> <09>
|
||||
select * from t1 where word2=0xDF;
|
||||
word word2
|
||||
<EFBFBD> <09>
|
||||
select * from t1 where word2=CAST(0xDF as CHAR);
|
||||
word word2
|
||||
ss ss
|
||||
<EFBFBD> <09>
|
||||
select * from t1 where word='ae';
|
||||
word word2
|
||||
<EFBFBD> <09>
|
||||
ae ae
|
||||
select * from t1 where word= 0xe4 or word=CAST(0xe4 as CHAR);
|
||||
word word2
|
||||
<EFBFBD> <09>
|
||||
ae ae
|
||||
select * from t1 where word between 0xDF and 0xDF;
|
||||
word word2
|
||||
<EFBFBD> <09>
|
||||
select * from t1 where word between CAST(0xDF AS CHAR) and CAST(0xDF AS CHAR);
|
||||
word word2
|
||||
ss ss
|
||||
<EFBFBD> <09>
|
||||
select * from t1 where word like 'ae';
|
||||
word word2
|
||||
ae ae
|
||||
select * from t1 where word like 'AE';
|
||||
word word2
|
||||
ae ae
|
||||
select * from t1 where word like 0xDF;
|
||||
word word2
|
||||
<EFBFBD> <09>
|
||||
select * from t1 where word like CAST(0xDF as CHAR);
|
||||
word word2
|
||||
<EFBFBD> <09>
|
||||
drop table t1;
|
||||
|
@ -273,8 +273,16 @@ cust 20
|
||||
SELECT emp.rate_code, lr.base_rate FROM t1 AS emp LEFT JOIN t2 AS lr USING (siteid, rate_code) WHERE lr.siteid = 'rivercats' AND emp.emp_id = 'psmith';
|
||||
rate_code base_rate
|
||||
cust 20
|
||||
drop table t1,t2;
|
||||
CREATE TABLE t1 (ID INTEGER NOT NULL PRIMARY KEY, Value1 VARCHAR(255));
|
||||
CREATE TABLE t2 (ID INTEGER NOT NULL PRIMARY KEY, Value2 VARCHAR(255));
|
||||
INSERT INTO t1 VALUES (1, 'A');
|
||||
INSERT INTO t2 VALUES (1, 'B');
|
||||
SELECT * FROM t1 NATURAL JOIN t2 WHERE 1 AND (Value1 = 'A' AND Value2 <> 'B');
|
||||
ID Value1 ID Value2
|
||||
SELECT * FROM t1 NATURAL JOIN t2 WHERE 1 AND Value1 = 'A' AND Value2 <> 'B';
|
||||
ID Value1 ID Value2
|
||||
SELECT * FROM t1 NATURAL JOIN t2 WHERE (Value1 = 'A' AND Value2 <> 'B') AND 1;
|
||||
ID Value1 ID Value2
|
||||
drop table t1,t2;
|
||||
create table t1 (i int);
|
||||
|
@ -4,4 +4,8 @@ repair table t1 use_frm;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair warning Number of rows changed from 0 to 1
|
||||
test.t1 repair status OK
|
||||
drop table if exists t1;
|
||||
alter table t1 TYPE=HEAP;
|
||||
repair table t1 use_frm;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair error The handler for the table doesn't support repair
|
||||
drop table t1;
|
||||
|
@ -4,18 +4,18 @@ reset master;
|
||||
reset slave;
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
slave start;
|
||||
drop database if exists d1;
|
||||
create database d1;
|
||||
create table d1.t1 ( n int);
|
||||
alter table d1.t1 add m int;
|
||||
insert into d1.t1 values (1,2);
|
||||
create table d1.t2 (n int);
|
||||
insert into d1.t2 values (45);
|
||||
rename table d1.t2 to d1.t3, d1.t1 to d1.t2;
|
||||
select * from d1.t2;
|
||||
drop database if exists test_$1;
|
||||
create database test_$1;
|
||||
create table test_$1.t1 ( n int);
|
||||
alter table test_$1.t1 add m int;
|
||||
insert into test_$1.t1 values (1,2);
|
||||
create table test_$1.t2 (n int);
|
||||
insert into test_$1.t2 values (45);
|
||||
rename table test_$1.t2 to test_$1.t3, test_$1.t1 to test_$1.t2;
|
||||
select * from test_$1.t2;
|
||||
n m
|
||||
1 2
|
||||
select * from d1.t3;
|
||||
select * from test_$1.t3;
|
||||
n
|
||||
45
|
||||
drop database d1;
|
||||
drop database test_$1;
|
||||
|
Reference in New Issue
Block a user