Bugzilla – Attachment 71436 Details for
Bug 20144
Test suite is failing with new default SQL modes
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 20144: [sql_modes] Correct quotes.timestamp values in tests
Bug-20144-sqlmodes-Correct-quotestimestamp-values-.patch (text/plain), 2.16 KB, created by
Julian Maurice
on 2018-02-12 10:54:29 UTC
(
hide
)
Description:
Bug 20144: [sql_modes] Correct quotes.timestamp values in tests
Filename:
MIME Type:
Creator:
Julian Maurice
Created:
2018-02-12 10:54:29 UTC
Size:
2.16 KB
patch
obsolete
>From 4947ee2a528ebdb4c60ad96772bb9d2ae76a3e33 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Mon, 5 Feb 2018 18:23:59 -0300 >Subject: [PATCH] Bug 20144: [sql_modes] Correct quotes.timestamp values in > tests > >Fix for: >Incorrect datetime value: '0000-00-00 00:00:00' for column 'timestamp' > >t/db_dependent/Koha.t > >Signed-off-by: Josef Moravec <josef.moravec@gmail.com> >Signed-off-by: Julian Maurice <julian.maurice@biblibre.com> >--- > t/db_dependent/Koha.t | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > >diff --git a/t/db_dependent/Koha.t b/t/db_dependent/Koha.t >index 64bb045cde..4e814a0738 100644 >--- a/t/db_dependent/Koha.t >+++ b/t/db_dependent/Koha.t >@@ -173,15 +173,15 @@ SKIP: > # Fill the quote table with the default needed and a spare > $dbh->do("DELETE FROM quotes WHERE id=3 OR id=25;"); > my $sql = "INSERT INTO quotes (id,source,text,timestamp) VALUES >-(25,'Richard Nixon','When the President does it, that means that it is not illegal.','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');"; >+(25,'Richard Nixon','When the President does it, that means that it is not illegal.',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());"; > $dbh->do($sql); > > my $expected_quote = { > id => 3, > source => 'Abraham Lincoln', > text => '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.', >- timestamp => re('\d{4}-\d{2}-\d{2}\s\d{2}:\d{2}:\d{2}'), #'0000-00-00 00:00:00', >+ timestamp => re('\d{4}-\d{2}-\d{2}\s\d{2}:\d{2}:\d{2}'), #'YYYY-MM-DD HH:MM:SS' > }; > > # test quote retrieval based on id >-- >2.14.2
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 20144
:
71410
|
71411
|
71412
|
71413
|
71414
|
71415
|
71416
|
71417
|
71418
|
71419
|
71420
|
71421
|
71422
|
71423
|
71424
|
71425
|
71427
|
71428
|
71429
|
71430
|
71431
|
71432
|
71434
|
71435
| 71436 |
71437
|
71438
|
71440
|
71441
|
71442
|
71443
|
71444
|
71445
|
71446
|
71447
|
71448
|
71449
|
71450
|
71451
|
71452
|
71453
|
71454
|
71455
|
71456
|
71457
|
71458
|
71459
|
71460
|
71461
|
71462
|
71463
|
71467
|
71564