From 85dd052cfb93452c4f2f89e3787027483eadd3f7 Mon Sep 17 00:00:00 2001 From: Mark Tompsett Date: Mon, 24 Oct 2016 14:37:20 -0400 Subject: [PATCH] Bug 17234 [DO NOT PUSH] Make v3.00.00 "install" Tweak fields, so primary key is workable. Ignore command line mysql error security warning --- C4/Installer.pm | 6 ++++++ installer/data/mysql/kohastructure.sql | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/C4/Installer.pm b/C4/Installer.pm index 1dc13aa..8ef1416 100644 --- a/C4/Installer.pm +++ b/C4/Installer.pm @@ -569,6 +569,12 @@ sub load_sql { # so that only true errors are returned to stderr or else the installer will # report the import a failure although it really succeded -fbcit } +# errors thrown while loading installer data should be logged + if($error) { + warn "C4::Installer::load_sql returned the following errors while attempting to load $filename:\n"; + warn "$error"; + } + $error =~ s/mysql: \[Warning\] Using a password on the command line interface can be insecure\.\n//g; return $error; } diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql index 53da4fe..c6d041e 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -2126,7 +2126,7 @@ CREATE TABLE language_script_mapping ( DROP TABLE IF EXISTS `permissions`; CREATE TABLE `permissions` ( `module_bit` int(11) NOT NULL DEFAULT 0, - `code` varchar(30) DEFAULT NULL, + `code` varchar(64) NOT NULL DEFAULT '', `description` varchar(255) DEFAULT NULL, PRIMARY KEY (`module_bit`, `code`), CONSTRAINT `permissions_ibfk_1` FOREIGN KEY (`module_bit`) REFERENCES `userflags` (`bit`) -- 2.7.4