Skip to content

PIPES_AS_CONCAT sql_mode not yet implemented in Dolt - || operator behavior differs from MySQL #9791

@momoway

Description

@momoway

When setting @@sql_mode = 'PIPES_AS_CONCAT' in Dolt, the || operator continues to perform logical OR operations rather than string concatenation as expected in MySQL. While Dolt accepts and stores the SQL mode setting, the operator behavior doesn't change accordingly.

mysql> SELECT ('0' || '0');
+--------------+
| ('0' || '0') |
+--------------+
|            0 |
+--------------+
1 row in set (0.00 sec)

mysql> SELECT sql_mode;
+---------------------------------------------------------------+
| @@sql_mode                                                    |
+---------------------------------------------------------------+
| NO_ENGINE_SUBSTITUTION,ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES |
+---------------------------------------------------------------+
1 row in set (0.00 sec)

mysql> SET sql_mode=PIPES_AS_CONCAT;
Query OK, 0 rows affected (0.00 sec)

mysql> SELECT sql_mode;
+-----------------+
| @@sql_mode      |
+-----------------+
| PIPES_AS_CONCAT |
+-----------------+
1 row in set (0.00 sec)

mysql> SELECT ('0' || '0');
+--------------+
| ('0' || '0') |
+--------------+
|            0 |
+--------------+
1 row in set (0.00 sec)

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions