Bugzilla – Attachment 56478 Details for
Bug 16935
launch export_records.pl with deleted_barcodes param fails
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 16935 - launch export_records.pl with deleted_barcodes param fails
Bug-16935---launch-exportrecordspl-with-deletedbar.patch (text/plain), 1.95 KB, created by
Nicolas Legrand
on 2016-10-14 08:31:38 UTC
(
hide
)
Description:
Bug 16935 - launch export_records.pl with deleted_barcodes param fails
Filename:
MIME Type:
Creator:
Nicolas Legrand
Created:
2016-10-14 08:31:38 UTC
Size:
1.95 KB
patch
obsolete
>From c238a35c4e6d5791b133b5844e0ff4e019e4ba17 Mon Sep 17 00:00:00 2001 >From: Fridolin Somers <fridolin.somers@biblibre.com> >Date: Wed, 24 Aug 2016 11:44:55 +0200 >Subject: [PATCH] Bug 16935 - launch export_records.pl with deleted_barcodes > param fails > >When launching misc/export_records.pl with this command line : > > misc/export_records.pl --date=`date +%d/%m/%Y` --deleted_barcodes --filename=/tmp/koha.mrc > >You get this error message : > >DBD::mysql::db selectall_arrayref failed: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 4 [for Statement " ( > SELECT DISTINCT barcode > FROM deleteditems > WHERE deleteditems.biblionumber = ? > "] at misc/export_records.pl line 189. > >This is because of a '(' after 'q|', looks like a typo. >Also, this patch removes useless var $q. > >Test plan : >- Delete an item with barcode >- Without patch, run : misc/export_records.pl --date=`date +%d/%m/%Y` --deleted_barcodes --filename=/tmp/koha.mrc >=> You get dirty MySQL >- Without patch, run the same command >=> No error and the file is generated > >Signed-off-by: Nicolas Legrand <nicolas.legrand@bulac.fr> >--- > misc/export_records.pl | 6 ++---- > 1 file changed, 2 insertions(+), 4 deletions(-) > >diff --git a/misc/export_records.pl b/misc/export_records.pl >index 59d0dfe..aa1cf93 100755 >--- a/misc/export_records.pl >+++ b/misc/export_records.pl >@@ -184,14 +184,12 @@ if ( @record_ids and $id_list_file ) { > > if ($deleted_barcodes) { > for my $record_id ( @record_ids ) { >- my $q = q| >- |; >- my $barcode = $dbh->selectall_arrayref(q| ( >+ my $barcode = $dbh->selectall_arrayref(q| > SELECT DISTINCT barcode > FROM deleteditems > WHERE deleteditems.biblionumber = ? > |, { Slice => {} }, $record_id ); >- say $_->{barcode} for @$barcode >+ say $_->{barcode} for @$barcode; > } > } > else { >-- >2.1.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 16935
:
54810
|
56478
|
56831