Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Incomplete
-
10.3.23
-
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).