8000 Bad format for Timestamp · Issue #24 · ixias-net/ixias · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Bad format for Timestamp #24

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

Open
sp1rytus opened this issue Jan 4, 2020 · 2 comments
Open

Bad format for Timestamp #24

sp1rytus opened this issue Jan 4, 2020 · 2 comments
Labels
bug Something isn't working

Comments

@sp1rytus
Copy link
Contributor
sp1rytus commented Jan 4, 2020

If the time is longer than 3 digits, an error will occur at other timings such as parsing when trying to convert to Duration.

com.mysql.jdbc.ResultSetRow.getTimestampFast
This is because there is no simple description of the processing in which the character string has 9 digits.It is necessary to change the process to get the value as a character string with getString, split the character string with a colon and convert it to Duration.

java.sql.SQLException: Bad format for Timestamp '100:00:00' in column 8. at com.mysql.jdbc.ResultSetRow.getTimestampFast(ResultSetRow.java:1157) at com.mysql.jdbc.ByteArrayRow.getTimestampFast(ByteArrayRow.java:130) at com.mysql.jdbc.ResultSetImpl.getTimestampInternal(ResultSetImpl.java:5946) at com.mysql.jdbc.ResultSetImpl.getTimestamp(ResultSetImpl.java:5616) at com.zaxxer.hikari.pool.HikariProxyResultSet.getTimestamp(HikariProxyResultSet.java) at ixias.persistence.lifted.SlickColumnTypeOps$$anon$1.getValue(SlickColumnTypeOps.scala:105) at ixias.persistence.lifted.SlickColumnTypeOps$$anon$1.getValue(SlickColumnTypeOps.scala:99) ...omitted

@sp1rytus sp1rytus added the bug Something isn't working label Jan 4, 2020
@piroron
Copy link
piroron commented Jan 10, 2020

Cause of bug
https://github.com/spullara/mysql-connector-java/blob/master/src/main/java/com/mysql/jdbc/ResultSetRow.java#L988

If string length = 9(ex. "100:00:00"), cannot match any cases in switch statement.

Approach
If the time length is 9, edit the string to match any of the cases.

@piroron
Copy link
piroron commented Jan 10, 2020

I checked below approach.
In getTimestampFast method, hour is assumed to be two digits.

need to consider another approach...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants
0