Skip to content

InnoDB support / field_inherit_access #46

@BitPoet

Description

@BitPoet

When choosing InnoDB as storage engine and with the default setting for STRICT_TRANS_TABLES in MySQL >= 5.6 enabled, the insert statement in UserGroupsHooks::rebuild fails (thus failing to install) with

Error Code: 1364. Field 'sort' doesn't have a default value

since sort is defined as NOT NULL. The error can be avoided by setting the sort field to 0 in the insert.

            $sql = "INSERT INTO field_inherit_access (pages_id, data, sort) VALUES ";
            foreach ($insertions as $id => $access_page_id) {
                $id = (int) $id;
                $access_page_id = (int) $access_page_id;
                $sql .= "($id, $access_page_id, 0),";
            }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions