Ticket 3430

Summary: Change in MySQL syntax using 'IGNORE' keyword
Product: Slurm Reporter: Peter Willis <pwillis>
Component: AccountingAssignee: Jacob Jenson <jacob>
Status: RESOLVED INVALID QA Contact:
Severity: 6 - No support contract    
Priority: ---    
Version: 15.08.7   
Hardware: Linux   
OS: Linux   
Site: -Other- Alineos Sites: ---
Atos/Eviden Sites: --- Confidential Site: ---
Coreweave sites: --- Cray Sites: ---
DS9 clusters: --- HPCnow Sites: ---
HPE Sites: --- IBM Sites: ---
NOAA SIte: --- OCF Sites: ---
Recursion Pharma Sites: --- SFW Sites: ---
SNIC sites: --- Linux Distro: ---
Machine Name: CLE Version:
Version Fixed: Target Release: ---
DevPrio: --- Emory-Cloud Sites: ---

Description Peter Willis 2017-01-25 12:57:20 MST
Using slurm 15.08.7.(1)  Debian package has a compatibility problem with the MySQL 14.14 Distribution 5.6.25 supplied with the same distribution.

The supplied version of MySQL no longer supports the 'IGNORE' keyword while using the 'ALTER' statement.

This causes issues with 'sacctmgr' and hence 'sview' in that MySQL statements in :

src/database/mysql_common.c

fail return results.

Lines 267 and 268 respectively read:

        query = xstrdup_printf("alter ignore table %s", table_name);
        correct_query = xstrdup_printf("alter ignore table %s", table_name);


These are the only occurrences of the 'IGNORE' keyword being used in the complete slurm code base.

Should the package managers for this linux distribution be altered?
Comment 1 Peter Willis 2017-01-25 14:19:31 MST
As of MySQL 5.7.4, the IGNORE clause for ALTER TABLE is removed and its use produces an error. Please check your version
Comment 2 Peter Willis 2017-01-26 09:06:05 MST
The code was tested by:
Editing and removing the 'ignore' keyword from those SQL statements and recompiling.

'sacctmgr', 'sview', and all other dependent utilities compile fine and function normally with MySQL version 14.14 distribution 5.6.25.

The slurm source:

src/database/mysql_common.c

was edited and compiled from the same code version provided provided with the Debian distribution by creating a working directory and using:

/> apt-get source slurm-llnl

to retrieve the installed version.

The source was configured to install to an alternate path to isolate the generated executables and libraries  from those on the system.

Execution of problematic utilities proved the following;

1.) slurm was able to connect to the existing MySQL accounting database
2.) MySQL errors reported from utilities have ceased