mirror of
https://github.com/MariaDB/server.git
synced 2025-08-31 22:22:30 +03:00
Merge 52.0.168.192.in-addr.arpa:/Users/bell/mysql/bk/mysql-5.0
into 52.0.168.192.in-addr.arpa:/Users/bell/mysql/bk/work-repl-5.0
This commit is contained in:
@@ -66,3 +66,12 @@ SET collation_connection='latin1_swedish_ci';
|
||||
-- source include/ctype_filesort.inc
|
||||
SET collation_connection='latin1_bin';
|
||||
-- source include/ctype_filesort.inc
|
||||
|
||||
#
|
||||
# Bug#8041
|
||||
# An unknown character (e.g. 0x84) should result in ERROR,
|
||||
# It was treated like a space character earlier.
|
||||
# Howerver, it should still work fine as a string part.
|
||||
--error 1064
|
||||
CREATE TABLE <20>a (a int);
|
||||
SELECT '<27>a' as str;
|
||||
|
@@ -693,3 +693,8 @@ INSERT INTO t1 VALUES ('one'),('two');
|
||||
SELECT CHARSET('a');
|
||||
SELECT user, CONCAT('<', user, '>') AS c FROM t1;
|
||||
DROP TABLE t1;
|
||||
|
||||
#
|
||||
# Bug#8385: utf8_general_ci treats Cyrillic letters I and SHORT I as the same
|
||||
#
|
||||
select convert(_koi8r'<27>' using utf8) < convert(_koi8r'<27>' using utf8);
|
||||
|
@@ -236,3 +236,15 @@ INSERT INTO t1 VALUES ('root','localhost'), ('root','%');
|
||||
--error 1242
|
||||
SELECT * FROM (SELECT (SELECT a.a FROM t1 AS a WHERE a.a = b.a) FROM t1 AS b) AS c;
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# test of union subquery in the FROM clause with complex distinct/all (BUG#6565)
|
||||
#
|
||||
create table t1(a int);
|
||||
create table t2(a int);
|
||||
create table t3(a int);
|
||||
insert into t1 values(1),(1);
|
||||
insert into t2 values(2),(2);
|
||||
insert into t3 values(3),(3);
|
||||
select * from t1 union distinct select * from t2 union all select * from t3;
|
||||
select * from (select * from t1 union distinct select * from t2 union all select * from t3) X;
|
||||
drop table t1, t2, t3;
|
||||
|
@@ -479,3 +479,9 @@ EXPLAIN
|
||||
WHERE a = CONV('e251273eb74a8ee3', 16, 10);
|
||||
|
||||
DROP TABLE t1;
|
||||
|
||||
#
|
||||
# Bug #6317: string function CHAR, parameter is NULL, wrong result
|
||||
#
|
||||
SELECT CHAR(NULL,121,83,81,'76') as my_column;
|
||||
SELECT CHAR_LENGTH(CHAR(NULL,121,83,81,'76')) as my_column;
|
||||
|
@@ -63,6 +63,7 @@ select pk1,pk2 from t1 where key1 = 10 and key2=10 and 2*pk1+1 < 2*96+1;
|
||||
# Verify that CPK is always used for index intersection scans
|
||||
# (this is because it is used as a filter, not for retrieval)
|
||||
explain select * from t1 where badkey=1 and key1=10;
|
||||
--replace_result 38 ROWS 37 ROWS
|
||||
explain select * from t1 where pk1 < 7500 and key1 = 10;
|
||||
|
||||
# Verify that keys with 'tails' of PK members are ok.
|
||||
|
@@ -363,3 +363,40 @@ create view v1 as select * from t1, t2;
|
||||
set @got_val= (select count(*) from information_schema.columns);
|
||||
drop view v1;
|
||||
drop table t1, t2;
|
||||
|
||||
#
|
||||
# Bug #7476: crash on SELECT * FROM INFORMATION_SCHEMA.TABLES
|
||||
#
|
||||
|
||||
CREATE TABLE t_crashme ( f1 BIGINT);
|
||||
CREATE VIEW a1 (t_CRASHME) AS SELECT f1 FROM t_crashme GROUP BY f1;
|
||||
CREATE VIEW a2 AS SELECT t_CRASHME FROM a1;
|
||||
let $tab_count= 65;
|
||||
--disable_query_log
|
||||
while ($tab_count)
|
||||
{
|
||||
EVAL CREATE TABLE t_$tab_count (f1 BIGINT);
|
||||
dec $tab_count ;
|
||||
}
|
||||
--disable_result_log
|
||||
SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES;
|
||||
--enable_result_log
|
||||
let $tab_count= 65;
|
||||
while ($tab_count)
|
||||
{
|
||||
EVAL DROP TABLE t_$tab_count;
|
||||
dec $tab_count ;
|
||||
}
|
||||
--enable_query_log
|
||||
drop view a2, a1;
|
||||
drop table t_crashme;
|
||||
|
||||
#
|
||||
# Bug #7215 information_schema: columns are longtext instead of varchar
|
||||
# Bug #7217 information_schema: columns are varbinary() instead of timestamp
|
||||
#
|
||||
select table_schema,table_name, column_name from
|
||||
information_schema.columns
|
||||
where data_type = 'longtext';
|
||||
select table_name, column_name, data_type from information_schema.columns
|
||||
where data_type = 'datetime';
|
||||
|
2
mysql-test/t/multi_statement-master.opt
Normal file
2
mysql-test/t/multi_statement-master.opt
Normal file
@@ -0,0 +1,2 @@
|
||||
--log-slow-queries=slow.log
|
||||
--log-queries-not-using-indexes
|
@@ -14,3 +14,18 @@ select "abcd'";'abcd'select "'abcd";'abcd'
|
||||
select 5'abcd'
|
||||
delimiter ;'abcd'
|
||||
select 'finish';
|
||||
|
||||
# Bug #8475: Make sure every statement that is a slow query in
|
||||
# a multi-statement query gets logged as a slow query.
|
||||
flush status;
|
||||
delimiter ||||;
|
||||
create table t1 (i int);
|
||||
insert into t1 values (1);
|
||||
select * from t1 where i = 1;
|
||||
insert into t1 values (2),(3),(4);
|
||||
select * from t1 where i = 2;
|
||||
select * from t1 where i = 3||||
|
||||
show status like 'Slow_queries'||||
|
||||
drop table t1||||
|
||||
|
||||
delimiter ;||||
|
||||
|
@@ -1,3 +1,10 @@
|
||||
# We run with different binaries for normal and --embedded-server
|
||||
#
|
||||
# If this test fails with "command "$MYSQL_CLIENT_TEST" failed",
|
||||
# you should either run mysql_client_test separartely against a running
|
||||
# server or run mysql-test-run --debug mysql_client_test and check
|
||||
# var/log/mysql_client_test.trace
|
||||
|
||||
--disable_result_log
|
||||
--exec echo $MYSQL_CLIENT_TEST
|
||||
--exec $MYSQL_CLIENT_TEST
|
||||
|
@@ -11,7 +11,9 @@
|
||||
--disable_warnings
|
||||
drop table if exists t5, t6, t7, t8;
|
||||
drop database if exists mysqltest ;
|
||||
|
||||
# Cleanup from other tests
|
||||
drop database if exists client_test_db;
|
||||
drop database if exists testtets;
|
||||
drop table if exists t1Aa,t2Aa,v1Aa,v2Aa;
|
||||
drop view if exists t1Aa,t2Aa,v1Aa,v2Aa;
|
||||
|
@@ -157,3 +157,15 @@ connection master;
|
||||
drop table t1;
|
||||
sync_slave_with_master;
|
||||
|
||||
#
|
||||
# BUG#6676: Derivation of variables must be correct on slave
|
||||
#
|
||||
connection master;
|
||||
create table `t1` (
|
||||
`pk` varchar(10) not null default '',
|
||||
primary key (`pk`)
|
||||
) engine=myisam default charset=latin1;
|
||||
set @p=_latin1 'test';
|
||||
update t1 set pk='test' where pk=@p;
|
||||
drop table t1;
|
||||
sync_slave_with_master;
|
||||
|
@@ -175,7 +175,7 @@ while ($1)
|
||||
commit;
|
||||
drop table t1;
|
||||
let $VERSION=`select version()`;
|
||||
--replace_result $VERSION VERSION
|
||||
--replace_result $VERSION VERSION "xid=373" "xid=146"
|
||||
show binlog events in 'master-bin.000001';
|
||||
--replace_result $VERSION VERSION
|
||||
show binlog events in 'master-bin.000002';
|
||||
|
@@ -828,8 +828,8 @@ DROP TABLE t1;
|
||||
# Test INSERT with DOUBLE
|
||||
|
||||
CREATE TABLE t1 (col1 DOUBLE PRECISION, col2 DOUBLE PRECISION UNSIGNED);
|
||||
INSERT INTO t1 VALUES (-2.2E-307,0),(+1.7E+308,+1.7E+308);
|
||||
INSERT INTO t1 VALUES ('-2.2E-307',0),('+1.7E+308','+1.7E+308');
|
||||
INSERT INTO t1 VALUES (-2.2E-307,0),(2E-307,0),(+1.7E+308,+1.7E+308);
|
||||
INSERT INTO t1 VALUES ('-2.2E-307',0),('-2E-307',0),('+1.7E+308','+1.7E+308');
|
||||
# We don't give warnings for underflow
|
||||
INSERT INTO t1 (col1) VALUES (-2.2E-330);
|
||||
--error 1367,1264
|
||||
|
@@ -1,7 +1,7 @@
|
||||
# bug in decimal() with negative numbers by kaido@tradenet.ee
|
||||
|
||||
--disable_warnings
|
||||
DROP TABLE IF EXISTS t1;
|
||||
DROP TABLE IF EXISTS t1, t2;
|
||||
--enable_warnings
|
||||
SET SQL_WARNINGS=1;
|
||||
|
||||
@@ -268,3 +268,20 @@ insert into t1 values ('1'),('+1'),('-1'),('0000000001'),('+0000000001'),('-0000
|
||||
--enable_warnings
|
||||
select * from t1;
|
||||
drop table t1;
|
||||
|
||||
# Test for BUG#8397: decimal type in subselects (Item_cache_decimal)
|
||||
CREATE TABLE t1
|
||||
(EMPNUM CHAR(3) NOT NULL,
|
||||
HOURS DECIMAL(5));
|
||||
CREATE TABLE t2
|
||||
(EMPNUM CHAR(3) NOT NULL,
|
||||
HOURS BIGINT);
|
||||
|
||||
INSERT INTO t1 VALUES ('E1',40);
|
||||
INSERT INTO t1 VALUES ('E8',NULL);
|
||||
INSERT INTO t2 VALUES ('E1',40);
|
||||
|
||||
SELECT EMPNUM FROM t1 WHERE HOURS IN (SELECT HOURS FROM t2);
|
||||
SELECT EMPNUM FROM t1 WHERE HOURS IN (SELECT HOURS FROM t1);
|
||||
|
||||
DROP TABLE t1,t2;
|
||||
|
@@ -12,6 +12,8 @@ SELECT 10,10.0,10.,.1e+2,100.0e-1;
|
||||
SELECT 6e-05, -6e-05, --6e-05, -6e-05+1.000000;
|
||||
SELECT 1e1,1.e1,1.0e1,1e+1,1.e+1,1.0e+1,1e-1,1.e-1,1.0e-1;
|
||||
SELECT 0.001e+1,0.001e-1, -0.001e+01,-0.001e-01;
|
||||
SELECT 123.23E+02,-123.23E-02,"123.23E+02"+0.0,"-123.23E-02"+0.0;
|
||||
SELECT 2147483647E+02,21474836.47E+06;
|
||||
|
||||
create table t1 (f1 float(24),f2 float(52));
|
||||
show full columns from t1;
|
||||
@@ -122,3 +124,23 @@ create table t1 (c char(6));
|
||||
insert into t1 values (2e5),(2e6),(2e-4),(2e-5);
|
||||
select * from t1;
|
||||
drop table t1;
|
||||
|
||||
#
|
||||
# Test of comparison of integer with float-in-range (Bug #7840)
|
||||
# This is needed because some ODBC applications (like Foxpro) uses
|
||||
# floats for everything.
|
||||
#
|
||||
|
||||
CREATE TABLE t1 (
|
||||
reckey int unsigned NOT NULL,
|
||||
recdesc varchar(50) NOT NULL,
|
||||
PRIMARY KEY (reckey)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||
|
||||
INSERT INTO t1 VALUES (108, 'Has 108 as key');
|
||||
INSERT INTO t1 VALUES (109, 'Has 109 as key');
|
||||
select * from t1 where reckey=108;
|
||||
select * from t1 where reckey=1.08E2;
|
||||
select * from t1 where reckey=109;
|
||||
select * from t1 where reckey=1.09E2;
|
||||
drop table t1;
|
||||
|
@@ -85,7 +85,6 @@ select @a=_latin2'TEST' collate latin2_bin;
|
||||
set @a=_latin2'test' collate latin2_general_ci;
|
||||
select charset(@a),collation(@a),coercibility(@a);
|
||||
select @a=_latin2'TEST';
|
||||
--error 1267
|
||||
select @a=_latin2'TEST' collate latin2_bin;
|
||||
|
||||
#
|
||||
@@ -98,7 +97,6 @@ select collation(@a:=_latin2'test' collate latin2_bin);
|
||||
select coercibility(@a:=_latin2'test' collate latin2_bin);
|
||||
select (@a:=_latin2'test' collate latin2_bin) = _latin2'TEST';
|
||||
select charset(@a),collation(@a),coercibility(@a);
|
||||
--error 1267
|
||||
select (@a:=_latin2'test' collate latin2_bin) = _latin2'TEST' collate latin2_general_ci;
|
||||
|
||||
# Check that user variables are binlogged correctly (BUG#3875)
|
||||
|
@@ -7,6 +7,19 @@ drop table if exists t1, t2;
|
||||
SET SQL_WARNINGS=1;
|
||||
|
||||
create table t1 (a int);
|
||||
--error 1050
|
||||
create table t1 (a int);
|
||||
show count(*) errors;
|
||||
show errors;
|
||||
show warnings;
|
||||
--error 1115
|
||||
create table t2(a int) default charset qwerty;
|
||||
show count(*) errors;
|
||||
show errors;
|
||||
--error 1064
|
||||
create table t (i);
|
||||
show count(*) errors;
|
||||
show errors;
|
||||
insert into t1 values (1);
|
||||
insert into t1 values ("hej");
|
||||
insert into t1 values ("hej"),("d<>");
|
||||
|
Reference in New Issue
Block a user