[MDEV-19203] Better way to update sql_mode Created: 2019-04-07 Updated: 2019-08-25 |
|
| Status: | Open |
| Project: | MariaDB Server |
| Component/s: | None |
| Fix Version/s: | None |
| Type: | Task | Priority: | Major |
| Reporter: | Olaf van der Spek | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Description |
|
In guides, you often see things like: https://stackoverflow.com/questions/38471018/when-to-use-strict-mode-in-mysql-or-mariadb However, AFAIK, this doesn't just enable or disable strict mode, it affects all other sql mode bits as well. |
| Comments |
| Comment by Sergei Golubchik [ 2019-04-07 ] | |
|
I'd rather suggest something like
which is the syntax that @@optimizer_switch supports already, so it's consistent with existing behavior and already familiar to MariaDB users. | |
| Comment by Olaf van der Spek [ 2019-06-20 ] | |
|
OK. What'd be the code for reading the current state? | |
| Comment by Sergei Golubchik [ 2019-08-25 ] | |
|
SELECT @@sql_mode, similar to optimizer_switch. But supporting set sql_mode_strict_all_tables = true also sounds like a very promising idea |