Aurora 2 to 3 Pre-checks Failure due to Reserved Keywords in mysql routine function

0

I've been attempting to do an Aurora 2 to 3 in place upgrade on our database cluster and it refuses because of a routinesSyntaxCheck failure on some of our custom routines in our DB. There are indeed reserved keywords in our routines but never by themselves and the functions themselves don't have any reserved keywords. I've attempted to put the routine declarations in the schema in backticks but that doesn't seem to work either.

I'm able to create my DB schema on a fresh Aurora 3 cluster without any complaints and I can use the routines just fine. Its just when I attempt the 2 to 3 upgrade that it complains about those routines. The strange part is that the line it complains about is always line 0,38 or 0,37 which doesn't make sense to me either as that line shouldn't exist afaik. I've attached an example of the routine below (the company name doesn't contain a reserved keyword either)

{
    "serverAddress": "/tmp%2Fmysql.sock",
    "serverVersion": "5.7.12-log - MySQL Community Server (GPL)",
    "targetVersion": "8.0.28",
    "auroraServerVersion": "2.11.1",
    "auroraTargetVersion": "3.04.2",
    "outfilePath": "/rdsdbdata/tmp/PreChecker.log",
    "checksPerformed": [
        {
            "id": "oldTemporalCheck",
            "title": "Usage of old temporal type",
            "status": "OK",
            "detectedProblems": []
        },
        {
            "id": "routinesSyntaxCheck",
            "title": "MySQL 8.0 syntax check for routine-like objects",
            "status": "OK",
            "description": "The following objects did not pass a syntax check with the latest MySQL 8.0 grammar. A common reason is that they reference names that conflict with new reserved keywords. You must update these routine definitions and `quote` any such references before upgrading.",
            "documentationLink": "https://dev.mysql.com/doc/refman/en/keywords.html",
            "detectedProblems": [
                {
                    "level": "Error",
                    "dbObject": "companyname.CLEAR_CHANNEL",
                    "description": "at line 0,38: unexpected token '\"CLEAR_CHANNEL\"'"
                },
Gsalam7
posta un mese fa405 visualizzazioni
1 Risposta
0

Hi,

This previous answer on re:Post has a solution for your case: https://repost.aws/questions/QU_jfgd2gURk6TzL8JcQCO9Q/error-upgrading-mysql-5-7-to-8-0

Best,

Didier

profile pictureAWS
ESPERTO
con risposta un mese fa

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.

Linee guida per rispondere alle domande