maulanaady opened a new issue, #34460:
URL: https://github.com/apache/doris/issues/34460

   ### Search before asking
   
   - [X] I had searched in the 
[issues](https://github.com/apache/doris/issues?q=is%3Aissue) and found no 
similar issues.
   
   
   ### Version
   
   doris-2.0.6
   
   ### What's Wrong?
   
   I have table in mariadb server with datetime columns, when I query it using 
mysql client, it shows the row, but when I query it using starrocks via jdbc 
catalog (I used mysql client, too), it shows errors.
   `ERROR 1064 (HY000): getNextChunk failed, error: java.sql.SQLException: Zero 
date value 
prohibited[com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:129),
 com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:97), 
com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:89), 
com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:63), 
com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:73), 
com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.tr`
   
   ### What You Expected?
   
   query result shows the rows.
   
+--------+--------------+---------------------+---------------------+---------------------+---------------------+-------------+---------------------+---------------+-------------+
   | ID     | INVOICE_TYPE | INVOICE_DATE        | DUE_DATE            | 
DATE_CREATED        | DATE_MODIFIED       | MODIFIED_BY | PAYMENT_DATE        | 
PROFORMA_DATE | FLAG_TERMIN |
   
+--------+--------------+---------------------+---------------------+---------------------+---------------------+-------------+---------------------+---------------+-------------+
   | 291860 | 1            | 2023-11-05 00:00:00 | 2023-12-01 00:00:00 | 
2023-11-02 13:30:43 | 2023-12-04 13:25:34 | dummy_name  | 0000-00-00 00:00:00 | 
NULL          | NULL        |
   
+--------+--------------+---------------------+---------------------+---------------------+---------------------+-------------+---------------------+---------------+-------------+
   
   ### How to Reproduce?
   
   ## Steps to reproduce the behavior
   1. Create table in mariadb:
   CREATE TABLE `mydb.mytable` (
     `ID` int(11) NOT NULL,
     `INVOICE_TYPE` varchar(30) NOT NULL,
     `INVOICE_DATE` datetime DEFAULT NULL,
     `DUE_DATE` datetime DEFAULT NULL,
     `DATE_CREATED` datetime NOT NULL DEFAULT current_timestamp(),
     `DATE_MODIFIED` datetime DEFAULT NULL,
     `MODIFIED_BY` varchar(50) DEFAULT NULL,
     `PAYMENT_DATE` datetime DEFAULT NULL,
     `PROFORMA_DATE` datetime DEFAULT NULL,
     `FLAG_TERMIN` varchar(5) DEFAULT NULL,
     PRIMARY KEY (`ID`)
   ) ENGINE=InnoDB;
   
   2. Insert into `mydb.mytable` values
   (291860,"1",'2023-11-05 00:00:00','2023-12-01 00:00:00',
   '2023-11-02 13:30:43','2023-12-04 13:25:34','dummy_name','0000-00-00 
00:00:00',NULL,NULL);
   
   3. Create jdbc catalog:
   CREATE CATALOG mariadb
   PROPERTIES (
   "type"="jdbc",
   "user"="myuser",
   "password"="mypassword",
   "jdbc_url" = "jdbc:mysql://host:port/mydb?useSSL=false",
   
"driver_url"="https://doris-community-test-1308700295.cos.ap-hongkong.myqcloud.com/jdbc_driver/mysql-connector-java-8.0.25.jar";,
   "driver_class"="com.mysql.cj.jdbc.Driver"
   );
   
   4. SELECT `mariadb.mydb.mytable`:
   
   ### Anything Else?
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [ ] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of 
Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to