Bugzilla – Attachment 51761 Details for
Bug 16573
Web installer fails to load structure and sample data on MySQL 5.7
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 16573: fix structure and sample data for MySQL 5.7
Bug-16573-fix-structure-and-sample-data-for-MySQL-.patch (text/plain), 15.21 KB, created by
Mark Tompsett
on 2016-05-25 05:04:11 UTC
(
hide
)
Description:
Bug 16573: fix structure and sample data for MySQL 5.7
Filename:
MIME Type:
Creator:
Mark Tompsett
Created:
2016-05-25 05:04:11 UTC
Size:
15.21 KB
patch
obsolete
>From 7e8a8bc38ba350bc28372fc2f049eb8872fbb007 Mon Sep 17 00:00:00 2001 >From: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> >Date: Mon, 23 May 2016 17:06:01 -0300 >Subject: [PATCH] Bug 16573: fix structure and sample data for MySQL 5.7 > >Web install on Ubuntu 16.04/Mysql 5.7 fails. > >This patch makes small changes to make installation >possible to kohastructure.sql and some sample files. > >Sample values for quotes table can't have '0000-00-00 ...' values >nor NULL values, now() is perhaps an option. > >Depends on Bug 16572 > >To test: >1) System with MySQL 5.7, for example Ubuntu 16.05 >2) Apply 16572 >3) Try web install, it fails >4) Apply this and next patch >5) Try again, now it succeed > >This is only for English install, i18n files needs revision >I can do that if this is accepted. > >Perphaps a change is needed to updatedatabase.pl > >Ammended patch, 'created_on' field on virtualshelves >can't be timestamp default null, mysql 5.5 complains >that only one timestamp column can be defined as >default not null. Changed to 'datetime' type. > >Can provide followup with updatedabase change, >but need an opinion if this type change makes sense. > >Signed-off-by: Mark Tompsett <mtompset@hotmail.com> >--- > .../data/mysql/en/optional/sample_patrons.sql | 3 +- > installer/data/mysql/en/optional/sample_quotes.sql | 62 +++++++++++----------- > installer/data/mysql/kohastructure.sql | 4 +- > 3 files changed, 34 insertions(+), 35 deletions(-) > >diff --git a/installer/data/mysql/en/optional/sample_patrons.sql b/installer/data/mysql/en/optional/sample_patrons.sql >index a793ad4..4a1963e 100644 >--- a/installer/data/mysql/en/optional/sample_patrons.sql >+++ b/installer/data/mysql/en/optional/sample_patrons.sql >@@ -1,6 +1,5 @@ > INSERT INTO `borrowers` (`borrowernumber`, `cardnumber`, `surname`, `firstname`, `title`, `othernames`, `initials`, `streetnumber`, `streettype`, `address`, `address2`, `city`, `zipcode`, `email`, `phone`, `mobile`, `fax`, `emailpro`, `phonepro`, `B_streetnumber`, `B_streettype`, `B_address`, `B_city`, `B_zipcode`, `B_email`, `B_phone`, `dateofbirth`, `branchcode`, `categorycode`, `dateenrolled`, `dateexpiry`, `gonenoaddress`, `lost`, `debarred`, `contactname`, `contactfirstname`, `contacttitle`, `guarantorid`, `borrowernotes`, `relationship`, `sex`, `userid`, `opacnote`, `contactnote`, `password`, `flags`, `sort1`, `sort2`) VALUES >- >-(1,'1','Admin','Koha',NULL,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'MPL','S',NULL,'2099-12-31',NULL,NULL,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL), >+(1,'1','Admin','Koha',NULL,NULL,'',NULL,NULL,'',NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'MPL','S',NULL,'2099-12-31',NULL,NULL,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL), > (2,'23529000152273','Welch','Marcus',NULL,NULL,'',NULL,NULL,'5601 Library Rd.',NULL,'Springfield, MA','44224',NULL,'(212) 555-1212',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'FRL','ST','1985-10-24','2020-12-31',NULL,NULL,NULL,'',NULL,NULL,NULL,NULL,NULL,'M','23529000152273',NULL,NULL,'42b29d0771f3b7ef',NULL,'0.43609457503641','0.38613959717205'), > (3,'23529000445172','Daniels','Tanya',NULL,NULL,'',NULL,NULL,'2035 Library Rd.',NULL,'Portland, ME','44236',NULL,'(212) 555-1212',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'1966-10-14','MPL','PT','1990-08-22','2020-12-31',NULL,NULL,NULL,'',NULL,NULL,NULL,NULL,NULL,'F','23529000445172',NULL,NULL,'42b29d0771f3b7ef',NULL,'0.62241429148467','0.95365269664084'), > (4,'23529000105040','Dillon','Eva',NULL,NULL,'',NULL,NULL,'8916 Library Rd.',NULL,'Springfield, MA','44224',NULL,'(212) 555-1212',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'1952-04-03','MPL','PT','1987-07-01','2020-12-31',NULL,NULL,NULL,'',NULL,NULL,NULL,NULL,NULL,'F','23529000105040',NULL,NULL,'42b29d0771f3b7ef',NULL,'0.90102063948384','0.64414513823031'), >diff --git a/installer/data/mysql/en/optional/sample_quotes.sql b/installer/data/mysql/en/optional/sample_quotes.sql >index 6a20bd5..9371dea 100644 >--- a/installer/data/mysql/en/optional/sample_quotes.sql >+++ b/installer/data/mysql/en/optional/sample_quotes.sql >@@ -1,34 +1,34 @@ > /*!40000 ALTER TABLE `quotes` DISABLE KEYS */; > INSERT INTO `quotes` VALUES >-(1,'George Washington','To be prepared for war is one of the most effectual means of preserving peace.','0000-00-00 00:00:00'), >-(2,'Thomas Jefferson','When angry, count ten, before you speak; if very angry, an hundred.','0000-00-00 00:00:00'), >-(3,'Abraham Lincoln','Four score and seven years ago our fathers brought forth on this continent, a new nation, conceived in Liberty, and dedicated to the proposition that all men are created equal.','0000-00-00 00:00:00'), >-(4,'Abraham Lincoln','I have always found that mercy bears richer fruits than strict justice.','0000-00-00 00:00:00'), >-(5,'Andrew Johnson','I feel incompetent to perform duties...which have been so unexpectedly thrown upon me.','0000-00-00 00:00:00'), >-(6,'Rutherford B. Hayes','He serves his party best who serves his country best.','0000-00-00 00:00:00'), >-(7,'Theodore Roosevelt','No President has ever enjoyed himself as much as I?','0000-00-00 00:00:00'), >-(8,'Theodore Roosevelt','Speak softly and carry a big stick.','0000-00-00 00:00:00'), >-(9,'William H. Taft','I have come to the conclusion that the major part of the president is to increase the gate receipts of expositions and fairs and bring tourists to town.','0000-00-00 00:00:00'), >-(11,'Woodrow Wilson','You cannot become thorough Americans if you think of yourselves in groups. America does not consist of groups. A man who thinks of himself as belonging to a particular national group in America has not yet become an American.','0000-00-00 00:00:00'), >-(12,'Calvin Coolidge','If you don\'t say anything, you won\'t be called on to repeat it.','0000-00-00 00:00:00'), >-(13,'Calvin Coolidge','Four fifths of all our troubles in this life would disappear if we would only sit down and keep still.','0000-00-00 00:00:00'), >-(14,'Herbert Hoover','The slogan of progress is changing from the full dinner pail to the full garage.','0000-00-00 00:00:00'), >-(15,'Franklin D. Roosevelt','Let me assert my firm belief that the only thing we have to fear is fear itself.','0000-00-00 00:00:00'), >-(16,'Harry S. Truman','If you can\'t stand the heat, get out of the kitchen.','0000-00-00 00:00:00'), >-(17,'Harry S. Truman','The atom bomb was no great decision. It was merely another powerful weapon in the arsenal of righteousness.','0000-00-00 00:00:00'), >-(18,'Harry S. Truman','The buck stops here.','0000-00-00 00:00:00'), >-(19,'Dwight D. Eisenhower','History does not long entrust the care of freedom to the weak or the timid.','0000-00-00 00:00:00'), >-(20,'John F. Kennedy','My fellow Americans, ask not what your country can do for you; ask what you can do for your country.','0000-00-00 00:00:00'), >-(22,'John F. Kennedy','I do not think it altogether inappropriate to introduce myself to this audience. I am the man who accompanied Jacqueline Kennedy to Paris, and I have enjoyed it.','0000-00-00 00:00:00'), >-(23,'Lyndon B. Johnson','The Great Society is a place where every child can find knowledge to enrich his mind and to enlarge his talents. It is a place where the city of man serves not only the needs of the body and the demands of commerce but the desire for beauty and the hunger for community. It is a place where men are more concerned with the quality of their goals than the quantity of their goods.','0000-00-00 00:00:00'), >-(24,'Richard Nixon','People have got to know whether or not their president is a crook. Well, I\'m not a crook.','0000-00-00 00:00:00'), >-(25,'Richard Nixon','When the President does it, that means that it is not illegal.','0000-00-00 00:00:00'), >-(26,'Gerald R. Ford','Our Long national nightmare is over.','0000-00-00 00:00:00'), >-(27,'Gerald R. Ford','Our constitution works. Our great republic is a government of laws, not of men.','0000-00-00 00:00:00'), >-(28,'Jimmy Carter','A strong nation, like a strong person, can afford to be gentle, firm, thoughtful, and restrained. It can afford to extend a helping hand to others. It\'s a weak nation, like a weak person, that must behave with bluster and boasting and rashness and other signs of insecurity.','0000-00-00 00:00:00'), >-(30,'Ronald Reagan','It is not my intention to do away with government. It is rather to make it work -work with us, not over us; stand by our side, not ride on our back. Government can and must provide opportunity, not smother it; foster productivity, not stifle it. This Administration\'s objective will be a healthy, vigorous, growing economy.','0000-00-00 00:00:00'), >-(31,'Ronald Reagan','Each generation goes further than the generation preceding it because it stands on the shoulders of that generation. You will have opportunities beyond anything we\'ve ever known.','0000-00-00 00:00:00'), >-(32,'George H. W. BushÃÂ ','We have ...drawn a line in the sand.','0000-00-00 00:00:00'), >-(33,'George W. Bush','If America shows weakness and uncertainty, the world will drift toward tragedy. That will not happen on my watch.','0000-00-00 00:00:00'), >-(34,'George W. Bush','Every nation in every region now has a decision to make. Either you are with us, or you are with the terrorists.','0000-00-00 00:00:00'); >+(1,'George Washington','To be prepared for war is one of the most effectual means of preserving peace.',now()), >+(2,'Thomas Jefferson','When angry, count ten, before you speak; if very angry, an hundred.',now()), >+(3,'Abraham Lincoln','Four score and seven years ago our fathers brought forth on this continent, a new nation, conceived in Liberty, and dedicated to the proposition that all men are created equal.',now()), >+(4,'Abraham Lincoln','I have always found that mercy bears richer fruits than strict justice.',now()), >+(5,'Andrew Johnson','I feel incompetent to perform duties...which have been so unexpectedly thrown upon me.',now()), >+(6,'Rutherford B. Hayes','He serves his party best who serves his country best.',now()), >+(7,'Theodore Roosevelt','No President has ever enjoyed himself as much as I?',now()), >+(8,'Theodore Roosevelt','Speak softly and carry a big stick.',now()), >+(9,'William H. Taft','I have come to the conclusion that the major part of the president is to increase the gate receipts of expositions and fairs and bring tourists to town.',now()), >+(11,'Woodrow Wilson','You cannot become thorough Americans if you think of yourselves in groups. America does not consist of groups. A man who thinks of himself as belonging to a particular national group in America has not yet become an American.',now()), >+(12,'Calvin Coolidge','If you don\'t say anything, you won\'t be called on to repeat it.',now()), >+(13,'Calvin Coolidge','Four fifths of all our troubles in this life would disappear if we would only sit down and keep still.',now()), >+(14,'Herbert Hoover','The slogan of progress is changing from the full dinner pail to the full garage.',now()), >+(15,'Franklin D. Roosevelt','Let me assert my firm belief that the only thing we have to fear is fear itself.',now()), >+(16,'Harry S. Truman','If you can\'t stand the heat, get out of the kitchen.',now()), >+(17,'Harry S. Truman','The atom bomb was no great decision. It was merely another powerful weapon in the arsenal of righteousness.',now()), >+(18,'Harry S. Truman','The buck stops here.',now()), >+(19,'Dwight D. Eisenhower','History does not long entrust the care of freedom to the weak or the timid.',now()), >+(20,'John F. Kennedy','My fellow Americans, ask not what your country can do for you; ask what you can do for your country.',now()), >+(22,'John F. Kennedy','I do not think it altogether inappropriate to introduce myself to this audience. I am the man who accompanied Jacqueline Kennedy to Paris, and I have enjoyed it.',now()), >+(23,'Lyndon B. Johnson','The Great Society is a place where every child can find knowledge to enrich his mind and to enlarge his talents. It is a place where the city of man serves not only the needs of the body and the demands of commerce but the desire for beauty and the hunger for community. It is a place where men are more concerned with the quality of their goals than the quantity of their goods.',now()), >+(24,'Richard Nixon','People have got to know whether or not their president is a crook. Well, I\'m not a crook.',now()), >+(25,'Richard Nixon','When the President does it, that means that it is not illegal.',now()), >+(26,'Gerald R. Ford','Our Long national nightmare is over.',now()), >+(27,'Gerald R. Ford','Our constitution works. Our great republic is a government of laws, not of men.',now()), >+(28,'Jimmy Carter','A strong nation, like a strong person, can afford to be gentle, firm, thoughtful, and restrained. It can afford to extend a helping hand to others. It\'s a weak nation, like a weak person, that must behave with bluster and boasting and rashness and other signs of insecurity.',now()), >+(30,'Ronald Reagan','It is not my intention to do away with government. It is rather to make it work -work with us, not over us; stand by our side, not ride on our back. Government can and must provide opportunity, not smother it; foster productivity, not stifle it. This Administration\'s objective will be a healthy, vigorous, growing economy.',now()), >+(31,'Ronald Reagan','Each generation goes further than the generation preceding it because it stands on the shoulders of that generation. You will have opportunities beyond anything we\'ve ever known.',now()), >+(32,'George H. W. Bush','We have ...drawn a line in the sand.',now()), >+(33,'George W. Bush','If America shows weakness and uncertainty, the world will drift toward tragedy. That will not happen on my watch.',now()), >+(34,'George W. Bush','Every nation in every region now has a decision to make. Either you are with us, or you are with the terrorists.',now()); > /*!40000 ALTER TABLE `quotes` ENABLE KEYS */; >diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql >index 42bff46..1958862 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/installer/data/mysql/kohastructure.sql >@@ -69,7 +69,7 @@ CREATE TABLE `auth_subfield_structure` ( > `linkid` tinyint(1) NOT NULL default 0, > `kohafield` varchar(45) NULL default '', > `frameworkcode` varchar(10) NOT NULL default '', >- `defaultvalue` TEXT DEFAULT '', >+ `defaultvalue` TEXT, > PRIMARY KEY (`authtypecode`,`tagfield`,`tagsubfield`), > KEY `tab` (`authtypecode`,`tab`), > CONSTRAINT `auth_subfield_structure_ibfk_1` FOREIGN KEY (`authtypecode`) REFERENCES `auth_types` (`authtypecode`) ON DELETE CASCADE ON UPDATE CASCADE >@@ -2209,7 +2209,7 @@ CREATE TABLE `virtualshelves` ( -- information about lists (or virtual shelves) > `category` varchar(1) default NULL, -- type of list (private [1], public [2]) > `sortfield` varchar(16) default 'title', -- the field this list is sorted on > `lastmodified` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, -- date and time the list was last modified >- `created_on` TIMESTAMP NOT NULL, -- creation time >+ `created_on` datetime NOT NULL, -- creation time > `allow_add` tinyint(1) default 0, -- permission for adding entries to list > `allow_delete_own` tinyint(1) default 1, -- permission for deleting entries frm list that you added yourself > `allow_delete_other` tinyint(1) default 0, -- permission for deleting entries from list that another person added >-- >2.7.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 16573
:
51727
|
51728
|
51741
|
51751
|
51760
|
51761
|
51762
|
53639
|
53664
|
53676
|
53677
|
53678
|
53679
|
54658