Write proper SQL
short description
ISPConfig contains (probably lots of) poorly written SQL code that does not pass the strict validation which is (and has long been) default for both MySQL (at least since 5.7, so over 2 years) and MariaDB (at least since 10.2, so over a year).
Here is a good example - when adding a TXT record to a zone:
INSERT INTO dns_rr
(server_id
, zone
, name
, type
, data
, ttl
, active
, stamp
, serial
, sys_userid
, sys_groupid
, sys_perm_user
, sys_perm_group
, sys_perm_other
) VALUES ('0', '170', '', 'TXT', 'LALA-BEBE-MUMU', '3600', 'Y', '', '0', '1', '1', 'riud', 'riud', '')
Because the column stamp
is defined as "NOT NULL DEFAULT current_timestamp()", the above statement is wrong - you cannot insert an empty string there. Either omit stamp entirely and let the default value work (which should be done for all INSERTs anyway, otherwise why have a default value of current_timestamp()?), or set a value when inserting.
correct behaviour
See previous paragraph.
environment
MariaDB 10.2, MySQL 5.7 in default configuration (chose any distro you like, STRICT_TRANS_TABLE is upstream's default).
proposed fix
Learn SQL. Keep testing your SQL code for compliance. And DO NOT propose to turn off STRICT_TRANS_TABLE in sql_mode.