php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #65384 pg_last_notice test failures
Submitted: 2013-08-03 15:04 UTC Modified: 2013-08-20 05:28 UTC
From: nikic@php.net Assigned: yohgaki (profile)
Status: Closed Package: PostgreSQL related
PHP Version: 5.5.2RC1 OS:
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: nikic@php.net
New email:
PHP Version: OS:

 

 [2013-08-03 15:04 UTC] nikic@php.net
Description:
------------
The following pg_last_notice related tests currently fail on Travis CI:

PostgreSQL notice function [ext/pgsql/tests/09notice.phpt]
Bug #32223 (weird behaviour of pg_last_notice) [ext/pgsql/tests/80_bug32223.phpt]
Bug #32223 (weird behaviour of pg_last_notice using define) [ext/pgsql/tests/80_bug32223b.phpt]

The diffs are:

09notice.phpt:

001+ Cannot find notice message in hash
002+ bool(false)
003+ 
001- Notice: pg_query(): %s already a transaction in progress in %s on line %d
002- %s already a transaction in progress

80_bug32223.phpt:

005+ bool(false)
005- string(14) "NOTICE:  11111"

80_bug32223b.phpt:

005+ bool(false)
005- string(14) "NOTICE:  11111"


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2013-08-05 01:18 UTC] yohgaki@php.net
I cannot reproduce on my Fedora19 and PHP 5.5 branch

[yohgaki@dev PHP-5.5]$ rpm -q postgresql
postgresql-9.2.4-1.fc19.x86_64

Anyone know what the PostgreSQL version on Travis CI?
 [2013-08-05 01:19 UTC] yohgaki@php.net
-Assigned To: +Assigned To: yohgaki
 [2013-08-09 20:35 UTC] mike@php.net
Could it just be that they configured client_min_messages=WARNING?
 [2013-08-18 07:43 UTC] yohgaki@php.net
> Could it just be that they configured client_min_messages=WARNING?

Users can set it as SQL command.

SET client_min_messages TO WARNING;

It may be the reason why this test fails. I'll try to change message level to 
NOTICE to see if it helps. I'm not sure how NOTIFY command is handled by 
PostgreSQL, so it might not be related, though.

There is request that stores all notice during session. I'll work on this 
request later. If pgsql module keep all of them, it may consume all available 
memory. Therefore, configuration for max number of notices recorded will be 
added. It may help to find out what is going on.
 [2013-08-20 05:27 UTC] yohgaki@php.net
-Status: Assigned +Status: Closed
 [2013-08-20 05:27 UTC] yohgaki@php.net
It was error logging setting.
Setting error logging message solved issue.

I've only committed the fix. Should I commit the fix to 5.4/5.5?
 [2013-08-20 05:28 UTC] yohgaki@php.net
> Setting error logging message solved issue.

Setting error logging level solved issue.
 [2013-08-20 08:49 UTC] nikic@php.net
For anyone interested, the relevant commits are:
 * https://github.com/php/php-src/commit/e960eebfea1fccbb4a2f030949249d4d1d198728
 * https://github.com/php/php-src/commit/7d538cf8dd41a2584c56ec4abfafd738f0fa1e31

> I've only committed the fix. Should I commit the fix to 5.4/5.5?

I don't know about 5.4, but this should definitely go into 5.5 as we're also testing that on Travis ;)

The 09notice.phpt test is still failing:

TEST 5533/12097 [ext/pgsql/tests/09notice.phpt]
========DIFF========
001+ Cannot find notice message in hash
002+ bool(false)
003+ 
001- Notice: pg_query(): %s already a transaction in progress in %s on line %d
002- %s already a transaction in progress
========DONE========

That's also the last failing test on Travis, so once that's fixed we'll *finally* have a working build there :)

Thanks for working on this!
 [2013-08-22 12:10 UTC] nikic@php.net
I fixed the 09notice test and applied the changes to PHP 5.5

The Travis build now passes on master (and presumably also 5.5).
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 23 07:01:29 2024 UTC