I've been helping to upgrade a site that has run for years on mysql. The old DB server runs mysql 5.1.67. The new db server runs MariaDB 10.1.25. I've already run into one query that runs fine on the old server but won't run on the new:
INSERT INTO `foo_PROD`.`images`
SELECT
id,
vid,
IF(
(container_cdn_uri REGEXP ('^http://[a-z0-9[.hyphen.]]+[.period.]r[0-9]{1,2}[.period.]cf1[.period.]rackcdn[.period.]com')),
CONCAT("https://", MID(container_cdn_uri, 8, (LOCATE(".r", container_cdn_uri) - 8)), ".ssl.cf1.rackcdn.com"),
container_cdn_uri
),
container_name,
root_filename,
filename_extension,
is_default,
time_added,
original_width,
original_height,
remote_url_hash,
time_added_local,
3
FROM `bar_prod`.`images`;
The complaint is about the POSIX syntax in the regext (e.g., [.hyphen.]):
#1139 - Got error 'POSIX collating elements are not supported at offset 15' from regexp
Does anyone have any thoughts about these? I'm kinda thinking I should insist that we run MySQL on the new server too for quality/compatibility's sake but also worry about Oracle turning into real jerks with MySQL in the near future.