mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/home/my/mysql-5.0
This commit is contained in:
@ -450,6 +450,7 @@ while test $# -gt 0; do
|
||||
--debug=d:t:A,$MYSQL_TEST_DIR/var/log/mysqldump.trace"
|
||||
EXTRA_MYSQLBINLOG_OPT="$EXTRA_MYSQLBINLOG_OPT \
|
||||
--debug=d:t:A,$MYSQL_TEST_DIR/var/log/mysqlbinlog.trace"
|
||||
EXTRA_MYSQL_CLIENT_TEST_OPT="--debug=d:t:A,$MYSQL_TEST_DIR/var/log/mysql_client_test.trace"
|
||||
;;
|
||||
--fast)
|
||||
FAST_START=1
|
||||
@ -690,7 +691,7 @@ then
|
||||
EXTRA_SLAVE_MYSQLD_OPT="$EXTRA_SLAVE_MYSQLD_OPT --user=root"
|
||||
fi
|
||||
|
||||
MYSQL_CLIENT_TEST="$MYSQL_CLIENT_TEST --no-defaults --testcase --user=root --socket=$MASTER_MYSOCK --port=$MYSQL_TCP_PORT --silent"
|
||||
MYSQL_CLIENT_TEST="$MYSQL_CLIENT_TEST --no-defaults --testcase --user=root --socket=$MASTER_MYSOCK --port=$MYSQL_TCP_PORT --silent $EXTRA_MYSQL_CLIENT_TEST_OPT"
|
||||
MYSQL_DUMP="$MYSQL_DUMP --no-defaults -uroot --socket=$MASTER_MYSOCK --password=$DBPASSWD $EXTRA_MYSQLDUMP_OPT"
|
||||
MYSQL_BINLOG="$MYSQL_BINLOG --no-defaults --local-load=$MYSQL_TMP_DIR --character-sets-dir=$CHARSETSDIR $EXTRA_MYSQLBINLOG_OPT"
|
||||
MYSQL_FIX_SYSTEM_TABLES="$MYSQL_FIX_SYSTEM_TABLES --no-defaults --host=localhost --port=$MASTER_MYPORT --socket=$MASTER_MYSOCK --user=root --password=$DBPASSWD --basedir=$BASEDIR --bindir=$CLIENT_BINDIR --verbose"
|
||||
|
@ -325,3 +325,8 @@ latin1_bin 6109
|
||||
latin1_bin 61
|
||||
latin1_bin 6120
|
||||
drop table t1;
|
||||
CREATE TABLE <20>a (a int);
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '<27>a (a int)' at line 1
|
||||
SELECT '<27>a' as str;
|
||||
str
|
||||
<EFBFBD>a
|
||||
|
@ -861,3 +861,6 @@ user c
|
||||
one <one>
|
||||
two <two>
|
||||
DROP TABLE t1;
|
||||
select convert(_koi8r'<27>' using utf8) < convert(_koi8r'<27>' using utf8);
|
||||
convert(_koi8r'<27>' using utf8) < convert(_koi8r'<27>' using utf8)
|
||||
1
|
||||
|
@ -344,3 +344,22 @@ INSERT INTO t1 VALUES ('root','localhost'), ('root','%');
|
||||
SELECT * FROM (SELECT (SELECT a.a FROM t1 AS a WHERE a.a = b.a) FROM t1 AS b) AS c;
|
||||
ERROR 21000: Subquery returns more than 1 row
|
||||
DROP TABLE t1;
|
||||
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;
|
||||
a
|
||||
1
|
||||
2
|
||||
3
|
||||
3
|
||||
select * from (select * from t1 union distinct select * from t2 union all select * from t3) X;
|
||||
a
|
||||
1
|
||||
2
|
||||
3
|
||||
3
|
||||
drop table t1, t2, t3;
|
||||
|
@ -1,5 +1,6 @@
|
||||
drop table if exists t5, t6, t7, t8;
|
||||
drop database if exists mysqltest ;
|
||||
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;
|
||||
|
@ -852,8 +852,8 @@ NULL NULL
|
||||
3.40282e+38 0
|
||||
DROP TABLE t1;
|
||||
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');
|
||||
INSERT INTO t1 (col1) VALUES (-2.2E-330);
|
||||
INSERT INTO t1 (col1) VALUES (+1.7E+309);
|
||||
Got one of the listed errors
|
||||
@ -864,7 +864,7 @@ ERROR 22003: Out of range value adjusted for column 'col1' at row 1
|
||||
INSERT INTO t1 (col2) VALUES ('-1.2E-3');
|
||||
ERROR 22003: Out of range value adjusted for column 'col2' at row 1
|
||||
UPDATE t1 SET col1 =col1 * 5000 WHERE col1 > 0;
|
||||
ERROR 22003: Out of range value adjusted for column 'col1' at row 2
|
||||
ERROR 22003: Out of range value adjusted for column 'col1' at row 3
|
||||
UPDATE t1 SET col2 =col2 / 0 WHERE col2 > 0;
|
||||
ERROR 22012: Division by 0
|
||||
UPDATE t1 SET col2= MOD(col2,0) WHERE col2 > 0;
|
||||
@ -890,9 +890,11 @@ Warning 1264 Out of range value adjusted for column 'col2' at row 1
|
||||
Warning 1264 Out of range value adjusted for column 'col2' at row 1
|
||||
SELECT * FROM t1;
|
||||
col1 col2
|
||||
-2.2e-307 0
|
||||
0 0
|
||||
1e-303 0
|
||||
1.7e+308 1.7e+308
|
||||
-2.2e-307 0
|
||||
0 0
|
||||
-2e-307 0
|
||||
1.7e+308 1.7e+308
|
||||
0 NULL
|
||||
2 NULL
|
||||
|
@ -11,6 +11,12 @@ 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;
|
||||
0.001e+1 0.001e-1 -0.001e+01 -0.001e-01
|
||||
0.01 0.0001 -0.01 -0.0001
|
||||
SELECT 123.23E+02,-123.23E-02,"123.23E+02"+0.0,"-123.23E-02"+0.0;
|
||||
123.23E+02 -123.23E-02 "123.23E+02"+0.0 "-123.23E-02"+0.0
|
||||
12323 -1.2323 12323 -1.2323
|
||||
SELECT 2147483647E+02,21474836.47E+06;
|
||||
2147483647E+02 21474836.47E+06
|
||||
214748364700 21474836470000
|
||||
create table t1 (f1 float(24),f2 float(52));
|
||||
show full columns from t1;
|
||||
Field Type Collation Null Key Default Extra Privileges Comment
|
||||
@ -209,3 +215,23 @@ c
|
||||
0.0002
|
||||
2e-05
|
||||
drop table t1;
|
||||
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;
|
||||
reckey recdesc
|
||||
108 Has 108 as key
|
||||
select * from t1 where reckey=1.08E2;
|
||||
reckey recdesc
|
||||
108 Has 108 as key
|
||||
select * from t1 where reckey=109;
|
||||
reckey recdesc
|
||||
109 Has 109 as key
|
||||
select * from t1 where reckey=1.09E2;
|
||||
reckey recdesc
|
||||
109 Has 109 as key
|
||||
drop table t1;
|
||||
|
@ -127,7 +127,7 @@ drop table t1;
|
||||
set @a=_latin2'test';
|
||||
select charset(@a),collation(@a),coercibility(@a);
|
||||
charset(@a) collation(@a) coercibility(@a)
|
||||
latin2 latin2_general_ci 3
|
||||
latin2 latin2_general_ci 2
|
||||
select @a=_latin2'TEST';
|
||||
@a=_latin2'TEST'
|
||||
1
|
||||
@ -137,12 +137,13 @@ select @a=_latin2'TEST' collate latin2_bin;
|
||||
set @a=_latin2'test' collate latin2_general_ci;
|
||||
select charset(@a),collation(@a),coercibility(@a);
|
||||
charset(@a) collation(@a) coercibility(@a)
|
||||
latin2 latin2_general_ci 0
|
||||
latin2 latin2_general_ci 2
|
||||
select @a=_latin2'TEST';
|
||||
@a=_latin2'TEST'
|
||||
1
|
||||
select @a=_latin2'TEST' collate latin2_bin;
|
||||
ERROR HY000: Illegal mix of collations (latin2_general_ci,EXPLICIT) and (latin2_bin,EXPLICIT) for operation '='
|
||||
@a=_latin2'TEST' collate latin2_bin
|
||||
0
|
||||
select charset(@a:=_latin2'test');
|
||||
charset(@a:=_latin2'test')
|
||||
latin2
|
||||
@ -151,21 +152,22 @@ collation(@a:=_latin2'test')
|
||||
latin2_general_ci
|
||||
select coercibility(@a:=_latin2'test');
|
||||
coercibility(@a:=_latin2'test')
|
||||
3
|
||||
2
|
||||
select collation(@a:=_latin2'test' collate latin2_bin);
|
||||
collation(@a:=_latin2'test' collate latin2_bin)
|
||||
latin2_bin
|
||||
select coercibility(@a:=_latin2'test' collate latin2_bin);
|
||||
coercibility(@a:=_latin2'test' collate latin2_bin)
|
||||
0
|
||||
2
|
||||
select (@a:=_latin2'test' collate latin2_bin) = _latin2'TEST';
|
||||
(@a:=_latin2'test' collate latin2_bin) = _latin2'TEST'
|
||||
0
|
||||
select charset(@a),collation(@a),coercibility(@a);
|
||||
charset(@a) collation(@a) coercibility(@a)
|
||||
latin2 latin2_bin 0
|
||||
latin2 latin2_bin 2
|
||||
select (@a:=_latin2'test' collate latin2_bin) = _latin2'TEST' collate latin2_general_ci;
|
||||
ERROR HY000: Illegal mix of collations (latin2_bin,EXPLICIT) and (latin2_general_ci,EXPLICIT) for operation '='
|
||||
(@a:=_latin2'test' collate latin2_bin) = _latin2'TEST' collate latin2_general_ci
|
||||
1
|
||||
create table t1 (a varchar(50));
|
||||
reset master;
|
||||
SET TIMESTAMP=10000;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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
|
||||
|
@ -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)
|
||||
|
Reference in New Issue
Block a user