mirror of
https://github.com/MariaDB/server.git
synced 2025-09-02 09:41:40 +03:00
updating with mysql-5.0-bugteam
This commit is contained in:
@@ -915,3 +915,19 @@ check table t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check status OK
|
||||
drop table t1;
|
||||
create table t1 (a tinytext character set latin1);
|
||||
alter table t1 convert to character set utf8;
|
||||
show create table t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` text
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8
|
||||
drop table t1;
|
||||
create table t1 (a mediumtext character set latin1);
|
||||
alter table t1 convert to character set utf8;
|
||||
show create table t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` longtext
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8
|
||||
drop table t1;
|
||||
|
@@ -107,3 +107,51 @@ X X X X X X X X X
|
||||
X X X X X X X X X Range checked for each record (index map: 0xFFFFFFFFFF)
|
||||
DROP TABLE t2;
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1(a INT);
|
||||
CREATE TABLE t2(a INT);
|
||||
INSERT INTO t1 VALUES (1),(2);
|
||||
INSERT INTO t2 VALUES (1),(2);
|
||||
EXPLAIN EXTENDED SELECT 1
|
||||
FROM (SELECT COUNT(DISTINCT t1.a) FROM t1,t2 GROUP BY t1.a) AS s1;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 PRIMARY <derived2> ALL NULL NULL NULL NULL 2
|
||||
2 DERIVED t1 ALL NULL NULL NULL NULL 2 Using temporary; Using filesort
|
||||
2 DERIVED t2 ALL NULL NULL NULL NULL 2
|
||||
Warnings:
|
||||
Note 1003 select 1 AS `1` from (select count(distinct `test`.`t1`.`a`) AS `COUNT(DISTINCT t1.a)` from `test`.`t1` join `test`.`t2` group by `test`.`t1`.`a`) `s1`
|
||||
EXPLAIN EXTENDED SELECT 1
|
||||
FROM (SELECT COUNT(DISTINCT t1.a) FROM t1,t2 GROUP BY t1.a) AS s1;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 PRIMARY <derived2> ALL NULL NULL NULL NULL 2
|
||||
2 DERIVED t1 ALL NULL NULL NULL NULL 2 Using temporary; Using filesort
|
||||
2 DERIVED t2 ALL NULL NULL NULL NULL 2
|
||||
Warnings:
|
||||
Note 1003 select 1 AS `1` from (select count(distinct `test`.`t1`.`a`) AS `COUNT(DISTINCT t1.a)` from `test`.`t1` join `test`.`t2` group by `test`.`t1`.`a`) `s1`
|
||||
prepare s1 from
|
||||
'EXPLAIN EXTENDED SELECT 1
|
||||
FROM (SELECT COUNT(DISTINCT t1.a) FROM t1,t2 GROUP BY t1.a) AS s1';
|
||||
execute s1;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 PRIMARY <derived2> ALL NULL NULL NULL NULL 2
|
||||
2 DERIVED t1 ALL NULL NULL NULL NULL 2 Using temporary; Using filesort
|
||||
2 DERIVED t2 ALL NULL NULL NULL NULL 2
|
||||
Warnings:
|
||||
Note 1003 select 1 AS `1` from (select count(distinct `test`.`t1`.`a`) AS `COUNT(DISTINCT t1.a)` from `test`.`t1` join `test`.`t2` group by `test`.`t1`.`a`) `s1`
|
||||
prepare s1 from
|
||||
'EXPLAIN EXTENDED SELECT 1
|
||||
FROM (SELECT COUNT(DISTINCT t1.a) FROM t1,t2 GROUP BY t1.a) AS s1';
|
||||
execute s1;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 PRIMARY <derived2> ALL NULL NULL NULL NULL 2
|
||||
2 DERIVED t1 ALL NULL NULL NULL NULL 2 Using temporary; Using filesort
|
||||
2 DERIVED t2 ALL NULL NULL NULL NULL 2
|
||||
Warnings:
|
||||
Note 1003 select 1 AS `1` from (select count(distinct `test`.`t1`.`a`) AS `COUNT(DISTINCT t1.a)` from `test`.`t1` join `test`.`t2` group by `test`.`t1`.`a`) `s1`
|
||||
execute s1;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 PRIMARY <derived2> ALL NULL NULL NULL NULL 2
|
||||
2 DERIVED t1 ALL NULL NULL NULL NULL 2 Using temporary; Using filesort
|
||||
2 DERIVED t2 ALL NULL NULL NULL NULL 2
|
||||
Warnings:
|
||||
Note 1003 select 1 AS `1` from (select count(distinct `test`.`t1`.`a`) AS `COUNT(DISTINCT t1.a)` from `test`.`t1` join `test`.`t2` group by `test`.`t1`.`a`) `s1`
|
||||
DROP TABLE t1,t2;
|
||||
|
@@ -497,3 +497,12 @@ WHERE MATCH(a) AGAINST('test' IN BOOLEAN MODE) AND b=1;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ref b b 5 const 4 Using where
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1(a CHAR(10));
|
||||
INSERT INTO t1 VALUES('aaa15');
|
||||
SELECT MATCH(a) AGAINST('aaa1* aaa14 aaa16' IN BOOLEAN MODE) FROM t1;
|
||||
MATCH(a) AGAINST('aaa1* aaa14 aaa16' IN BOOLEAN MODE)
|
||||
1
|
||||
SELECT MATCH(a) AGAINST('aaa1* aaa14 aaa15 aaa16' IN BOOLEAN MODE) FROM t1;
|
||||
MATCH(a) AGAINST('aaa1* aaa14 aaa15 aaa16' IN BOOLEAN MODE)
|
||||
2
|
||||
DROP TABLE t1;
|
||||
|
@@ -717,8 +717,6 @@ insert(_latin2'abcd',2,3,_latin2'ef'),
|
||||
replace(_latin2'abcd',_latin2'b',_latin2'B'),
|
||||
encode('abcd','ab')
|
||||
;
|
||||
Warnings:
|
||||
Warning 1265 Data truncated for column 'format(130,10)' at row 1
|
||||
show create table t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
@@ -727,7 +725,7 @@ t1 CREATE TABLE `t1` (
|
||||
`conv(130,16,10)` varchar(64) default NULL,
|
||||
`hex(130)` varchar(6) NOT NULL default '',
|
||||
`char(130)` varbinary(4) NOT NULL default '',
|
||||
`format(130,10)` varchar(4) NOT NULL default '',
|
||||
`format(130,10)` varchar(16) NOT NULL default '',
|
||||
`left(_latin2'a',1)` varchar(1) character set latin2 NOT NULL default '',
|
||||
`right(_latin2'a',1)` varchar(1) character set latin2 NOT NULL default '',
|
||||
`lcase(_latin2'a')` varchar(1) character set latin2 NOT NULL default '',
|
||||
@@ -2175,4 +2173,12 @@ SELECT HEX(c1) from v1;
|
||||
HEX(c1)
|
||||
414243
|
||||
DROP VIEW v1;
|
||||
create table t1(a float);
|
||||
insert into t1 values (1.33);
|
||||
select format(a, 2) from t1;
|
||||
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
|
||||
def format(a, 2) 253 20 4 Y 0 2 8
|
||||
format(a, 2)
|
||||
1.33
|
||||
drop table t1;
|
||||
End of 5.0 tests
|
||||
|
@@ -23,39 +23,9 @@ SET @@global.max_allowed_packet=4096;
|
||||
SET @@global.net_buffer_length=4096;
|
||||
STOP SLAVE;
|
||||
START SLAVE;
|
||||
CREATE TABLe `t1` (`f1` LONGTEXT) ENGINE=MyISAM;
|
||||
CREATE TABLE `t1` (`f1` LONGTEXT) ENGINE=MyISAM;
|
||||
INSERT INTO `t1`(`f1`) VALUES ('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa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aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa2048');
|
||||
show slave status;
|
||||
Slave_IO_State #
|
||||
Master_Host 127.0.0.1
|
||||
Master_User root
|
||||
Master_Port MASTER_MYPORT
|
||||
Connect_Retry 1
|
||||
Master_Log_File master-bin.000001
|
||||
Read_Master_Log_Pos 2138
|
||||
Relay_Log_File #
|
||||
Relay_Log_Pos #
|
||||
Relay_Master_Log_File master-bin.000001
|
||||
Slave_IO_Running No
|
||||
Slave_SQL_Running #
|
||||
Replicate_Do_DB
|
||||
Replicate_Ignore_DB
|
||||
Replicate_Do_Table
|
||||
Replicate_Ignore_Table
|
||||
Replicate_Wild_Do_Table
|
||||
Replicate_Wild_Ignore_Table
|
||||
Last_Errno 0
|
||||
Last_Error
|
||||
Skip_Counter 0
|
||||
Exec_Master_Log_Pos 2138
|
||||
Relay_Log_Space #
|
||||
Until_Condition None
|
||||
Until_Log_File
|
||||
Until_Log_Pos 0
|
||||
Master_SSL_Allowed No
|
||||
Master_SSL_CA_File
|
||||
Master_SSL_CA_Path
|
||||
Master_SSL_Cert
|
||||
Master_SSL_Cipher
|
||||
Master_SSL_Key
|
||||
Seconds_Behind_Master #
|
||||
Slave_IO_Running = No (expect No)
|
||||
==== clean up ====
|
||||
DROP TABLE t1;
|
||||
DROP TABLE t1;
|
||||
|
@@ -708,4 +708,45 @@ HEX(b1) HEX(b2) i2
|
||||
1 0 100
|
||||
1 0 200
|
||||
DROP TABLE t1, t2;
|
||||
CREATE TABLE IF NOT EXISTS t1 (
|
||||
f1 bit(2) NOT NULL default b'10',
|
||||
f2 bit(14) NOT NULL default b'11110000111100'
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`f1` bit(2) NOT NULL default b'10',
|
||||
`f2` bit(14) NOT NULL default b'11110000111100'
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE IF NOT EXISTS t1 (
|
||||
f1 bit(2) NOT NULL default b''
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
|
||||
ERROR 42000: Invalid default value for 'f1'
|
||||
create table t1bit7 (a1 bit(7) not null) engine=MyISAM;
|
||||
create table t2bit7 (b1 bit(7)) engine=MyISAM;
|
||||
insert into t1bit7 values (b'1100000');
|
||||
insert into t1bit7 values (b'1100001');
|
||||
insert into t1bit7 values (b'1100010');
|
||||
insert into t2bit7 values (b'1100001');
|
||||
insert into t2bit7 values (b'1100010');
|
||||
insert into t2bit7 values (b'1100110');
|
||||
select bin(a1) from t1bit7, t2bit7 where t1bit7.a1=t2bit7.b1;
|
||||
bin(a1)
|
||||
1100001
|
||||
1100010
|
||||
drop table t1bit7, t2bit7;
|
||||
create table t1bit7 (a1 bit(15) not null) engine=MyISAM;
|
||||
create table t2bit7 (b1 bit(15)) engine=MyISAM;
|
||||
insert into t1bit7 values (b'110000011111111');
|
||||
insert into t1bit7 values (b'110000111111111');
|
||||
insert into t1bit7 values (b'110001011111111');
|
||||
insert into t2bit7 values (b'110000111111111');
|
||||
insert into t2bit7 values (b'110001011111111');
|
||||
insert into t2bit7 values (b'110011011111111');
|
||||
select bin(a1) from t1bit7, t2bit7 where t1bit7.a1=t2bit7.b1;
|
||||
bin(a1)
|
||||
110000111111111
|
||||
110001011111111
|
||||
drop table t1bit7, t2bit7;
|
||||
End of 5.0 tests
|
||||
|
@@ -392,4 +392,17 @@ f1 + 0e0
|
||||
1.0000000150475e+30
|
||||
-1.0000000150475e+30
|
||||
drop table t1;
|
||||
create table t1(d double, u bigint unsigned);
|
||||
insert into t1(d) values (9.2233720368547777e+18),
|
||||
(9.223372036854779e18),
|
||||
(9.22337203685479e18),
|
||||
(1.84e19);
|
||||
update t1 set u = d;
|
||||
select u from t1;
|
||||
u
|
||||
9223372036854775808
|
||||
9223372036854779904
|
||||
9223372036854790144
|
||||
18400000000000000000
|
||||
drop table t1;
|
||||
End of 5.0 tests
|
||||
|
Reference in New Issue
Block a user