[Koha-bugs] [Bug 12488] bulkmarcimport.pl -d option should use DELETE instead of TRUNCATE

2019-02-10 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12488

Katrin Fischer  changed:

   What|Removed |Added

   Severity|trivial |normal

--- Comment #11 from Katrin Fischer  ---
I think it would be worthwhile fixing this now, especially since MySQL >= 5.5
should be much more common now than in 2014 when this bug was initially filed?

Can we agree an Magnus fix? (comment#5)

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 12488] bulkmarcimport.pl -d option should use DELETE instead of TRUNCATE

2018-10-26 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12488

Jonathan Druart  changed:

   What|Removed |Added

   See Also|https://bugs.koha-community |
   |.org/bugzilla3/show_bug.cgi |
   |?id=21655   |
 CC||bargi...@pusc.it

--- Comment #10 from Jonathan Druart  
---
*** Bug 21655 has been marked as a duplicate of this bug. ***

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 12488] bulkmarcimport.pl -d option should use DELETE instead of TRUNCATE

2018-10-25 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12488

Jonathan Druart  changed:

   What|Removed |Added

   See Also||https://bugs.koha-community
   ||.org/bugzilla3/show_bug.cgi
   ||?id=21655

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 12488] bulkmarcimport.pl -d option should use DELETE instead of TRUNCATE

2018-10-10 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12488

Andreas Roussos  changed:

   What|Removed |Added

 CC||arouss1...@gmail.com

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 12488] bulkmarcimport.pl -d option should use DELETE instead of TRUNCATE

2016-12-27 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12488

David Gustafsson  changed:

   What|Removed |Added

 CC||glask...@gmail.com

--- Comment #9 from David Gustafsson  ---
Keep getting "Cannot truncate a table referenced in a foreign key constraint"
errors when using the -d option. So for me the only options have been to change
the script to using DELETE FROM instead, or deleting manually through the MySQL
cli.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 12488] bulkmarcimport.pl -d option should use DELETE instead of TRUNCATE

2015-10-27 Thread bugzilla-daemon
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12488

--- Comment #7 from Magnus Enger  ---
Could it be an idea to introduce a command line switch, to let the user choose
between DELETE and TRUNCATE? With TRUNCATE (the current behaviour) as the
default if e.g. --use_delete is not provided?

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 12488] bulkmarcimport.pl -d option should use DELETE instead of TRUNCATE

2015-10-27 Thread bugzilla-daemon
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12488

M. Tompsett  changed:

   What|Removed |Added

   See Also||http://bugs.koha-community.
   ||org/bugzilla3/show_bug.cgi?
   ||id=12486

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 12488] bulkmarcimport.pl -d option should use DELETE instead of TRUNCATE

2015-10-27 Thread bugzilla-daemon
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12488

--- Comment #8 from M. Tompsett  ---
(In reply to Magnus Enger from comment #7)
> Could it be an idea to introduce a command line switch, to let the user
> choose between DELETE and TRUNCATE? With TRUNCATE (the current behaviour) as
> the default if e.g. --use_delete is not provided?

I'd think that --use_truncate would be better, and default with DELETE, because
the original intent is almost always rollback, is it not?

Adding a command line option would make this somewhere between a fix and
enhancement (not going to make 3.22, is it?). Changing it to use DELETE would
just be a fix (could make it into 3.22), in my opinion.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 12488] bulkmarcimport.pl -d option should use DELETE instead of TRUNCATE

2015-06-03 Thread bugzilla-daemon
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12488

M. Tompsett mtomp...@hotmail.com changed:

   What|Removed |Added

 CC||mtomp...@hotmail.com

--- Comment #6 from M. Tompsett mtomp...@hotmail.com ---
(In reply to wajasu from comment #4)
 Also, an understanding of bulkimport.pl and the implications for folks with
 huge imports, and the resulting rollback support.

Slow processing is usually overcome by intermediate user feedback. It's a bulk
import. People are going to assume it is slow to begin with. And the ability to
rollback is very important in my opinion.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 12488] bulkmarcimport.pl -d option should use DELETE instead of TRUNCATE

2015-03-25 Thread bugzilla-daemon
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12488

--- Comment #5 from Magnus Enger mag...@enger.priv.no ---
This does the trick for me:

if ($delete) {
if ($biblios){
print deleting biblios\n;
$dbh-do(DELETE FROM biblio);
$dbh-do(ALTER TABLE biblio AUTO_INCREMENT = 1);
$dbh-do(DELETE FROM biblioitems);
$dbh-do(ALTER TABLE biblioitems AUTO_INCREMENT = 1);
$dbh-do(DELETE FROM items);
$dbh-do(ALTER TABLE items AUTO_INCREMENT = 1);
}
else {
print deleting authorities\n;
$dbh-do(truncate auth_header);
}
$dbh-do(truncate zebraqueue);
}

On an uptodate Debian 7, running MySQL 5.5.41-0+wheezy1-log.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 12488] bulkmarcimport.pl -d option should use DELETE instead of TRUNCATE

2014-11-21 Thread bugzilla-daemon
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12488

Magnus Enger mag...@enger.priv.no changed:

   What|Removed |Added

 CC||mag...@enger.priv.no

--- Comment #2 from Magnus Enger mag...@enger.priv.no ---
Hm, I guess we must expect Koha to run on MySQL both aboe and below 5.5. Will
DELETE FROM work for both? Or should we use different things depending on the
MySQL version?

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 12488] bulkmarcimport.pl -d option should use DELETE instead of TRUNCATE

2014-11-21 Thread bugzilla-daemon
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12488

--- Comment #3 from Magnus Enger mag...@enger.priv.no ---
Also, I got some nasty foreign key errors with the script as it is now, on
MySQL version 5.5.40-0+wheezy1:

deleting biblios
DBD::mysql::db do failed: Cannot truncate a table referenced in a foreign key
constraint (`koha_vulkan`.`biblioitems`, CONSTRAINT `biblioitems_ibfk_1`
FOREIGN KEY (`biblionumber`) REFERENCES `koha_vulkan`.`biblio`
(`biblionumber`)) at /usr/share/koha/bin/migration_tools/bulkmarcimport.pl line
137.
DBD::mysql::db do failed: Cannot truncate a table referenced in a foreign key
constraint (`koha_vulkan`.`items`, CONSTRAINT `items_ibfk_1` FOREIGN KEY
(`biblioitemnumber`) REFERENCES `koha_vulkan`.`biblioitems`
(`biblioitemnumber`)) at /usr/share/koha/bin/migration_tools/bulkmarcimport.pl
line 138.
DBD::mysql::db do failed: Cannot truncate a table referenced in a foreign key
constraint (`koha_vulkan`.`branchtransfers`, CONSTRAINT
`branchtransfers_ibfk_3` FOREIGN KEY (`itemnumber`) REFERENCES
`koha_vulkan`.`items` (`itemnumber`)) at
/usr/share/koha/bin/migration_tools/bulkmarcimport.pl line 139.
Characteristic MARC flavour: NORMARC

Changing truncate to DELETE FROM as suggested in the first comment made this
problem go away.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 12488] bulkmarcimport.pl -d option should use DELETE instead of TRUNCATE

2014-11-21 Thread bugzilla-daemon
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12488

wajasu matted-34...@mypacks.net changed:

   What|Removed |Added

 CC||matted-34...@mypacks.net

--- Comment #4 from wajasu matted-34...@mypacks.net ---
FYI: If we move to DELETE FROM it will take longer as its a DML command and can
be rolled back.   TRUNCATE is a DDL command and is autocommitted, recreating
the tables and indexes, with AUTO_INCREMENT starting over. So we must consider
if we want to reset AUTO_INCREMENT on the table when using DELETE FROM as well.
( ALTER TABLE thetable AUTO_INCREMENT = 1 ).
Also, an understanding of bulkimport.pl and the implications for folks with
huge imports, and the resulting rollback support.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 12488] bulkmarcimport.pl -d option should use DELETE instead of TRUNCATE

2014-11-09 Thread bugzilla-daemon
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12488

Katrin Fischer katrin.fisc...@bsz-bw.de changed:

   What|Removed |Added

 CC||katrin.fisc...@bsz-bw.de

--- Comment #1 from Katrin Fischer katrin.fisc...@bsz-bw.de ---
Still valid on current master.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/