← Back to team overview

enterprise-support team mailing list archive

[Bug 1942476] [NEW] autopkgtest: Invalid DATETIME test fails with mysql >= 8.0.24

 

Public bug reported:

The test suite is failing when running against MySQL >= 8.0.24 with:

---------------------------------------------

Failures:

  1) Mysql2::Result row data type mapping should raise an error given an invalid DATETIME
     Failure/Error:
       expect { @client.query("SELECT CAST('1972-00-27 00:00:00' AS DATETIME) as bad_datetime").each }.to \
         raise_error(Mysql2::Error, "Invalid date in field 'bad_datetime': 1972-00-27 00:00:00")

       expected Mysql2::Error with "Invalid date in field 'bad_datetime': 1972-00-27 00:00:00" but nothing was raised
     # ./spec/mysql2/result_spec.rb:321:in `block (3 levels) in <top (required)>'

  2) Mysql2::Statement row data type mapping should raise an error given an invalid DATETIME
     Failure/Error:
       expect { @client.query("SELECT CAST('1972-00-27 00:00:00' AS DATETIME) as bad_datetime").each }.to \
         raise_error(Mysql2::Error, "Invalid date in field 'bad_datetime': 1972-00-27 00:00:00")

       expected Mysql2::Error with "Invalid date in field 'bad_datetime': 1972-00-27 00:00:00" but nothing was raised
     # ./spec/mysql2/statement_spec.rb:478:in `block (3 levels) in <top (required)>'

---------------------------------------------

This is because according to the release notes
(https://dev.mysql.com/doc/relnotes/mysql/8.0/en/news-8-0-24.html):

    Using CAST() on a DATE or DATETIME value in an INSERT statement
    raised a warning for "0000-00-00" and "2000-02-31", but not for
    "2000-01-00" or "2000-00-01". Now a warning is shown in each of
    these cases also.

The statement_spec.rb and result_spec.rb files need to be updated with a
bad date that still generates an error, e.g. 2000-01-00.

** Affects: mysql-server
     Importance: Unknown
         Status: Unknown

** Affects: ruby-mysql2 (Ubuntu)
     Importance: Undecided
         Status: Triaged

** Affects: ruby-mysql2 (Ubuntu Focal)
     Importance: Undecided
         Status: Triaged

** Affects: ruby-mysql2 (Ubuntu Hirsute)
     Importance: Undecided
         Status: Triaged

** Changed in: ruby-mysql2 (Ubuntu)
       Status: New => Triaged

** Bug watch added: github.com/brianmario/mysql2/issues #1208
   https://github.com/brianmario/mysql2/issues/1208

** Also affects: mysql-server via
   https://github.com/brianmario/mysql2/issues/1208
   Importance: Unknown
       Status: Unknown

** Also affects: ruby-mysql2 (Ubuntu Focal)
   Importance: Undecided
       Status: New

** Also affects: ruby-mysql2 (Ubuntu Hirsute)
   Importance: Undecided
       Status: New

** Changed in: ruby-mysql2 (Ubuntu Focal)
       Status: New => Triaged

** Changed in: ruby-mysql2 (Ubuntu Hirsute)
       Status: New => Triaged

-- 
You received this bug notification because you are a member of Ubuntu
Server/Client Support Team, which is subscribed to MySQL.
Matching subscriptions: Ubuntu Server/Client Support Team
https://bugs.launchpad.net/bugs/1942476

Title:
  autopkgtest: Invalid DATETIME test fails with mysql >= 8.0.24

To manage notifications about this bug go to:
https://bugs.launchpad.net/mysql-server/+bug/1942476/+subscriptions



Follow ups