mirror of
https://github.com/MariaDB/server.git
synced 2026-01-06 05:22:24 +03:00
A lot of fixes for prepared statements (PS):
New mysqltest that can run mysqltest with PS Added support for ZEROFILL in PS Fixed crash when one called mysql_stmt_store_result() without a preceding mysql_stmt_bind_result() Updated test cases to support --ps-protocol (Some tests are still run using old protocol) Fixed crash in PS when using SELECT * FROM t1 NATURAL JOIN t2... Fixed crash in PS when using sub queries Create table didn't signal when table was created. This could cause a "DROP TABLE created_table" in another thread to wait "forever" Fixed wrong permissions check in PS and multi-table updates (one could get permission denied for legal quries) Fix for PS and SELECT ... PROCEDURE Reset all warnings when executing a new PS query group_concat(...ORDER BY) didn't work with PS Fixed problem with test suite when not using innodb
This commit is contained in:
@@ -118,8 +118,11 @@ SET datetime_format=default;
|
||||
# Test of str_to_date
|
||||
#
|
||||
|
||||
# PS doesn't support fraction of a seconds
|
||||
--disable_ps_protocol
|
||||
select str_to_date(concat('15-01-2001',' 2:59:58.999'),
|
||||
concat('%d-%m-%Y',' ','%H:%i:%s.%f'));
|
||||
--enable_ps_protocol
|
||||
|
||||
create table t1 (date char(30), format char(30) not null);
|
||||
insert into t1 values
|
||||
@@ -153,7 +156,8 @@ insert into t1 values
|
||||
('15-01-20', '%d-%m-%y'),
|
||||
('15-2001-1', '%d-%Y-%c');
|
||||
|
||||
# Use through protocol functions
|
||||
# PS doesn't support fractional seconds
|
||||
--disable_ps_protocol
|
||||
select date,format,str_to_date(date, format) as str_to_date from t1;
|
||||
# Use as a string
|
||||
select date,format,concat('',str_to_date(date, format)) as con from t1;
|
||||
@@ -198,6 +202,7 @@ select date,format,str_to_date(date, format) as str_to_date from t1;
|
||||
select date,format,concat(str_to_date(date, format),'') as con from t1;
|
||||
|
||||
drop table t1;
|
||||
--enable_ps_protocol
|
||||
|
||||
#
|
||||
# Test of get_format
|
||||
@@ -221,6 +226,8 @@ insert into t1 values ('2004-07-14'),('2005-07-14');
|
||||
select date_format(d,"%d") from t1 order by 1;
|
||||
drop table t1;
|
||||
|
||||
# PS doesn't support fractional seconds
|
||||
--disable_ps_protocol
|
||||
select str_to_date("2003-....01ABCD-02 10:11:12.0012", "%Y-%.%m%@-%d %H:%i:%S.%f") as a;
|
||||
|
||||
|
||||
@@ -249,3 +256,4 @@ select str_to_date("2003-01-02 10:11:12.0012ABCD", "%Y-%m-%d %H:%i:%S.%f") as f1
|
||||
|
||||
select str_to_date("2003-04-05 g", "%Y-%m-%d") as f1,
|
||||
str_to_date("2003-04-05 10:11:12.101010234567", "%Y-%m-%d %H:%i:%S.%f") as f2;
|
||||
--enable_ps_protocol
|
||||
|
||||
Reference in New Issue
Block a user