[ https://issues.apache.org/jira/browse/IGNITE-9897?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16673120#comment-16673120 ]
Igor Sapego commented on IGNITE-9897: ------------------------------------- Ok, it seems that root cause is the same as in IGNITE-7362 - PDO sets {{SQL_ATTR_ODBC_CURSORS}} connection attribute to {{SQL_CUR_USE_IF_NEEDED}}, except that unixODBC decides to use cursor library if the {{SQL_CA1_ABSOLUTE}} flag of {{SQL_STATIC_CURSOR_ATTRIBUTES1}} attribute is not set. So, the current fix is to add {{SQL_CA1_ABSOLUTE}} flag for {{SQL_STATIC_CURSOR_ATTRIBUTES1}} driver info. > Quering with PDO returns null for all column values except the 1st one > ---------------------------------------------------------------------- > > Key: IGNITE-9897 > URL: https://issues.apache.org/jira/browse/IGNITE-9897 > Project: Ignite > Issue Type: Bug > Components: odbc > Affects Versions: 2.6 > Environment: CentOS > Reporter: Roman Shtykh > Assignee: Igor Sapego > Priority: Major > Attachments: odbc.log, phpPDO2.out, phpPdo.out, unixOdbc.log > > > Using _odbc_connect_ returns all column values, but with _PDO_ only the 1st > one – all the rest are null. > Reproduced on CentOS. > # Start a server node with Ignite CPP > # Run odbc-example (which will create two tables) > # Run a simple PHP script > {code:php} > <?php > try { > echo PHP_EOL,PHP_EOL,"# Using PDO",PHP_EOL; > $dbh = new PDO('odbc:ApacheIgnite'); > $dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); > $sql = 'SELECT * FROM "Person".Person'; > $data = $dbh->query($sql); > foreach($data as $row) { > var_export($row); > } > echo PHP_EOL,PHP_EOL,"# Using odbc_*( ) Functions",PHP_EOL; > > $conn = odbc_connect('ApacheIgnite','',''); > $rs = odbc_exec($conn, $sql); > > while($row = odbc_fetch_array($rs)) { > var_export($row); > } > > } catch (PDOException $e) { > print "Error!: " . $e->getMessage() . "\n"; > die(); > } > ?> > {code} > -- This message was sent by Atlassian JIRA (v7.6.3#76005)