Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-24806

Inconsistent records after upgrade to MariaDB 10.3.23

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Incomplete
    • Affects Version/s: 10.3.23
    • Fix Version/s: N/A
    • Component/s: OTHER
    • Labels:
    • Environment:
      AWS RDS for MariaDB

      Description

      We have some records issue after upgrade to MariaDB 10.3.23 (AWS RDS). The column type for the filter is an integer for the table. If we check the records without trim, the records only 14 rows:

      MariaDB [db_talenta]> select count(1) from table_a where company_id=3805;
      +----------+
      | count(1) |
      +----------+
      |       14 |
      +----------+
      1 row in set (0.01 sec)
      

      While if we trim the records, the records are 15 rows.

      MariaDB [db_talenta]> select count(1) from table_a where trim(company_id)=3805;
      +----------+
      | count(1) |
      +----------+
      |       15 |
      +----------+
      1 row in set (0.02 sec)
      

      There seems any character on the company_id columns, while it's an integer. If I check the length of the columns, look normal as shown below:

      MariaDB [db_talenta]> select length(company_id) from table_a where trim(company_id)=3805;
      +--------------------+
      | length(company_id) |
      +--------------------+
      |                  4 |
      |                  4 |
      |                  4 |
      |                  4 |
      |                  4 |
      |                  4 |
      |                  4 |
      |                  4 |
      |                  4 |
      |                  4 |
      |                  4 |
      |                  4 |
      |                  4 |
      |                  4 |
      |                  4 |
      +--------------------+
      15 rows in set (0.02 sec)
       
      MariaDB [db_talenta]> select length(company_id) from table_a where company_id=3805;
      +--------------------+
      | length(company_id) |
      +--------------------+
      |                  4 |
      |                  4 |
      |                  4 |
      |                  4 |
      |                  4 |
      |                  4 |
      |                  4 |
      |                  4 |
      |                  4 |
      |                  4 |
      |                  4 |
      |                  4 |
      |                  4 |
      |                  4 |
      +--------------------+
      14 rows in set (0.01 sec)
      

      Default sql_mode is NO_ENGINE_SUBSTITUTION while on the old RDS database (MariaDB 10.0), default sql_mode is empty. I can't change the sql_mode to be empty in upgraded RDS for MariaDB (which is expected in >= 10.2).

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            agsyafaat Agus Syafaat
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Git Integration