Hi Dan,
MariaDB (5.2.0+) supports virtual columns and the syntax is
<type> [GENERATED ALWAYS] AS ( <expression> ) [VIRTUAL | PERSISTENT]
[UNIQUE] [UNIQUE KEY] [COMMENT <text>]
While implementing [1], to add parser support for virtual columns, I tried
to model this syntax using $FIELD_OPTIONS [2]. Even though I am able to
retrieve the expression this way, all the brackets and spaces of the
expression are gone. As I understand, this due to the tokenization.
Do you have any suggestion for an alternative approach?
[1] https://sourceforge.net/p/phpmyadmin/feature-requests/1517/
[2]
https://github.com/madhuracj/phpmyadmin/commit/b287aae9d56c4ae15d850b47a5f7…
--
Thanks and Regards,
Madhura Jayaratne
Hi,
Dan Ungureanu was asking me about some dead code, and this made me
realize that we might have a bug; however I'm not sure whether this was
intentional or not.
To see what I mean, use the MAINT_4_0_10 branch and browse a table that
has many rows: you'll see that the displayed query shows the proper
generated LIMIT clause, which changes when you click on the Next icon.
This comes from [0] which uses a GLOBAL variable set in [1].
Starting with 4.1, due to some refactoring, the generated LIMIT clause
is no longer shown.
Intentional or not?
[0]
https://github.com/phpmyadmin/phpmyadmin/blob/MAINT_4_0_10/libraries/Util.c…
[1] https://github.com/phpmyadmin/phpmyadmin/blob/MAINT_4_0_10/sql.php#L577
--
Marc Delisle | phpMyAdmin