Skip to content

DB patches 8.085_update_radacct_ipv6.sql and 8.090_add_radacct_triggers.sql lead to mysql 1136 errors #102

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
gkelle opened this issue Apr 15, 2025 · 0 comments

Comments

@gkelle
Copy link

gkelle commented Apr 15, 2025

I applied patch 8.085_update_radacct_ipv6.sql and patch 8.090_add_radacct_triggers.sql to my database and noticed that I started getting the following error:
sql: ERROR: rlm_sql_mysql: ERROR 1136 (Column count doesn't match value count at row 1): 21S01

This would occur whenever a client would log off of an SSID using RADIUS+PPSK.

The trigger causing the 1136 error looks like this:

     -- Check if acctstoptime has changed from NULL to NOT NULL
    IF OLD.acctstoptime IS NULL AND NEW.acctstoptime IS NOT NULL THEN
        -- Insert the updated row into radacct_history
        INSERT INTO radacct_history
        SELECT * FROM radacct WHERE radacctid = NEW.radacctid;
    END IF;

Comparing the table definition for radacct and raddact_history, I noticed that raddact_history had fewer columns and was missing framedipv6address, framedipv6prefix, framedinterfaceid, and delegatedipv6prefix

To fix this, I updated 8.085_update_radacct_ipv6.sql to also update the radacct_history table with the new columns and keys.

After updating radacct_history, the trigger and history table behavior was corrected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant