From d609c9d9d4d9e55316df4e86c0de63613fe0ae76 Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Tue, 26 Apr 2022 11:45:52 +0000 Subject: [PATCH] Bug 30620: Add a warning about /*!VERSION lines in kohastructure Also adding a similar comment in C4::Installer. No test plan, just documentation. Signed-off-by: Marcel de Rooy Signed-off-by: Martin Renvoize --- C4/Installer.pm | 1 + installer/data/mysql/kohastructure.sql | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/C4/Installer.pm b/C4/Installer.pm index ff9c2b170f..723d47227b 100644 --- a/C4/Installer.pm +++ b/C4/Installer.pm @@ -285,6 +285,7 @@ sub load_db_schema { my $datadir = C4::Context->config('intranetdir') . "/installer/data/$self->{dbms}"; # Disable checks before load + # NOTE: These lines are found in kohastructure itself, but DBIx::RunSQL ignores them! $self->{'dbh'}->do(q{SET NAMES utf8mb4}); $self->{'dbh'}->do(q{SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0}); $self->{'dbh'}->do(q{SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0}); diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql index 8f5f7b438f..5380e8c4f2 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -4,6 +4,11 @@ -- ------------------------------------------------------ -- Server version 10.6.5-MariaDB-1:10.6.5+maria~focal +-- IMPORTANT NOTE: +-- The lines with /*! are silently IGNORED when the web installer runs this +-- file (in C4::Installer, using DBIx::RunSQL). +-- The lines only work when you run this sql script directly with mysql. + /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; -- 2.20.1