#78 Can`t work with MySQL DATETIME columns

closed-wont-fix
None
6
2010-07-27
2010-07-02
No

I try to simple select from table. Query break if in table has colum type of DATETIME.

Discussion

  • Roman V. Nikolaev

    screenshot

     
  • Roman V. Nikolaev

    • priority: 5 --> 6
     
  • Heiko Hilbert

    Heiko Hilbert - 2010-07-07

    I tried this without any problems on my mysql database:

    create table t1(x datetime);
    insert into t1(x) values (now());
    select * from t1;
    drop table t1;

    Do you have any exceptions in the eclipse error log?

     
  • Heiko Hilbert

    Heiko Hilbert - 2010-07-07
    • assigned_to: nobody --> hhilbert
     
  • Roman V. Nikolaev

    Reproduce:

    create table t1(x datetime);
    insert into t1(x) values ('0000-00-00 00:00:00');
    select * from t1; (Text: Cannot convert value '0000-00-00 00:00:00' from column 1 to TIMESTAMP)

     
  • PatL

    PatL - 2010-07-07

    It's a known mysql jdbc issue if memory serves. I always use a url like:
    jdbc:mysql://192.168.0.0:3306/mythconverg?zeroDateTimeBehavior=convertToNull

     
  • Roman V. Nikolaev

    =( It`s work, but it`s not right. When I use joins I have NULL values by join logic. And I cant recognize real NULL from NULL by '0000-00...'
    Maybe hotfix in SQL Explorer can correctly processing this situations?

     
  • Heiko Hilbert

    Heiko Hilbert - 2010-07-27

    I can't catch this in SQL Explorer. Even if I try to read this value as string ( getString() ) the same exception is thrown from the JDBC driver. No chance.

     
  • Heiko Hilbert

    Heiko Hilbert - 2010-07-27
    • status: open --> closed-wont-fix
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks