Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DBI::preparse() always copies ps_accept to ps_return #164

Open
rwfranks opened this issue Oct 28, 2024 · 0 comments
Open

DBI::preparse() always copies ps_accept to ps_return #164

rwfranks opened this issue Oct 28, 2024 · 0 comments

Comments

@rwfranks
Copy link

Transcribed verbatim from CPAN RT#130194, warts and all.

Fri Jul 26 09:35:25 2019 ppisar [...] redhat.com - Ticket created
Subject: DBI::preparse() always copies ps_accept to ps_return

preparse() contins this code:

if (!(ps_return | DBIpp_ph_XX)) { /* no return ph type specified */
    ps_return |= ps_accept | DBIpp_ph_XX;   /* so copy from ps_accept */
}

The condition looks weird as DBIpp_ph_XX constant is 0x000F00, thus the condition is always true. As a result ps_return always gets the bits copied and 0x000F00 set.

If that were a typo and one used if (!(ps_return & DBIpp_ph_XX)), t/60preparse.t test fails. If I simplify the code to:

    ps_return |= ps_accept;   /* so copy from ps_accept */

The test still passes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant