summaryrefslogtreecommitdiff
path: root/mysql-test/t
diff options
context:
space:
mode:
authorunknown <monty@narttu.mysql.fi>2003-11-03 14:01:59 +0200
committerunknown <monty@narttu.mysql.fi>2003-11-03 14:01:59 +0200
commitbee5d9d4627a3b6d09430015357487c1c6c94bca (patch)
treef9406690fb9f579e21f4877826d439fb785d6902 /mysql-test/t
parentdd85b7602660a400f71d16d00bb8c869d4320c7a (diff)
downloadmariadb-git-bee5d9d4627a3b6d09430015357487c1c6c94bca.tar.gz
Simplified 'wrong xxx name' error messages by introducing 'general' ER_WRONG_NAME error
Cleaned up (and disabled part of) date/time/datetime format patch. One can't anymore change default read/write date/time/formats. This is becasue the non standard datetime formats can't be compared as strings and MySQL does still a lot of datetime comparisons as strings Changed flag argument to str_to_TIME() and get_date() from bool to uint Removed THD from str_to_xxxx functions and Item class. Fixed core dump when doing --print-defaults Move some common string functions to strfunc.cc Dates as strings are now of type my_charset_bin instead of default_charset() Introduce IDENT_QUOTED to not have to create an extra copy of simple identifiers (all chars < 128) Removed xxx_FORMAT_TYPE enums and replaced them with the old TIMESTAMP_xxx enums Renamed some TIMESTAMP_xxx enums to more appropriate names Use defines instead of integers for date/time/datetime string lengths Added to build system and use the new my_strtoll10() function. BUILD/compile-pentium-valgrind-max: Remove double printing of warning VC++Files/libmysqld/libmysqld.dsp: Added strfunc.cc VC++Files/sql/mysqld.dsp: Added strfunc.cc VC++Files/sql/mysqldmax.dsp: Added strfunc.cc VC++Files/strings/strings.dsp: added my_strtoll10.c include/m_ctype.h: Removed MY_LEX_FOUND_IDENT (not used) include/m_string.h: Added my_strtoll10() include/mysqld_error.h: simplified 'wrong xxx name' error messages include/sql_state.h: simplified 'wrong xxx name' error messages libmysqld/Makefile.am: Added strfunc.cc mysql-test/mysql-test-run.sh: Simplified some options changed $@ to "$@" in an attempt to handle options with space (Didn't succeed; Problem will disappear when mysql-test-run is rewritten in C) mysql-test/r/ctype_latin1_de.result: Added new tests mysql-test/r/ctype_recoding.result: Extended tests mysql-test/r/date_formats.result: Cleaned up tests Disabled some tests that can't yet be run mysql-test/r/func_compress.result: New error message mysql-test/r/rpl_temporary.result: Added new test mysql-test/t/create.test: Changed error numbers mysql-test/t/ctype_latin1_de.test: New tests mysql-test/t/ctype_recoding.test: Extended tests mysql-test/t/date_formats-master.opt: Removed datetime_format as we can't handle options with space in mysql-test-run mysql-test/t/date_formats.test: Cleaned up tests Disabled some tests that can't yet be run mysql-test/t/rpl_temporary.test: Added testing of open temporary table on slave shutdown mysql-test/t/symlink.test: Fixed error numbers mysys/default.c: Fixed core dump when doing --print-defaults sql/Makefile.am: Added strfunc.cc sql/derror.cc: Fixed compiler warning sql/field.cc: Changed argument to str_to_TIME() from bool to uint Removed THD argument from str_to_TIME() Moved find_enum() and find_set() to strfunc.cc sql/field.h: Changed type of last argument to get_date() to be able to handle more options sql/init.cc: Remove not used variable dayord sql/item.cc: Changed type of last argument to get_date() to be able to handle more options Removed THD* element from item. Don't use make_date_time() to generate date/time/datetimes sql/item.h: Changed type of last argument to get_date() to be able to handle more options Removed THD* from Item sql/item_create.cc: Indentation cleanup sql/item_func.cc: Use new find_type() sql/item_func.h: Changed type of last argument to get_date() to be able to handle more options sql/item_strfunc.h: space change sql/item_timefunc.cc: Changed month_names[] to be easier to use Moved check_names[] to strfunc.cc Added back old make_datetime() function Optimized extract_date_time() Use my_strtoll10() insetad of my_strntoll() Optimized make_date_time() Replaced short variable names with long ones. Use new functions make_time(), make_date() and make_datetime() Dates as strings are now of type my_charset_bin instead of default_charset() Changed Item_func_str_to_date() to by default return a date. sql/item_timefunc.h: Changed charset for date string from default_charset() to my_charset_bin Changed type of last argument to get_date() to be able to handle more options Use defines instead of integers for date/time/datetime string lengths sql/mysql_priv.h: Fixed/added new prototypes sql/mysqld.cc: Removed opt_datetime_format_names Cleaned up handling of date_time format handling. (Fixed core dump when mysqld had error on startup) Removed some unnecessary double init of collation variables sql/protocol.cc: Changed back protocol functions to always return dates in ISO format sql/set_var.cc: Added variables time_format, date_format and datetime_format This had to be recoded becasue checking was done in 'update' method and not in 'check' method. sql/set_var.h: Removed class sys_var_datetime_format() as this defined a variable (which doesn't work) instead of updating a variable sql/share/czech/errmsg.txt: simplified 'wrong xxx name' error messages sql/share/danish/errmsg.txt: simplified 'wrong xxx name' error messages sql/share/dutch/errmsg.txt: simplified 'wrong xxx name' error messages sql/share/english/errmsg.txt: simplified 'wrong xxx name' error messages sql/share/estonian/errmsg.txt: simplified 'wrong xxx name' error messages sql/share/french/errmsg.txt: simplified 'wrong xxx name' error messages sql/share/german/errmsg.txt: simplified 'wrong xxx name' error messages sql/share/greek/errmsg.txt: simplified 'wrong xxx name' error messages sql/share/hungarian/errmsg.txt: simplified 'wrong xxx name' error messages sql/share/italian/errmsg.txt: simplified 'wrong xxx name' error messages sql/share/japanese/errmsg.txt: simplified 'wrong xxx name' error messages sql/share/korean/errmsg.txt: simplified 'wrong xxx name' error messages sql/share/norwegian-ny/errmsg.txt: simplified 'wrong xxx name' error messages sql/share/norwegian/errmsg.txt: simplified 'wrong xxx name' error messages sql/share/polish/errmsg.txt: simplified 'wrong xxx name' error messages sql/share/portuguese/errmsg.txt: simplified 'wrong xxx name' error messages sql/share/romanian/errmsg.txt: simplified 'wrong xxx name' error messages sql/share/russian/errmsg.txt: simplified 'wrong xxx name' error messages sql/share/serbian/errmsg.txt: simplified 'wrong xxx name' error messages sql/share/slovak/errmsg.txt: simplified 'wrong xxx name' error messages sql/share/spanish/errmsg.txt: simplified 'wrong xxx name' error messages sql/share/swedish/errmsg.txt: simplified 'wrong xxx name' error messages sql/share/ukrainian/errmsg.txt: simplified 'wrong xxx name' error messages sql/sql_base.cc: Use new find_type() sql/sql_class.cc: Allocate/free date_time format variables sql/sql_class.h: Define datetime_format variables sql/sql_db.cc: Use new ER_WRONG_NAME error sql/sql_lex.cc: Change lex to generate IDENT_QUOTED for quoted identifiers or identifers that are using characters > 128. This enabled us to not have to copy and convert the identifier to utf8 for simpe identifiers sql/sql_parse.cc: Use new ER_WRONG_NAME error Use new find_type() function sql/sql_prepare.cc: Use new defines sql/sql_table.cc: Use new ER_WRONG_NAME error sql/sql_yacc.yy: Don't copy and convert simple identifiers to utf8. Replace __FORMAT_TYPE defines with TIMESTAMP... defines sql/structs.h: Renamed DATETIME_FORMAT to DATE_TIME format to indicate that it's for date/time/datetime formats Renamed WRONT_TIMESTAMP_FULL to TIMESTAMP_DATETIME_ERROR and TIMESTAMP_FULL to TIMESTAMP_DATETIME Added KNOWN_DATE_TIME_FORMAT struct for Item_func_get_format sql/time.cc: Prepare str_to_TIME and str_to_time() for general date/time handling Removed THD from str_to... functions Renamed date/time/datetime functions to use 'date_time' instead of 'datetime' Added functions to make and copy DATE_TIME_FORMAT's Added trivial functions 'make_time()', 'make_date()' and 'make_datetime()' strings/Makefile.am: Added my_strtoll10() strings/ctype-bin.c: Cleared upper part of binary state map to be able to easily identify simple identifiers strings/my_vsnprintf.c: F
Diffstat (limited to 'mysql-test/t')
-rw-r--r--mysql-test/t/create.test22
-rw-r--r--mysql-test/t/ctype_latin1_de.test2
-rw-r--r--mysql-test/t/ctype_recoding.test4
-rw-r--r--mysql-test/t/date_formats-master.opt2
-rw-r--r--mysql-test/t/date_formats.test253
-rw-r--r--mysql-test/t/rpl_temporary-master.opt0
-rw-r--r--mysql-test/t/rpl_temporary.test8
-rw-r--r--mysql-test/t/symlink.test4
8 files changed, 214 insertions, 81 deletions
diff --git a/mysql-test/t/create.test b/mysql-test/t/create.test
index 059808161a3..cec7dd17e6d 100644
--- a/mysql-test/t/create.test
+++ b/mysql-test/t/create.test
@@ -40,9 +40,9 @@ create table t1 (ordid int(8) not null auto_increment, ord varchar(50) not null
-- error 1044,1
create table not_existing_database.test (a int);
---error 1103
+--error 1279
create table `a/a` (a int);
---error 1103
+--error 1279
create table `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa` (aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa int);
--error 1059
create table a (`aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa` int);
@@ -66,11 +66,11 @@ create table test_$1.test2$ (a int);
drop table test_$1.test2$;
drop database test_$1;
---error 1103
+--error 1279
create table `` (a int);
---error 1103
+--error 1279
drop table if exists ``;
---error 1166
+--error 1279
create table t1 (`` int);
--error 1279
create table t1 (i int, index `` (i));
@@ -254,12 +254,16 @@ create table t2 like t3;
show create table t2;
select * from t2;
create table t3 like t1;
-!$1050 create table t3 like test_$1.t3;
+--error 1050
+create table t3 like test_$1.t3;
--error 1044,1
create table non_existing_database.t1 like t1;
-!$1051 create table t3 like non_existing_table;
-!$1050 create temporary table t3 like t1;
-!$1103 create table t3 like `a/a`;
+--error 1051
+create table t3 like non_existing_table;
+--error 1050
+create temporary table t3 like t1;
+--error 1279
+create table t3 like `a/a`;
drop table t1, t2, t3;
drop table t3;
drop database test_$1;
diff --git a/mysql-test/t/ctype_latin1_de.test b/mysql-test/t/ctype_latin1_de.test
index 52ee227b011..a5d0c29baf6 100644
--- a/mysql-test/t/ctype_latin1_de.test
+++ b/mysql-test/t/ctype_latin1_de.test
@@ -64,6 +64,7 @@ drop table t1;
# The below checks both binary and character comparisons.
#
create table t1 (word varchar(255) not null, word2 varchar(255) not null, index(word));
+show create table t1;
insert into t1 (word) values ('ss'),(0xDF),(0xE4),('ae');
update t1 set word2=word;
select word, word=binary 0xdf as t from t1 having t > 0;
@@ -85,6 +86,7 @@ drop table t1;
CREATE TABLE t1 (
s1 CHAR(5) CHARACTER SET latin1 COLLATE latin1_german2_ci
);
+show create table t1;
INSERT INTO t1 VALUES ('э');
INSERT INTO t1 VALUES ('ue');
SELECT DISTINCT s1 FROM t1;
diff --git a/mysql-test/t/ctype_recoding.test b/mysql-test/t/ctype_recoding.test
index 325a8f075ed..2f08e021df2 100644
--- a/mysql-test/t/ctype_recoding.test
+++ b/mysql-test/t/ctype_recoding.test
@@ -1,7 +1,7 @@
SET CHARACTER SET koi8r;
--disable_warnings
-DROP TABLE IF EXISTS таблица;
+DROP TABLE IF EXISTS таблица, t1;
--enable_warnings
SET CHARACTER SET koi8r;
@@ -11,7 +11,7 @@ SELECT a FROM t1;
SELECT HEX(a) FROM t1;
DROP TABLE t1;
-CREATE TABLE таблица
+CREATE TABLE `таблица`
(
поле CHAR(32) CHARACTER SET koi8r NOT NULL COMMENT "комментарий поля"
) COMMENT "комментарий таблицы";
diff --git a/mysql-test/t/date_formats-master.opt b/mysql-test/t/date_formats-master.opt
index 7977a601dd7..ab243fe729c 100644
--- a/mysql-test/t/date_formats-master.opt
+++ b/mysql-test/t/date_formats-master.opt
@@ -1 +1 @@
---date_format=%d.%m.%Y --time_format=%H.%i.%s --datetime_format=%Y/%d/%m-%H:%i:%s
+--date-format=%d.%m.%Y --time-format=%H.%i.%s
diff --git a/mysql-test/t/date_formats.test b/mysql-test/t/date_formats.test
index 9551efaa648..f174e61d164 100644
--- a/mysql-test/t/date_formats.test
+++ b/mysql-test/t/date_formats.test
@@ -1,82 +1,201 @@
+#
+# Test of date format functions
+#
+
+--disable-warnings
+drop table if exists t1;
+--enable-warnings
+
SHOW GLOBAL VARIABLES LIKE "%_format%";
SHOW SESSION VARIABLES LIKE "%_format%";
-SET date_format="%d.%m.%Y";
-select CAST("01.01.2001" as DATE) as a;
-SET datetime_format="%d.%m.%Y %H.%i.%s";
-select CAST("01.01.2001 05.12.06" as DATETIME) as a;
-SET time_format="%H.%i.%s";
-select CAST("05.12.06" as TIME) as a;
-
-SET datetime_format="%d.%m.%Y %h:%i:%s %p";
-select CAST("01.01.2001 05:12:06AM" as DATETIME) as a;
-select CAST("01.01.2001 05:12:06 PM" as DATETIME) as a;
-
-SET time_format="%h:%i:%s %p";
-select CAST("05:12:06 AM" as TIME) as a;
-select CAST("05:12:06.1234PM" as TIME) as a;
-
-SET time_format="%h.%i.%s %p";
-SET date_format='%d.%m.%y';
-SET datetime_format="%d.%m.%y %h.%i.%s %p";
-select CAST("12-12-06" as DATE) as a;
-
-select adddate("01.01.97 11.59.59.000001 PM", 10);
-select datediff("31.12.97 11.59:59.000001 PM","01.01.98");
-select weekofyear("31.11.97 11:59:59.000001 PM");
-select makedate(1997,1);
-select addtime("31.12.97 11.59.59.999999 PM", "1 1.1.1.000002");
-select maketime(23,11,12);
-select timediff("01.01.97 11:59:59.000001 PM","31.12.95 11:59:59.000002 PM");
-
-SET time_format="%H%i%s";
---error 1105
-SET time_format="%h%i%s";
---error 1105
+#
+# Test setting a lot of different formats to see which formats are accepted and
+# which aren't
+#
+
+SET time_format='%H%i%s';
+SET time_format='%H:%i:%s.%f';
+SET time_format='%h-%i-%s.%f%p';
+SET time_format='%h:%i:%s.%f %p';
+SET time_format='%h:%i:%s%p';
+
+SET date_format='%Y%m%d';
+SET date_format='%Y.%m.%d';
+SET date_format='%d.%m.%Y';
+SET date_format='%m-%d-%Y';
+
+set datetime_format= '%Y%m%d%H%i%s';
+set datetime_format= '%Y-%m-%d %H:%i:%s';
+set datetime_format= '%m-%d-%y %H:%i:%s.%f';
+set datetime_format= '%d-%m-%Y %h:%i:%s%p';
+set datetime_format= '%H:%i:%s %Y-%m-%d';
+set datetime_format= '%H:%i:%s.%f %m-%d-%Y';
+set datetime_format= '%h:%i:%s %p %Y-%m-%d';
+set datetime_format= '%h:%i:%s.%f %p %Y-%m-%d';
+
+SHOW SESSION VARIABLES LIKE "%format";
+
+--error 1231
+SET time_format='%h:%i:%s';
+--error 1231
+SET time_format='%H %i:%s';
+--error 1231
+SET time_format='%H::%i:%s';
+--error 1231
+SET time_format='%H:%i:%s%f';
+--error 1231
+SET time_format='%H:%i.%f:%s';
+--error 1231
+SET time_format='%H:%i:%s%p';
+--error 1231
+SET time_format='%h:%i:%s.%f %p %Y-%m-%d';
+--error 1231
+SET time_format='%H%i%s.%f';
+--error 1231
+SET time_format='%H:%i-%s.%f';
+--error 1231
SET date_format='%d.%m.%d';
---error 1105
-SET datetime_format="%d.%m.%y %h.%i.%s";
+--error 1231
+SET datetime_format='%h.%m.%y %d.%i.%s';
+--error 1231
+set datetime_format= '%H:%i:%s.%f %p %Y-%m-%d';
+
+#
+# Test GLOBAL values
+
+set GLOBAL datetime_format= '%H:%i:%s %Y-%m-%d';
+SET SESSION datetime_format=default;
+select @@global.datetime_format, @@session.datetime_format;
+SET GLOBAL datetime_format=default;
+SET SESSION datetime_format=default;
+select @@global.datetime_format, @@session.datetime_format;
SET GLOBAL date_format=default;
-SHOW GLOBAL VARIABLES LIKE "date_format%";
SET GLOBAL time_format=default;
-SHOW GLOBAL VARIABLES LIKE "time_format%";
SET GLOBAL datetime_format=default;
-SHOW GLOBAL VARIABLES LIKE "datetime_format%";
-
-SET date_format=default;
-SHOW SESSION VARIABLES LIKE "date_format%";
SET time_format=default;
-SHOW SESSION VARIABLES LIKE "time_format%";
+SET date_format=default;
SET datetime_format=default;
-SHOW SESSION VARIABLES LIKE "datetime_format%";
-
-SET time_format='%i:%s:%H';
-select cast(str_to_date("15-01-2001 12:59:59", "%d-%m-%Y %H:%i:%S") as TIME);
-
-SET GLOBAL date_format='%Y-%m-%d';
-SET GLOBAL time_format='%H:%i:%s';
-SET GLOBAL datetime_format='%Y-%m-%d %H:%i:%s';
-SET date_format='%Y-%m-%d';
-SET time_format='%H:%i:%s';
-SET datetime_format='%Y-%m-%d %H:%i:%s';
-
-select str_to_date("15-01-2001 12:59:59", "%d-%m-%Y %H:%i:%S");
-select str_to_date("15 September 2001", "%d %M %Y");
-select str_to_date("15 Septembeb 2001", "%d %M %Y");
-select str_to_date("15 MAY 2001", "%d %b %Y");
-select str_to_date("Sunday 15 MAY 2001", "%W %d %b %Y");
-select str_to_date("Sundai 15 MAY 2001", "%W %d %b %Y");
-select str_to_date("Sundai 15 MA", "%W %d %b %Y");
-select str_to_date("Tuesday 52 2001", "%W %V %X");
-select str_to_date("Sunday 01 2001", "%W %V %X");
-select str_to_date("Tuesday 00 2002", "%W %U %Y");
-select str_to_date("Thursday 53 1998", "%W %u %Y");
-select str_to_date("15-01-2001", "%d-%m-%Y %H:%i:%S");
-select str_to_date("15-01-20", "%d-%m-%Y");
-select str_to_date("15-2001-1", "%d-%Y-%c");
+
+#
+# The following tests will work only when we at some point will enable
+# dynamic changing of formats
+#
+
+# SET date_format='%d.%m.%Y';
+# select CAST('01.01.2001' as DATE) as a;
+# SET datetime_format='%d.%m.%Y %H.%i.%s';
+# select CAST('01.01.2001 05.12.06' as DATETIME) as a;
+# SET time_format='%H.%i.%s';
+# select CAST('05.12.06' as TIME) as a;
+#
+# SET datetime_format='%d.%m.%Y %h:%i:%s %p';
+# select CAST('01.01.2001 05:12:06AM' as DATETIME) as a;
+# select CAST('01.01.2001 05:12:06 PM' as DATETIME) as a;
+#
+# SET time_format='%h:%i:%s %p';
+# select CAST('05:12:06 AM' as TIME) as a;
+# select CAST('05:12:06.1234PM' as TIME) as a;
+#
+# SET time_format='%h.%i.%s %p';
+# SET date_format='%d.%m.%y';
+# SET datetime_format='%d.%m.%y %h.%i.%s %p';
+# select CAST('12-12-06' as DATE) as a;
+#
+# select adddate('01.01.97 11.59.59.000001 PM', 10);
+# select datediff('31.12.97 11.59:59.000001 PM','01.01.98');
+# select weekofyear('31.11.97 11:59:59.000001 PM');
+# select makedate(1997,1);
+# select addtime('31.12.97 11.59.59.999999 PM', '1 1.1.1.000002');
+# select maketime(23,11,12);
+# select timediff('01.01.97 11:59:59.000001 PM','31.12.95 11:59:59.000002 PM');
+#
+# SET time_format='%i:%s:%H';
+# select cast(str_to_date('15-01-2001 12:59:59', '%d-%m-%Y %H:%i:%S') as TIME);
+
+#
+# Test of str_to_date
+#
+
+select str_to_date(concat('15-01-2001',' 2:59:58.999'),
+ concat('%d-%m-%Y',' ','%H:%i:%s.%f'));
+
+create table t1 (date char(30), format char(30) not null);
+insert into t1 values
+('2003-01-02 10:11:12', '%Y-%m-%d %H:%i:%S'),
+('03-01-02 8:11:2.123456', '%y-%m-%d %H:%i:%S'),
+('2003-01-02 10:11:12 PM', '%Y-%m-%d %h:%i:%S %p'),
+('2003-01-02 01:11:12.12345AM', '%Y-%m-%d %h:%i:%S.%f%p'),
+('2003-01-02 02:11:12.12345AM', '%Y-%m-%d %h:%i:%S.%f %p'),
+('2003-01-02 12:11:12.12345 am', '%Y-%m-%d %h:%i:%S.%f%p'),
+('2003-01-02 11:11:12Pm', '%Y-%m-%d %h:%i:%S%p'),
+('10:20:10', '%H:%i:%s'),
+('10:20:10', '%h:%i:%s.%f'),
+('10:20:10AM', '%h:%i:%s%p'),
+('10:20:10.44AM', '%h:%i:%s.%f%p'),
+('15-01-2001 12:59:58', '%d-%m-%Y %H:%i:%S'),
+('15 September 2001', '%d %M %Y'),
+('15 SEPTEMB 2001', '%d %M %Y'),
+('15 MAY 2001', '%d %b %Y'),
+('Sunday 15 MAY 2001', '%W %d %b %Y'),
+('Sund 15 MAY 2001', '%W %d %b %Y'),
+('Tuesday 00 2002', '%W %U %Y'),
+('Thursday 53 1998', '%W %u %Y'),
+('15-01-2001', '%d-%m-%Y %H:%i:%S'),
+('15-01-20', '%d-%m-%y'),
+('15-2001-1', '%d-%Y-%c');
+
+# Use through protocol functions
+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;
+# Use as datetime
+select date,format,cast(str_to_date(date, format) as datetime) as datetime from t1;
+select date,format,DATE(str_to_date(date, format)) as date2 from t1;
+select date,format,TIME(str_to_date(date, format)) as time from t1;
+select date,format,concat(TIME(str_to_date(date, format))) as time2 from t1;
+
+# Test wrong dates
+
+truncate table t1;
+insert into t1 values
+('2003-01-02 10:11:12 PM', '%Y-%m-%d %H:%i:%S %p'),
+('2003-01-02 10:11:12.123456', '%Y-%m-%d %h:%i:%S %p'),
+('2003-01-02 10:11:12AM', '%Y-%m-%d %h:%i:%S.%f %p'),
+('2003-01-02 10:11:12AN', '%Y-%m-%d %h:%i:%S%p'),
+('2003-01-02 10:11:12 PM', '%y-%m-%d %H:%i:%S %p'),
+('10:20:10AM', '%H:%i:%s%p'),
+('15 Septembei 2001', '%d %M %Y'),
+('15 Ju 2001', '%d %M %Y'),
+('Sund 15 MA', '%W %d %b %Y'),
+('Sunday 01 2001', '%W %V %X'),
+('Thursdai 12 1998', '%W %u %Y'),
+(NULL, get_format(DATE,'USA')),
+('Tuesday 52 2001', '%W %V %X');
+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;
+
+# Test 'maybe' date formats and 'strange but correct' results
+
+truncate table t1;
+insert into t1 values
+('10:20:10AM', '%h:%i:%s'),
+('2003-01-02 10:11:12', '%Y-%m-%d %h:%i:%S'),
+('03-01-02 10:11:12 PM', '%Y-%m-%d %h:%i:%S %p');
+
+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;
+
+#
+# Test of get_format
+#
select get_format(DATE, 'USA') as a;
select get_format(TIME, 'internal') as a;
select get_format(DATETIME, 'eur') as a;
+select get_format(DATE, 'TEST') as a;
+select str_to_date('15-01-2001 12:59:59', GET_FORMAT(DATE,'USA'));
diff --git a/mysql-test/t/rpl_temporary-master.opt b/mysql-test/t/rpl_temporary-master.opt
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/mysql-test/t/rpl_temporary-master.opt
diff --git a/mysql-test/t/rpl_temporary.test b/mysql-test/t/rpl_temporary.test
index f1373d7ef23..0df8ceb6377 100644
--- a/mysql-test/t/rpl_temporary.test
+++ b/mysql-test/t/rpl_temporary.test
@@ -108,3 +108,11 @@ drop temporary table t3;
select * from t2;
drop table t1,t2;
+
+# Create last a temporary table that is not dropped at end to ensure that we
+# don't get any memory leaks for this
+
+create temporary table t3 (f int);
+sync_with_master;
+
+# The server will now close done
diff --git a/mysql-test/t/symlink.test b/mysql-test/t/symlink.test
index f618c342936..4be0cd0c6a2 100644
--- a/mysql-test/t/symlink.test
+++ b/mysql-test/t/symlink.test
@@ -65,7 +65,7 @@ drop table t1;
#
disable_query_log;
---error 1103,1103
+--error 1279,1279
create table t1 (a int not null auto_increment, b char(16) not null, primary key (a)) type=myisam data directory="tmp";
# Check that we cannot link over a table from another database.
@@ -75,7 +75,7 @@ create database mysqltest;
--error 1,1
create table mysqltest.t9 (a int not null auto_increment, b char(16) not null, primary key (a)) type=myisam index directory="/this-dir-does-not-exist";
---error 1103,1103
+--error 1279,1279
create table mysqltest.t9 (a int not null auto_increment, b char(16) not null, primary key (a)) type=myisam index directory="not-hard-path";
--error 1,1