Project

General

Profile

Bug #4983

Load, regression failures with PHP 5.1.1

Added by bford - almost 19 years ago. Updated over 17 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Álvaro Herrera
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
fixed

Description

PL/PHP 1.1 built with PostgreSQL 8.1.0 and PHP 5.1.1 has a couple of "Undefined symbol" errors at load time. Adding the following to plphp.c fixes the problem:

void *apr_pool_cleanup_run = NULL;
void *apr_snprintf = NULL;

The trigger and validator regression tests fail. The validator failures are due to variant output so I created expected/validator_1.out:

--
-- Test the validator
--
CREATE FUNCTION invalid() RETURNS void LANGUAGE plphp AS $$
        asdasd
$$;
ERROR:  function "invalid" does not validate: syntax error, unexpected '}' at line 3
CREATE FUNCTION invalid() RETURNS void LANGUAGE plphp AS $$
        {
$$;
ERROR:  function "invalid" does not validate: syntax error, unexpected $end at line 3
CREATE OR REPLACE FUNCTION valid() RETURNS void LANGUAGE plphp AS $$
        array_append();
$$;
select valid();
ERROR:  Call to undefined function array_append() at line 2
CREATE FUNCTION valid2() RETURNS void LANGUAGE plphp AS $$
        return array();
$$;
select valid2();
ERROR:  this plphp function cannot return arrays

I haven't looked into the trigger failures yet but here's an excerpt from regression.diffs:

  INSERT INTO numbers DEFAULT VALUES;
+ ERROR:  $_TD['new'] does not contain attribute "0" 
  SELECT * FROM numbers;
   0 | 1 | 2 | 3 
! ---+---+---+---
! (0 rows)

Michael Fuhr


Files

validator_1.out (650 Bytes) validator_1.out Variant expected output for validator tests bford -, 12/06/2005 11:46 AM

Also available in: Atom PDF