Sounds like missing semicolons between SQL statements. If the SQL that led to these errors is available, please provide it. It will probably confirm that “;” is missing in several places. Or it may show something else that went wrong.
If possible, provide the output from SHOW CREATE TABLE wp_options;
Can you get EXPLAINs both before and after the ALTER?
The following Optimizer “bugs” are in play here:
* Preferring an index for the ORDER BY instead of for the WHERE clause.
* Index prefix (meta_value(191) handling is wimpy.
* Failure to take LIMIT into account.
Note: Different versions of MySQL and MariaDB do a better/worse job on these “bugs”. What version are you using?
Back to the specific question and to provide a workaround.
I suggest that there is no “business logic” reason for ORDER BY meta_id ASC. Leave it off.