Skip to content

Replacing reference of SECOND_FRAC (deprecated) for MICROSECOND #43

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions mysql-test/r/second_frac.result
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
DROP VIEW IF EXISTS v1;
CREATE VIEW v1 AS SELECT TIMESTAMPDIFF(MICROSECOND, '1970-01-01 00:00:00.000000', '1970-01-01 00:00:00.000001');
SELECT * FROM v1;
Name_exp_1
1
DROP VIEW v1;
19 changes: 19 additions & 0 deletions mysql-test/t/second_frac.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# The include statement below is a temp one for tests that are yet to
#be ported to run with InnoDB,
#but needs to be kept for tests that would need MyISAM in future.
--source include/force_myisam_default.inc

#
# second_frac
#
--disable_warnings
DROP VIEW IF EXISTS v1;
--enable_warnings

# bug 60628
CREATE VIEW v1 AS SELECT TIMESTAMPDIFF(MICROSECOND, '1970-01-01 00:00:00.000000', '1970-01-01 00:00:00.000001');

SELECT * FROM v1;

DROP VIEW v1;
# end of bug
2 changes: 1 addition & 1 deletion sql/item_timefunc.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3176,7 +3176,7 @@ void Item_func_timestamp_diff::print(String *str, enum_query_type query_type)
str->append(STRING_WITH_LEN("SECOND"));
break;
case INTERVAL_MICROSECOND:
str->append(STRING_WITH_LEN("SECOND_FRAC"));
str->append(STRING_WITH_LEN("MICROSECOND"));
break;
default:
break;
Expand Down