MySQLGateway PR

I’m working on a PR for p740 as I’m finding a few issues with MariaDB 10.2+ after upgrading from 7.2.12. I’d appreciate some advice, please.

The main issue seems to stem from MariaDB 10.2+ INFORMATION_SCHEMA reports default values in quotes (so ‘user’ instead of user). This causes COAPI to detect repairs needed incorrectly.

I can see two approaches:

  1. Minimal: Tweak the existing gateway to allow for the this by doing things like db.default neq prop.default and "'#db.default#'" neq prop.default. This would be a smaller change, but might cause some oddities if there are default values with quotes
  2. SubComponent: Create a MariaGateway that extends MySQLGateway and override the table introspection so that the query returned behaves as before (i.e. returns user instead of ‘user’)

On a side note, on Lucee 5.3.10, I’m getting errors regarding the last few lines Specifically the error “Can’t cast String [] to a boolean” from line MySQLGateway.cfc (line: 678). I think this commit may be the cause: https://github.com/farcrycore/core/commit/55868f2a2b48f716a7adcd043287c2ffcccf1a2d

As #…# are causing issues with ColdFusion, perhaps we can use (…) instead?

In all our projects, I don’t think any of the defaults have had quotes in them. I think it’s safe enough to make the change in the existing gateway.

Regarding the #'s, I agree with that change too. Using #'s in an expression is a bit strange. Brackets are clearer.

Blair