Bug #80592 [NEW]: all floats are the same in ODBC parameters

From: Date: Tue, 05 Jan 2021 13:44:53 +0000
Subject: Bug #80592 [NEW]: all floats are the same in ODBC parameters
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-231374@lists.php.net to get a copy of this message
From: a dot kasparas at gmc dot lt Operating system: Windows 10 Pro PHP version: 8.0.0 Package: ODBC related Bug Type: Bug Bug description:all floats are the same in ODBC parameters Description: ------------ Floats submitted over prepared statement parameters are all set to the same (last?) value. Test script: --------------- On SQL server create table for tests: CREATE TABLE float_test( F1 float not null, F2 float not null, F3 float not null ); Create ODBC connection FLOAT_TEST using available driver for SQL server; Then execute: $o = odbc_connect('FLOAT_TEST', 'user', 'pass'); $st_txt = 'INSERT INTO float_test (f1, f2, f3) values (?, ?, ?)'; odbc_exec($o, 'DELETE FROM float_test'); $st = odbc_prepare($o, $st_txt); odbc_execute($st, array(1.0, 2.0, 3.0)); $st2 = odbc_prepare($o, 'SELECT f1, f2, f3 from float_test'); odbc_execute($st2); echo json_encode(odbc_fetch_object($st2)); Expected result: ---------------- {"f1":"1.0","f2":"2.0","f3":"3.0"} Actual result: -------------- {"f1":"3.0","f2":"3.0","f3":"3.0"} -- Edit bug report at https://bugs.php.net/bug.php?id=80592&edit=1 -- Fix committed: https://bugs.php.net/fix.php?id=80592&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=80592&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=80592&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=80592&r=needscript Try newer version: https://bugs.php.net/fix.php?id=80592&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=80592&r=support Expected behavior: https://bugs.php.net/fix.php?id=80592&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=80592&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=80592&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=80592&r=globals PHP version support discontinued: https://bugs.php.net/fix.php?id=80592&r=phptooold Daylight Savings: https://bugs.php.net/fix.php?id=80592&r=dst IIS Stability: https://bugs.php.net/fix.php?id=80592&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=80592&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=80592&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=80592&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=80592&r=mysqlcfg

« previous php.bugs (#231374) next »