mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Merge mysql.com:/home/mydev/mysql-5.0
into mysql.com:/home/mydev/mysql-5.0-bug5390
This commit is contained in:
@ -360,8 +360,6 @@ s1 count(s1)
|
||||
y 1
|
||||
drop table t1;
|
||||
DROP SCHEMA IF EXISTS HU;
|
||||
Warnings:
|
||||
Note 1008 Can't drop database 'HU'; database doesn't exist
|
||||
CREATE SCHEMA HU ;
|
||||
USE HU ;
|
||||
CREATE TABLE STAFF
|
||||
|
@ -564,3 +564,12 @@ b1+0 sum(b1) sum(b2)
|
||||
1 4 4
|
||||
2 2 2
|
||||
drop table t1, t2;
|
||||
create table t1 (a bit(7));
|
||||
insert into t1 values (0x60);
|
||||
select * from t1;
|
||||
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
|
||||
def test t1 t1 a a 16 7 1 Y 0 0 63
|
||||
a
|
||||
`
|
||||
drop table t1;
|
||||
End of 5.0 tests
|
||||
|
@ -402,3 +402,12 @@ t1 CREATE TABLE `t1` (
|
||||
`b` bit(10) default NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
drop table t1;
|
||||
create table t1 (a bit(7)) engine=innodb;
|
||||
insert into t1 values (0x60);
|
||||
select * from t1;
|
||||
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
|
||||
def test t1 t1 a a 16 7 1 Y 0 0 63
|
||||
a
|
||||
`
|
||||
drop table t1;
|
||||
End of 5.0 tests
|
||||
|
@ -2579,3 +2579,24 @@ COUNT(*)
|
||||
2
|
||||
DROP VIEW v2;
|
||||
DROP TABLE t1, t2;
|
||||
CREATE TABLE t1 (id int NOT NULL PRIMARY KEY,
|
||||
td date DEFAULT NULL, KEY idx(td));
|
||||
INSERT INTO t1 VALUES
|
||||
(1, '2005-01-01'), (2, '2005-01-02'), (3, '2005-01-02'),
|
||||
(4, '2005-01-03'), (5, '2005-01-04'), (6, '2005-01-05'),
|
||||
(7, '2005-01-05'), (8, '2005-01-05'), (9, '2005-01-06');
|
||||
CREATE VIEW v1 AS SELECT * FROM t1;
|
||||
SELECT * FROM t1 WHERE td BETWEEN '2005.01.02' AND '2005.01.04';
|
||||
id td
|
||||
2 2005-01-02
|
||||
3 2005-01-02
|
||||
4 2005-01-03
|
||||
5 2005-01-04
|
||||
SELECT * FROM v1 WHERE td BETWEEN '2005.01.02' AND '2005.01.04';
|
||||
id td
|
||||
2 2005-01-02
|
||||
3 2005-01-02
|
||||
4 2005-01-03
|
||||
5 2005-01-04
|
||||
DROP VIEW v1;
|
||||
DROP TABLE t1;
|
||||
|
@ -354,7 +354,9 @@ drop table t1;
|
||||
# when the server is run on Windows or with --lower-case-table-names=1
|
||||
#
|
||||
|
||||
--disable_warnings
|
||||
DROP SCHEMA IF EXISTS HU;
|
||||
--enable_warnings
|
||||
CREATE SCHEMA HU ;
|
||||
USE HU ;
|
||||
|
||||
|
@ -227,3 +227,15 @@ select sum(a1), b1+0, b2+0 from t1 join t2 on b1 = b2 group by b1 order by 1;
|
||||
select 1 from t1 join t2 on b1 = b2 group by b1 order by 1;
|
||||
select b1+0,sum(b1), sum(b2) from t1 join t2 on b1 = b2 group by b1 order by 1;
|
||||
drop table t1, t2;
|
||||
|
||||
#
|
||||
# Bug #13601: Wrong field length reported for BIT fields
|
||||
#
|
||||
create table t1 (a bit(7));
|
||||
insert into t1 values (0x60);
|
||||
--enable_metadata
|
||||
select * from t1;
|
||||
--disable_metadata
|
||||
drop table t1;
|
||||
|
||||
--echo End of 5.0 tests
|
||||
|
@ -133,3 +133,15 @@ show create table t1;
|
||||
alter table t1 engine=innodb;
|
||||
show create table t1;
|
||||
drop table t1;
|
||||
|
||||
#
|
||||
# Bug #13601: Wrong field length reported for BIT fields
|
||||
#
|
||||
create table t1 (a bit(7)) engine=innodb;
|
||||
insert into t1 values (0x60);
|
||||
--enable_metadata
|
||||
select * from t1;
|
||||
--disable_metadata
|
||||
drop table t1;
|
||||
|
||||
--echo End of 5.0 tests
|
||||
|
@ -2434,3 +2434,23 @@ SELECT COUNT(*) FROM t1 LEFT JOIN v2 ON t1.id=v2.id;
|
||||
DROP VIEW v2;
|
||||
|
||||
DROP TABLE t1, t2;
|
||||
|
||||
#
|
||||
# Bug #16069: VIEW does return the same results as underlying SELECT
|
||||
# with WHERE condition containing BETWEEN over dates
|
||||
|
||||
CREATE TABLE t1 (id int NOT NULL PRIMARY KEY,
|
||||
td date DEFAULT NULL, KEY idx(td));
|
||||
|
||||
INSERT INTO t1 VALUES
|
||||
(1, '2005-01-01'), (2, '2005-01-02'), (3, '2005-01-02'),
|
||||
(4, '2005-01-03'), (5, '2005-01-04'), (6, '2005-01-05'),
|
||||
(7, '2005-01-05'), (8, '2005-01-05'), (9, '2005-01-06');
|
||||
|
||||
CREATE VIEW v1 AS SELECT * FROM t1;
|
||||
|
||||
SELECT * FROM t1 WHERE td BETWEEN '2005.01.02' AND '2005.01.04';
|
||||
SELECT * FROM v1 WHERE td BETWEEN '2005.01.02' AND '2005.01.04';
|
||||
|
||||
DROP VIEW v1;
|
||||
DROP TABLE t1;
|
||||
|
Reference in New Issue
Block a user