I don't see any possible fix that could be done just on MariaDB side, without any changes to phpMyAdmin.
And if phpMyAdmin has to be modified, then we do the fix with showing foreign keys in a comment. It'll be consistent with:
MariaDB [test]> set sql_mode=IGNORE_BAD_TABLE_OPTIONS;
|
Query OK, 0 rows affected (0.01 sec)
|
MariaDB [test]> create table t1 (a int foobar=blabla) century=21;
|
Query OK, 0 rows affected, 2 warnings (0.00 sec)
|
MariaDB [test]> show create table t1\G
|
*************************** 1. row ***************************
|
Table: t1
|
Create Table: CREATE TABLE `t1` (
|
`a` int(11) DEFAULT NULL `foobar`=blabla
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1 `century`=21
|
1 row in set (0.00 sec)
|
MariaDB [test]> set sql_mode='';
|
Query OK, 0 rows affected (0.01 sec)
|
MariaDB [test]> show create table t1\G
|
*************************** 1. row ***************************
|
Table: t1
|
Create Table: CREATE TABLE `t1` (
|
`a` int(11) DEFAULT NULL /* `foobar`=blabla */
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /* `century`=21 */
|
1 row in set (0.00 sec)
|
Note, how unsupported attributes are printed inside a comment when IGNORE_BAD_TABLE_OPTIONS is not set.
Won't it be confusing to show foreign keys that aren't enforced?
I suppose SHOW CREATE TABLE can show them just as it shows unsupported table attributes — inside a comment. But then GUI tools won't be able to see them anyway.