ERROR 1136 (21S01) at line 6: Column count doesn't match value count at row 1
Created attachment 43854 [details] [review] Bug 15053 - sample_creator_data.sql now fails during a fresh install ERROR 1136 (21S01) at line 6: Column count doesn't match value count at row 1 Test Plan: 1) Start fresh install 2) Install all test data 3) Note the SQL error 4) Apply this patch 5) Repeat steps 1 and 2 6) Note no error
*** Bug 15064 has been marked as a duplicate of this bug. ***
Created attachment 44006 [details] [review] [SIGNED-OFF] Bug 15053 - sample_creator_data.sql now fails during a fresh install ERROR 1136 (21S01) at line 6: Column count doesn't match value count at row 1 Test Plan: 1) Start fresh install 2) Install all test data 3) Note the SQL error 4) Apply this patch 5) Repeat steps 1 and 2 6) Note no error Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> All fixed files loads without problem. No errors found
Created attachment 44007 [details] [review] Bug 15053: Followup for french file Fixes french sample creators data To test: 1 ) Apply the patch 2) Remove sample creator date delete from creator_layouts; delete from creator_templates; delete from printers_profile 3) Load fr-FR/2-Optionel/sample_labels.sql Without the patch french file can't be loaded
$ git grep -l labels_t I think Russian and Ukrainian are broken as well. Please submit follow ups for those, so I can just sign off everyone accordingly.
Created attachment 44125 [details] [review] Bug 15053: Fix fr-FR, ru-RU and uk-UK sample creator data Fixes other sample creators data To test: 1 ) Apply the patch 2) Remove sample creator date delete from creator_layouts; delete from creator_templates; delete from printers_profile 3) Load fr-FR/2-Optionel/sample_labels.sql or ru-RU/optional/print_labels.sql or uk-UA/optional/print_labels.sql Without the patch this files can't be loaded Test all of them In case of ru and uk I removed a patron card layout
(In reply to M. Tompsett from comment #5) > $ git grep -l labels_t > I think Russian and Ukrainian are broken as well. > Please submit follow ups for those, so I can just sign off everyone > accordingly. Uploaded some kind of fix for ru and uk
Comment on attachment 44125 [details] [review] Bug 15053: Fix fr-FR, ru-RU and uk-UK sample creator data Review of attachment 44125 [details] [review]: ----------------------------------------------------------------- Same for both RU and UK files. ::: installer/data/mysql/ru-RU/optional/print_labels.sql @@ -17,5 @@ > -LOCK TABLES `labels_conf` WRITE; > -/*!40000 ALTER TABLE `labels_conf` DISABLE KEYS */; > -INSERT INTO `labels_conf` > -(id,barcodetype,title,subtitle,itemtype,barcode,dewey,classification,subclass,itemcallnumber,author,issn,isbn,startlabel, > -printingtype,formatstring,layoutname,guidebox,active,fonttype,ccode,callnum_split) Why remove the fields list completely? It would have been good to keep updated. @@ -21,5 @@ > -printingtype,formatstring,layoutname,guidebox,active,fonttype,ccode,callnum_split) > -VALUES > -(5,'CODE39',2,0,3,0,0,0,0,4,1,0,0,1,'BIBBAR','библио-запись и штрих-код',1,1,NULL,NULL,NULL,NULL), > -(6,'CODE39',2,0,0,0,0,3,4,0,1,0,3,1,'BAR','переменный',1,1,NULL,NULL,NULL,NULL), > -(7,'CODE39',1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,2,NULL,NULL,1,'PATCRD','Карточки идентификации посетителей',1,NULL,NULL,NULL,NULL,NULL); This last one looks strange, but why not keep the strange data?
> Why remove the fields list completely? It would have been good to keep > updated. > Table names have changed. Column names have changed. There is a different number of columns now. This is really old data > This last one looks strange, but why not keep the strange data? Because that data need to be fixed to be loaded. I'm in other things right now, that's the reason I don't fix them in the first place, only french data in which I simply added a couple of columns.
> > -(5,'CODE39',2,0,3,0,0,0,0,4,1,0,0,1,'BIBBAR','библио-запись и штрих-код',1,1,NULL,NULL,NULL,NULL), > > -(6,'CODE39',2,0,0,0,0,3,4,0,1,0,3,1,'BAR','переменный',1,1,NULL,NULL,NULL,NULL), > > -(7,'CODE39',1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,2,NULL,NULL,1,'PATCRD','Карточки идентификации посетителей',1,NULL,NULL,NULL,NULL,NULL); From this I only removed the last one, patron card data, 1 & 2 in my patch are equivalent to 5 & 6 (1,'CODE39',1,'BIBBAR','библио-запись и штрих-код',0,1,'TR',7,'POINT',0,'L','title, author, itemcallnumber', '<opt></opt>', 'Labels'), (2,'CODE39',1,'BAR','переменный',0,1,'TR',3,'POINT',0,'L','','','Labels');
Wow... That error in comment #1 was hard to notice.
Any logic with printers_profile should be placed BEFORE the creators_layout and creators_templates logic in: installer/data/mysql/de-DE/optional/sample_creator_data.sql installer/data/mysql/en/optional/sample_creator_data.sql installer/data/mysql/es-ES/optional/sample_creator_data.sql installer/data/mysql/it-IT/necessari/sample_creator_data.sql installer/data/mysql/nb-NO/2-Valgfritt/sample_creator_data.sql to completely avoid errors.
Created attachment 44159 [details] [review] [SIGNED OFF] Bug 15053: sample_creator_data.sql now fails during a fresh install ERROR 1136 (21S01) at line 6: Column count doesn't match value count at row 1 Test Plan: 1) Start fresh install 2) Install all test data 3) Note the SQL error 4) Apply this patch 5) Repeat steps 1 and 2 6) Note no error Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> All fixed files loads without problem. No errors found Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Created attachment 44160 [details] [review] [SIGNED OFF] Bug 15053: Fix fr-FR, ru-RU and uk-UK sample creator data Fixes other sample creators data To test: 1 ) Apply the patch 2) Remove sample creator date delete from creator_layouts; delete from creator_templates; delete from printers_profile 3) Load fr-FR/2-Optionel/sample_labels.sql or ru-RU/optional/print_labels.sql or uk-UA/optional/print_labels.sql Without the patch this files can't be loaded Test all of them In case of ru and uk I removed a patron card layout Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
What is this labels_templates table?
(In reply to Jonathan Druart from comment #15) > What is this labels_templates table? Old data for an old table I suppose, forget to change the comment
Please don't forget about comment #12. :)
(In reply to M. Tompsett from comment #17) > Please don't forget about comment #12. :) Do this patches introduce the problem you mention?
(In reply to Tomás Cohen Arazi from comment #18) > (In reply to M. Tompsett from comment #17) > > Please don't forget about comment #12. :) > > Do this patches introduce the problem you mention? These patches do correct the error in comment #1. They do not introduce new errors, as far as I can tell. But a: truncate blah 1 truncate blah 2 truncate blah 3 source blah 4 where blah 1..3 = the creator_ tables and printers_profile and where blah 4 is in a nice loop for each of the 8 files. (I ignored pl-PL) -- I believe this does have an error. I'll retest later to be sure. But like comment #12 says, printers_profile stuff before the other stuff dealt with it. I suspect it is because cascading creates a printers_profile entry, but I didn't look closely.
(In reply to M. Tompsett from comment #19) > (In reply to Tomás Cohen Arazi from comment #18) > > (In reply to M. Tompsett from comment #17) > > > Please don't forget about comment #12. :) > > > > Do this patches introduce the problem you mention? > > These patches do correct the error in comment #1. > They do not introduce new errors, as far as I can tell. > But a: > truncate blah 1 > truncate blah 2 > truncate blah 3 > source blah 4 > where blah 1..3 = the creator_ tables and printers_profile > and where blah 4 is in a nice loop for each of the 8 files. > (I ignored pl-PL) > -- I believe this does have an error. I'll retest later to be sure. > But like comment #12 says, printers_profile stuff before the other stuff > dealt with it. I suspect it is because cascading creates a printers_profile > entry, but I didn't look closely. Yes, please. Re-test and fill a bug if your suspicion is correct. 3.22 needs to be rock solid. As all Koha releases ;-) Thanks for taking the time to do this.
(In reply to Tomás Cohen Arazi from comment #20) > Yes, please. Re-test and fill a bug if your suspicion is correct. 3.22 needs > to be rock solid. As all Koha releases ;-) Thanks for taking the time to do > this. No errors thus far in the retest. I'll file a bug to remove all warnings. :)
Second patch does not work: mysql koha_empty < installer/data/mysql/fr-FR/2-Optionel/sample_labels.sql ERROR 1136 (21S01) at line 15: Column count doesn't match value count at row 1 [koha@koha-qa:~/src (BZ15053) ✭]% mysql koha_empty < installer/data/mysql/ru-RU/optional/print_labels.sql ERROR 1136 (21S01) at line 19: Column count doesn't match value count at row 1 [koha@koha-qa:~/src (BZ15053) ✭]% mysql koha_empty < installer/data/mysql/uk-UA/optional/print_labels.sql ERROR 1136 (21S01) at line 21: Column count doesn't match value count at row 1
(In reply to Jonathan Druart from comment #22) > Second patch does not work: > > mysql koha_empty < installer/data/mysql/fr-FR/2-Optionel/sample_labels.sql > ERROR 1136 (21S01) at line 15: Column count doesn't match value count at row > 1 > > [koha@koha-qa:~/src (BZ15053) ✭]% mysql koha_empty < > installer/data/mysql/ru-RU/optional/print_labels.sql > ERROR 1136 (21S01) at line 19: Column count doesn't match value count at row > 1 > > [koha@koha-qa:~/src (BZ15053) ✭]% mysql koha_empty < > installer/data/mysql/uk-UA/optional/print_labels.sql > ERROR 1136 (21S01) at line 21: Column count doesn't match value count at row > 1 $ git log --oneline | head -4 81c151f Bug 15053: Fix fr-FR, ru-RU and uk-UK sample creator data 9dc6b80 Bug 15053: sample_creator_data.sql now fails during a fresh install 05d3770 Bug 11881: QA follow-up - rename class 5adb226 Bug 11881: Small improvements for Items available for reference $ mysql koha_empty < kohastructure.sql $ mysql koha_empty < ru-RU/optional/print_labels.sql $ mysql koha_empty -e "delete from creator_layouts; delete from creator_templates; delete from printers_profile" $ mysql koha_empty < uk-UA/optional/print_labels.sql $ mysql koha_empty -e "delete from creator_layouts; delete from creator_templates; delete from printers_profile" $ mysql koha_empty < fr-FR/2-Optionel/sample_labels.sql Works for me
Created attachment 44195 [details] [review] Bug 15053: sample_creator_data.sql now fails during a fresh install ERROR 1136 (21S01) at line 6: Column count doesn't match value count at row 1 Test Plan: 1) Start fresh install 2) Install all test data 3) Note the SQL error 4) Apply this patch 5) Repeat steps 1 and 2 6) Note no error Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> All fixed files loads without problem. No errors found Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Created attachment 44196 [details] [review] Bug 15053: Fix fr-FR, ru-RU and uk-UK sample creator data Fixes other sample creators data To test: 1 ) Apply the patch 2) Remove sample creator date delete from creator_layouts; delete from creator_templates; delete from printers_profile 3) Load fr-FR/2-Optionel/sample_labels.sql or ru-RU/optional/print_labels.sql or uk-UA/optional/print_labels.sql Without the patch this files can't be loaded Test all of them In case of ru and uk I removed a patron card layout Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(In reply to Bernardo Gonzalez Kriegel from comment #23) > Works for me OOpps! Sorry about that Bernardo, indeed it works well. My koha_empty DB was not updated :-/ So again, my apologies.
(In reply to Jonathan Druart from comment #26) > So again, my apologies. No problem :) Thank you for your work!!
Patches pushed to master. Thanks Kyle and Bernardo!