[
https://issues.apache.org/jira/browse/IGNITE-7362?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16371478#comment-16371478
]
ASF GitHub Bot commented on IGNITE-7362:
----------------------------------------
GitHub user isapego opened a pull request:
https://github.com/apache/ignite/pull/3552
IGNITE-7362: Fixed PDO issue when working with ODBC
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/gridgain/apache-ignite ignite-7362
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/ignite/pull/3552.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #3552
----
commit 37a23e76ebe45933e149d0399d5831c6bf133f02
Author: Igor Sapego <isapego@...>
Date: 2018-01-30T17:26:34Z
IGNITE-7362: Added deprecated driver info support
commit 345c3f9f84dc646e1dbf8338c78416201c48cf4d
Author: Igor Sapego <isapego@...>
Date: 2018-02-07T14:06:01Z
IGNITE-7362: Adjusted buffers writing
commit 04ecaf6978ca75fa6d2ec9214209fc8c3505dbad
Author: Igor Sapego <isapego@...>
Date: 2018-02-12T15:29:28Z
IGNITE-7362: Re-worked columns fetching
commit 6f1c9d2e344005d21160bc2541c15ae66e87e3bc
Author: Igor Sapego <isapego@...>
Date: 2018-02-13T10:10:42Z
IGNITE-7362: Fixes
commit 1333927954d39dcbbaa5ceb1c1a8d4da806a6d69
Author: Igor Sapego <isapego@...>
Date: 2018-02-21T13:43:56Z
IGNITE-7362: Fixed errors.
----
> ODBC: Third party libraries truncate any inserted varlen data to ColumnSize
> ---------------------------------------------------------------------------
>
> Key: IGNITE-7362
> URL: https://issues.apache.org/jira/browse/IGNITE-7362
> Project: Ignite
> Issue Type: Bug
> Components: odbc
> Affects Versions: 2.3
> Reporter: Igor Sapego
> Assignee: Igor Sapego
> Priority: Major
> Fix For: 2.5
>
>
> Third-party frameworks and ODBC bindings for different languages use metadata
> requests results for columns (such as {{SQL_COLUMN_PRECISION}}) to truncate
> varlen data, inserted by the user, which is only 64 by default.
> {code:java}
> <?php
> ini_set("display_errors", 1);
> error_reporting(E_ALL);
> try {
> $ignite = new PDO('odbc:Apache Ignite');
> $ignite->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
> $sql = 'DROP TABLE IF EXISTS test';
> $ignite->exec($sql);
> $sql = 'CREATE TABLE IF NOT EXISTS test (id int PRIMARY KEY, userkey
> VARCHAR(1000))';
> $ignite->exec($sql);
> $id = 1;
> $varval = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed
> do elit, sed';
> $dbs = $ignite->prepare("INSERT INTO test (id, userkey) VALUES ($id,
> '$varval')");
> $dbs->execute();
> $dbs = $ignite->prepare("SELECT userkey from test where id=$id");
> $dbs->execute();
> $res = $dbs->fetchColumn();
> assert($varval == $res);
> } catch (PDOException $e) {
> print "Error!: " . $e->getMessage() . "\n";
> die();
> }
> ?>
> {code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)