Skip to content

PHP 8.0 testcase failure #23

@ashnazg

Description

@ashnazg

Testcase tests/driver/16tableinfo.phpt encounters a failure when run on PHP 8.0, as seen below. The behavior differences appear to be in how the queried table characteristics are interpreted by DB. The paste below is the runtime output of the testcase... you can visually compare it to the --EXPECT-- section in the PHPT to see what's different.

As best I can tell, some flags are interpreted differently on 8.0 as compared to PHP7 and PHP5, e.g.
flags ... was 'not_null multiple_key group_by' but we expected 'not_null multiple_key'

while also some column characteristics show up differently, e.g.
type ... was 'varchar' but we expected 'string'

I thought at first that maybe the PHP 8.0 behavior should be different based on that test platform's database version (newer?) as compared to the PHP7 and PHP5 platforms, but I don't know that for sure.

@schengawegga , if you are able to research this testcase, see how it acts on your various PHP8 platforms. If you become convinced that the runtime behavior as seen below is correct, then I can adjust this testcase to only run itself against PHP7 and older... and create a sister testcase just for PHP8 and up, that is written to --EXPECT-- these flag and type differences.

RUNTIME OUTPUT FROM THE BUILD:

tests/driver/16tableinfo.out

==========================================

Passing result OBJECT to method in DB_<type>.

Output = default.

------------------------------------------

column 0:

DIDN'T match expected values...

~~~~~~~~

Expected:

table ... matched expected value

name => a

type ... matched expected value

len ... matched expected value

flags ... matched expected value

~~~~

Actual:

table ... matched expected value

name => a

type ... matched expected value

len ... matched expected value

flags ... was 'not_null multiple_key group_by' but we expected 'not_null multiple_key'

~~~~~~~~

column 9:

DIDN'T match expected values...

~~~~~~~~

Expected:

table ... matched expected value

name => d

type ... matched expected value

len ... matched expected value

flags ... matched expected value

~~~~

Actual:

table ... matched expected value

name => d

type ... was 'varchar' but we expected 'string'

len ... matched expected value

flags ... matched expected value

~~~~~~~~

==========================================

Passing result ID to method in DB_<type>.

Output = DB_TABLEINFO_ORDER.

------------------------------------------

column 0:

DIDN'T match expected values...

~~~~~~~~

Expected:

table ... matched expected value

name => a

type ... matched expected value

len ... matched expected value

flags ... matched expected value

~~~~

Actual:

table ... matched expected value

name => a

type ... matched expected value

len ... matched expected value

flags ... was 'not_null multiple_key group_by' but we expected 'not_null multiple_key'

~~~~~~~~

column 3:

DIDN'T match expected values...

~~~~~~~~

Expected:

table ... matched expected value

name => d

type ... matched expected value

len ... matched expected value

flags ... matched expected value

~~~~

Actual:

table ... matched expected value

name => d

type ... matched expected value

len ... matched expected value

flags ... was 'not_null multiple_key' but we expected 'not_null multiple_key binary'

~~~~~~~~

num_fields: matched expected result

order:

matched expected result

==========================================

Passing DB_TABLEINFO_ORDERTABLE to method in DB_result.

Output = DB_TABLEINFO_ORDERTABLE.

------------------------------------------

column 0:

DIDN'T match expected values...

~~~~~~~~

Expected:

table ... matched expected value

name => a

type ... matched expected value

len ... matched expected value

flags ... matched expected value

~~~~

Actual:

table ... matched expected value

name => a

type ... matched expected value

len ... matched expected value

flags ... was 'not_null multiple_key group_by' but we expected 'not_null multiple_key'

~~~~~~~~

column 3:

DIDN'T match expected values...

~~~~~~~~

Expected:

table ... matched expected value

name => d

type ... matched expected value

len ... matched expected value

flags ... matched expected value

~~~~

Actual:

table ... matched expected value

name => d

type ... matched expected value

len ... matched expected value

flags ... was 'not_null multiple_key' but we expected 'not_null multiple_key binary'

~~~~~~~~

num_fields: matched expected result

ordertable[phptest]: matched expected result

ordertable[phptest_fk]: matched expected result

==========================================

Passing TABLE NAME 'phptest_fk' to method in DB_<driver>.

Output = default.

------------------------------------------

column 0:

DIDN'T match expected values...

~~~~~~~~

Expected:

table ... matched expected value

name => a

type ... matched expected value

len ... matched expected value

flags ... matched expected value

~~~~

Actual:

table ... matched expected value

name => a

type ... matched expected value

len ... matched expected value

flags ... was 'not_null multiple_key group_by' but we expected 'not_null multiple_key'

~~~~~~~~

column 1:

DIDN'T match expected values...

~~~~~~~~

Expected:

table ... matched expected value

name => fk

type ... matched expected value

len ... matched expected value

flags ... matched expected value

~~~~

Actual:

table ... matched expected value

name => fk

type ... matched expected value

len ... matched expected value

flags ... was 'not_null primary_key group_by' but we expected 'not_null primary_key'

~~~~~~~~

column 2:

matched expected result

column 3:

DIDN'T match expected values...

~~~~~~~~

Expected:

table ... matched expected value

name => d

type ... matched expected value

len ... matched expected value

flags ... matched expected value

~~~~

Actual:

table ... matched expected value

name => d

type ... matched expected value

len ... matched expected value

flags ... was 'not_null multiple_key' but we expected 'not_null multiple_key binary'

~~~~~~~~

column 4:

DIDN'T match expected values...

~~~~~~~~

Expected:

table ... matched expected value

name => e

type ... matched expected value

len ... matched expected value

flags ... matched expected value

~~~~

Actual:

table ... matched expected value

name => e

type ... was 'char' but we expected 'string'

len ... matched expected value

flags ... matched expected value

~~~~~~~~

column 5:

DIDN'T match expected values...

~~~~~~~~

Expected:

table ... matched expected value

name => f

type ... matched expected value

len ... matched expected value

flags ... matched expected value

~~~~

Actual:

table ... matched expected value

name => f

type ... was 'decimal' but we expected 'real'

len ... matched expected value

flags ... matched expected value

~~~~~~~~

==========================================

Passing TABLE NAME 'phptest_fk' to method in DB_<driver>.

Output = DB_TABLEINFO_FULL.

------------------------------------------

column 0:

DIDN'T match expected values...

~~~~~~~~

Expected:

table ... matched expected value

name => a

type ... matched expected value

len ... matched expected value

flags ... matched expected value

~~~~

Actual:

table ... matched expected value

name => a

type ... matched expected value

len ... matched expected value

flags ... was 'not_null multiple_key group_by' but we expected 'not_null multiple_key'

~~~~~~~~

order:

matched expected result

ordertable[phptest_fk]:

matched expected result

==========================================

Passing TABLE NAME 'phptest_fk' to method in DB_<driver> AGAIN.

Output = DB_TABLEINFO_FULL, lowercasing turned off.

------------------------------------------

column 0:

DIDN'T match expected values...

~~~~~~~~

Expected:

table ... matched expected value

name => a

type ... matched expected value

len ... matched expected value

flags ... matched expected value

~~~~

Actual:

table ... matched expected value

name => a

type ... matched expected value

len ... matched expected value

flags ... was 'not_null multiple_key group_by' but we expected 'not_null multiple_key'

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions