Bugzilla – Attachment 4103 Details for
Bug 5860
Adding duplicate stocknumber will fail silently
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Signed followup patch
patch.txt (text/plain), 1.69 KB, created by
Marcel de Rooy
on 2011-05-13 12:51:35 UTC
(
hide
)
Description:
Signed followup patch
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2011-05-13 12:51:35 UTC
Size:
1.69 KB
patch
obsolete
>From 92cbad3326cb86919782c9f688cfd52060841574 Mon Sep 17 00:00:00 2001 >From: Chris Cormack <chrisc@catalyst.net.nz> >Date: Fri, 13 May 2011 14:01:43 +1200 >Subject: [PATCH] [SIGNED-OFF] Bug 5860 - Attempted follow up patch to fix itemstocknumberindex >Content-Type: text/plain; charset="utf-8" > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >May 13: Replaced information_schema construct with show indexes. Check existence on both names. Tested it. >--- > installer/data/mysql/updatedatabase.pl | 7 ++++++- > 1 files changed, 6 insertions(+), 1 deletions(-) > >diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl >index 52951e7..1de273e 100755 >--- a/installer/data/mysql/updatedatabase.pl >+++ b/installer/data/mysql/updatedatabase.pl >@@ -4217,7 +4217,12 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) { > > $DBversion = '3.03.00.042'; > if (C4::Context->preference("Version") < TransformToNum($DBversion) && $original_version < TransformToNum("3.02.06.001")) { >- $dbh->do("ALTER TABLE `items` DROP INDEX `itemsstocknumberidx`;"); >+ #check old indexes and possibly remove >+ my @row = $dbh->selectrow_array("SHOW INDEXES FROM items WHERE key_name='itemstocknumberidx'"); >+ $dbh->do("ALTER TABLE `items` DROP INDEX `itemstocknumberidx`;") if @row; >+ @row = $dbh->selectrow_array("SHOW INDEXES FROM items WHERE key_name='itemsstocknumberidx'"); >+ $dbh->do("ALTER TABLE `items` DROP INDEX `itemsstocknumberidx`;") if @row; >+ #add index > $dbh->do("ALTER TABLE items ADD INDEX itemstocknumberidx (stocknumber);"); > print "Upgrade to $DBversion done (Change items.stocknumber to be not unique)\n"; > SetVersion ($DBversion); >-- >1.6.0.6 >
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 5860
:
3506
|
3615
|
4092
|
4103
|
4121
|
4122
|
4123
|
4141
|
4143
|
4144