mirror of
https://github.com/MariaDB/server.git
synced 2025-01-17 20:42:30 +01:00
ca34f415e9
-issue more correct message for incorrect date|datetime|time values -ER_WARN_DATA_OUT_OF_RANGE message is changed -added new error message mysql-test/r/auto_increment.result: Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE result change mysql-test/r/bigint.result: Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE result change mysql-test/r/ctype_ucs.result: Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE result change mysql-test/r/date_formats.result: Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE result change mysql-test/r/func_sapdb.result: Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE result change mysql-test/r/func_str.result: Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE result change mysql-test/r/func_time.result: Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE result change mysql-test/r/insert.result: Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE result change mysql-test/r/loaddata.result: Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE result change mysql-test/r/mysqldump.result: Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE result change mysql-test/r/ps_2myisam.result: Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE result change mysql-test/r/ps_3innodb.result: Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE result change mysql-test/r/ps_4heap.result: Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE result change mysql-test/r/ps_5merge.result: Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE result change mysql-test/r/ps_6bdb.result: Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE result change mysql-test/r/ps_7ndb.result: Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE result change mysql-test/r/rpl_rewrite_db.result: Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE result change mysql-test/r/sp.result: Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE result change mysql-test/r/strict.result: Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE result change mysql-test/r/timezone2.result: Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE result change mysql-test/r/timezone_grant.result: Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE result change mysql-test/r/type_bit.result: Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE result change mysql-test/r/type_bit_innodb.result: Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE result change mysql-test/r/type_date.result: Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE result change mysql-test/r/type_datetime.result: Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE result change mysql-test/r/type_decimal.result: Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE result change mysql-test/r/type_float.result: Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE result change mysql-test/r/type_newdecimal.result: Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE result change mysql-test/r/type_ranges.result: Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE result change mysql-test/r/type_time.result: Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE result change mysql-test/r/type_uint.result: Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE result change mysql-test/r/view.result: Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE result change mysql-test/r/warnings.result: Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE result change sql/share/errmsg.txt: Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE -ER_WARN_DATA_OUT_OF_RANGE message is changed -added new error message sql/time.cc: Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE issue more correct message for incorrect date|datetime|time values
61 lines
3 KiB
Text
61 lines
3 KiB
Text
delete from mysql.user where user like 'mysqltest\_%';
|
|
delete from mysql.db where user like 'mysqltest\_%';
|
|
delete from mysql.tables_priv where user like 'mysqltest\_%';
|
|
delete from mysql.columns_priv where user like 'mysqltest\_%';
|
|
flush privileges;
|
|
create table t1 (a int, b datetime);
|
|
create table t2 (c int, d datetime);
|
|
grant all privileges on test.* to mysqltest_1@localhost;
|
|
show grants for current_user();
|
|
Grants for mysqltest_1@localhost
|
|
GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost'
|
|
GRANT ALL PRIVILEGES ON `test`.* TO 'mysqltest_1'@'localhost'
|
|
set time_zone= '+00:00';
|
|
set time_zone= 'Europe/Moscow';
|
|
select convert_tz('2004-10-21 19:00:00', 'Europe/Moscow', 'UTC');
|
|
convert_tz('2004-10-21 19:00:00', 'Europe/Moscow', 'UTC')
|
|
2004-10-21 15:00:00
|
|
select convert_tz(b, 'Europe/Moscow', 'UTC') from t1;
|
|
convert_tz(b, 'Europe/Moscow', 'UTC')
|
|
update t1, t2 set t1.b = convert_tz('2004-10-21 19:00:00', 'Europe/Moscow', 'UTC')
|
|
where t1.a = t2.c and t2.d = (select max(d) from t2);
|
|
select * from mysql.time_zone_name;
|
|
ERROR 42000: SELECT command denied to user 'mysqltest_1'@'localhost' for table 'time_zone_name'
|
|
select Name, convert_tz('2004-10-21 19:00:00', Name, 'UTC') from mysql.time_zone_name;
|
|
ERROR 42000: SELECT command denied to user 'mysqltest_1'@'localhost' for table 'time_zone_name'
|
|
delete from mysql.db where user like 'mysqltest\_%';
|
|
flush privileges;
|
|
grant all privileges on test.t1 to mysqltest_1@localhost;
|
|
grant all privileges on test.t2 to mysqltest_1@localhost;
|
|
show grants for current_user();
|
|
Grants for mysqltest_1@localhost
|
|
GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost'
|
|
GRANT ALL PRIVILEGES ON `test`.`t2` TO 'mysqltest_1'@'localhost'
|
|
GRANT ALL PRIVILEGES ON `test`.`t1` TO 'mysqltest_1'@'localhost'
|
|
set time_zone= '+00:00';
|
|
set time_zone= 'Europe/Moscow';
|
|
select convert_tz('2004-11-31 12:00:00', 'Europe/Moscow', 'UTC');
|
|
convert_tz('2004-11-31 12:00:00', 'Europe/Moscow', 'UTC')
|
|
NULL
|
|
Warnings:
|
|
Warning 1292 Incorrect datetime value: '2004-11-31 12:00:00'
|
|
select convert_tz(b, 'Europe/Moscow', 'UTC') from t1;
|
|
convert_tz(b, 'Europe/Moscow', 'UTC')
|
|
update t1, t2 set t1.b = convert_tz('2004-11-30 12:00:00', 'Europe/Moscow', 'UTC')
|
|
where t1.a = t2.c and t2.d = (select max(d) from t2);
|
|
select * from mysql.time_zone_name;
|
|
ERROR 42000: SELECT command denied to user 'mysqltest_1'@'localhost' for table 'time_zone_name'
|
|
select Name, convert_tz('2004-11-30 12:00:00', Name, 'UTC') from mysql.time_zone_name;
|
|
ERROR 42000: SELECT command denied to user 'mysqltest_1'@'localhost' for table 'time_zone_name'
|
|
drop table t1, t2;
|
|
create table t1 (a int, b datetime);
|
|
create table t2 (a int, b varchar(40));
|
|
update t1 set b = '2005-01-01 10:00';
|
|
update t1 set b = convert_tz(b, 'UTC', 'UTC');
|
|
update t1 join t2 on (t1.a = t2.a) set t1.b = '2005-01-01 10:00' where t2.b = 'foo';
|
|
update t1 join t2 on (t1.a = t2.a) set t1.b = convert_tz('2005-01-01 10:00','UTC','UTC') where t2.b = 'foo';
|
|
delete from mysql.user where user like 'mysqltest\_%';
|
|
delete from mysql.db where user like 'mysqltest\_%';
|
|
delete from mysql.tables_priv where user like 'mysqltest\_%';
|
|
flush privileges;
|
|
drop table t1, t2;
|