[MDEV-26666] Inconsistent behaviors of RAND function Created: 2021-09-23 Updated: 2021-12-20 Resolved: 2021-12-20 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Data types |
| Affects Version/s: | 10.5.12 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Major |
| Reporter: | dinary | Assignee: | Sergei Golubchik |
| Resolution: | Not a Bug | Votes: | 0 |
| Labels: | innodb | ||
| Environment: |
OS: Ubuntu-20.04 |
||
| Description |
|
The function RAND() with a string type argument has different meanings in SELECT and UPDATE statements, which can cause inconsistent problems. |
| Comments |
| Comment by Sergei Golubchik [ 2021-12-20 ] |
|
that's how SQL_MODE=STRICT_ALL_TABLES works now. The first statement does not modify any tables, so you only get a warning about truncated value. The second statement modifies a table, so under "strict" sql_mode the warning is converted into an error |