mirror of
https://github.com/MariaDB/server.git
synced 2025-12-24 11:21:21 +03:00
Merge trunk -> trunk-runtime.
This commit is contained in:
5
mysql-test/include/have_federated_plugin.inc
Normal file
5
mysql-test/include/have_federated_plugin.inc
Normal file
@@ -0,0 +1,5 @@
|
||||
if (`select plugin_library IS NULL from information_schema.plugins where plugin_name LIKE '%federated%'`)
|
||||
{
|
||||
--skip federated plugin not available
|
||||
}
|
||||
|
||||
@@ -73,3 +73,23 @@ id text
|
||||
line2
|
||||
line3
|
||||
drop table t1;
|
||||
#
|
||||
# Bug#51571 load xml infile causes server crash
|
||||
#
|
||||
CREATE TABLE t1 (a text, b text);
|
||||
LOAD XML INFILE '../../std_data/loadxml.dat' INTO TABLE t1
|
||||
ROWS IDENTIFIED BY '<row>' (a,@b) SET b=concat('!',@b);
|
||||
SELECT * FROM t1 ORDER BY a;
|
||||
a b
|
||||
1 !b1
|
||||
11 !b11
|
||||
111 !b111
|
||||
112 !b112 & < > " ' &unknown; -- check entities
|
||||
2 !b2
|
||||
212 !b212
|
||||
213 !b213
|
||||
214 !b214
|
||||
215 !b215
|
||||
216 !&bb b;
|
||||
3 !b3
|
||||
DROP TABLE t1;
|
||||
|
||||
@@ -94,7 +94,7 @@ Warnings:
|
||||
Warning 1265 Data truncated for column 'd' at row 1
|
||||
UPDATE t1 SET d=1/NULL;
|
||||
Warnings:
|
||||
Warning 1265 Data truncated for column 'd' at row 1
|
||||
Warning 1048 Column 'd' cannot be null
|
||||
UPDATE t1 SET d=NULL;
|
||||
Warnings:
|
||||
Warning 1048 Column 'd' cannot be null
|
||||
|
||||
@@ -638,3 +638,22 @@ CAST(CAST('2008-07-29T10:42:51.1234567' AS DateTime) AS DECIMAL(30,7))
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect datetime value: '2008-07-29T10:42:51.1234567'
|
||||
End of 5.1 tests
|
||||
#
|
||||
# Start of 5.5 tests
|
||||
#
|
||||
#
|
||||
# Bug#52849 datetime index not work
|
||||
#
|
||||
CREATE TABLE t1 (Id INT, AtTime DATETIME, KEY AtTime (AtTime));
|
||||
SET NAMES CP850;
|
||||
INSERT INTO t1 VALUES (1,'2010-04-12 22:30:12'), (2,'2010-04-12 22:30:12'), (3,'2010-04-12 22:30:12');
|
||||
EXPLAIN EXTENDED SELECT * FROM t1 FORCE INDEX(attime) WHERE AtTime = '2010-02-22 18:40:07';
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 SIMPLE t1 ref AtTime AtTime 9 const 1 100.00 Using where
|
||||
Warnings:
|
||||
Note 1003 select `test`.`t1`.`Id` AS `Id`,`test`.`t1`.`AtTime` AS `AtTime` from `test`.`t1` FORCE INDEX (`attime`) where (`test`.`t1`.`AtTime` = '2010-02-22 18:40:07')
|
||||
DROP TABLE t1;
|
||||
SET NAMES latin1;
|
||||
#
|
||||
# End of 5.5 tests
|
||||
#
|
||||
|
||||
@@ -429,3 +429,34 @@ INSERT INTO t1 VALUES (1);
|
||||
INSERT INTO t1 VALUES (1);
|
||||
DROP TABLE t1;
|
||||
End of 5.1 tests
|
||||
DROP TABLE IF EXISTS t1;
|
||||
CREATE TABLE t1(f1 INT AUTO_INCREMENT, PRIMARY KEY(f1));
|
||||
INSERT INTO t1 SET f1 = NULL ;
|
||||
SET @aux = NULL ;
|
||||
INSERT INTO t1 SET f1 = @aux ;
|
||||
SET @aux1 = 0.123E-1;
|
||||
SET @aux1 = NULL;
|
||||
INSERT INTO t1 SET f1 = @aux1 ;
|
||||
SELECT * FROM t1;
|
||||
f1
|
||||
1
|
||||
2
|
||||
3
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1(f1 VARCHAR(257) , f2 INT, PRIMARY KEY(f2));
|
||||
CREATE TRIGGER trg1 BEFORE INSERT ON t1 FOR EACH ROW SET @aux = 1;
|
||||
SET @aux = 1;
|
||||
SET @aux = NULL;
|
||||
INSERT INTO test.t1 (f1, f2) VALUES (1, 1), (@aux, 2);
|
||||
SET @aux = 'text';
|
||||
SET @aux = NULL;
|
||||
INSERT INTO t1(f1, f2) VALUES (1, 3), (@aux, 4);
|
||||
SELECT f1, f2 FROM t1 ORDER BY f2;
|
||||
f1 f2
|
||||
1 1
|
||||
1 2
|
||||
1 3
|
||||
1 4
|
||||
DROP TRIGGER trg1;
|
||||
DROP TABLE t1;
|
||||
End of 5.5 tests
|
||||
|
||||
2
mysql-test/suite/federated/federated_plugin-master.opt
Normal file
2
mysql-test/suite/federated/federated_plugin-master.opt
Normal file
@@ -0,0 +1,2 @@
|
||||
--plugin_dir=../storage/federated/.libs
|
||||
|
||||
0
mysql-test/suite/federated/federated_plugin.result
Normal file
0
mysql-test/suite/federated/federated_plugin.result
Normal file
22
mysql-test/suite/federated/federated_plugin.test
Normal file
22
mysql-test/suite/federated/federated_plugin.test
Normal file
@@ -0,0 +1,22 @@
|
||||
--source include/not_windows.inc
|
||||
--source include/have_federated_plugin.inc
|
||||
|
||||
CREATE TABLE t1(a int) ENGINE=FEDERATED;
|
||||
DROP TABLE t1;
|
||||
|
||||
INSTALL PLUGIN federated SONAME 'ha_federated.so';
|
||||
--error 1125
|
||||
INSTALL PLUGIN FEDERATED SONAME 'ha_federated.so';
|
||||
|
||||
UNINSTALL PLUGIN federated;
|
||||
|
||||
INSTALL PLUGIN federated SONAME 'ha_federated.so';
|
||||
|
||||
CREATE TABLE t1(a int) ENGINE=FEDERATED;
|
||||
|
||||
DROP TABLE t1;
|
||||
|
||||
UNINSTALL PLUGIN federated;
|
||||
--error ER_SP_DOES_NOT_EXIST
|
||||
UNINSTALL PLUGIN federated;
|
||||
|
||||
@@ -108,3 +108,11 @@ load xml infile '../../std_data/loadxml2.dat' into table t1;
|
||||
select * from t1;
|
||||
drop table t1;
|
||||
|
||||
--echo #
|
||||
--echo # Bug#51571 load xml infile causes server crash
|
||||
--echo #
|
||||
CREATE TABLE t1 (a text, b text);
|
||||
LOAD XML INFILE '../../std_data/loadxml.dat' INTO TABLE t1
|
||||
ROWS IDENTIFIED BY '<row>' (a,@b) SET b=concat('!',@b);
|
||||
SELECT * FROM t1 ORDER BY a;
|
||||
DROP TABLE t1;
|
||||
|
||||
@@ -446,3 +446,21 @@ SELECT CAST(CAST('00000002006-000008-0000010 000010:0000011:00000012.012345' AS
|
||||
SELECT CAST(CAST('2008-07-29T10:42:51.1234567' AS DateTime) AS DECIMAL(30,7));
|
||||
|
||||
--echo End of 5.1 tests
|
||||
|
||||
--echo #
|
||||
--echo # Start of 5.5 tests
|
||||
--echo #
|
||||
|
||||
--echo #
|
||||
--echo # Bug#52849 datetime index not work
|
||||
--echo #
|
||||
CREATE TABLE t1 (Id INT, AtTime DATETIME, KEY AtTime (AtTime));
|
||||
SET NAMES CP850;
|
||||
INSERT INTO t1 VALUES (1,'2010-04-12 22:30:12'), (2,'2010-04-12 22:30:12'), (3,'2010-04-12 22:30:12');
|
||||
EXPLAIN EXTENDED SELECT * FROM t1 FORCE INDEX(attime) WHERE AtTime = '2010-02-22 18:40:07';
|
||||
DROP TABLE t1;
|
||||
SET NAMES latin1;
|
||||
|
||||
--echo #
|
||||
--echo # End of 5.5 tests
|
||||
--echo #
|
||||
|
||||
@@ -327,3 +327,44 @@ INSERT INTO t1 VALUES (1);
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo End of 5.1 tests
|
||||
|
||||
#
|
||||
# Bug#50511: Sometimes wrong handling of user variables containing NULL.
|
||||
#
|
||||
|
||||
--disable_warnings
|
||||
DROP TABLE IF EXISTS t1;
|
||||
--enable_warnings
|
||||
|
||||
CREATE TABLE t1(f1 INT AUTO_INCREMENT, PRIMARY KEY(f1));
|
||||
|
||||
INSERT INTO t1 SET f1 = NULL ;
|
||||
|
||||
SET @aux = NULL ;
|
||||
INSERT INTO t1 SET f1 = @aux ;
|
||||
|
||||
SET @aux1 = 0.123E-1;
|
||||
SET @aux1 = NULL;
|
||||
INSERT INTO t1 SET f1 = @aux1 ;
|
||||
|
||||
SELECT * FROM t1;
|
||||
|
||||
DROP TABLE t1;
|
||||
|
||||
CREATE TABLE t1(f1 VARCHAR(257) , f2 INT, PRIMARY KEY(f2));
|
||||
CREATE TRIGGER trg1 BEFORE INSERT ON t1 FOR EACH ROW SET @aux = 1;
|
||||
|
||||
SET @aux = 1; # INT
|
||||
SET @aux = NULL;
|
||||
INSERT INTO test.t1 (f1, f2) VALUES (1, 1), (@aux, 2);
|
||||
|
||||
SET @aux = 'text'; # STRING
|
||||
SET @aux = NULL;
|
||||
INSERT INTO t1(f1, f2) VALUES (1, 3), (@aux, 4);
|
||||
|
||||
SELECT f1, f2 FROM t1 ORDER BY f2;
|
||||
|
||||
DROP TRIGGER trg1;
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo End of 5.5 tests
|
||||
|
||||
Reference in New Issue
Block a user