[
https://issues.apache.org/jira/browse/IGNITE-7362?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Igor Sapego updated IGNITE-7362:
--------------------------------
Description:
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:php}
<?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 = 'CREATE TABLE IF NOT EXISTS test_md5 (id int PRIMARY
KEY, userkey
LONGVARCHAR, server LONGVARCHAR, tsession LONGVARCHAR, tpost LONGVARCHAR,
tget LONGVARCHAR, adddate int) WITH
"atomicity=transactional,cachegroup=somegroup"';
$ignite->exec($sql);
for($i=0; $i <= 10; $i++){
$dbs = $ignite->prepare("INSERT INTO test_md5 (id,
userkey, server,
tsession, tpost, tget, adddate) VALUES ($i, 'Lorem ipsum dolor sit amet,
consectetur adipiscing elit, sed do elit, sed', 'b', 'c', 'd', 'e', 1)");
$dbs->execute();
}
} catch (PDOException $e) {
print "Error!: " . $e->getMessage() . "\n";
die();
}
?>
{code}
was:
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}
<?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 = 'CREATE TABLE IF NOT EXISTS test_md5 (id int PRIMARY
KEY, userkey
LONGVARCHAR, server LONGVARCHAR, tsession LONGVARCHAR, tpost LONGVARCHAR,
tget LONGVARCHAR, adddate int) WITH
"atomicity=transactional,cachegroup=somegroup"';
$ignite->exec($sql);
for($i=0; $i <= 10; $i++){
$dbs = $ignite->prepare("INSERT INTO test_md5 (id,
userkey, server,
tsession, tpost, tget, adddate) VALUES ($i, 'Lorem ipsum dolor sit amet,
consectetur adipiscing elit, sed do elit, sed', 'b', 'c', 'd', 'e', 1)");
$dbs->execute();
}
} catch (PDOException $e) {
print "Error!: " . $e->getMessage() . "\n";
die();
}
?>
{code}
> 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
> 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:php}
> <?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 = 'CREATE TABLE IF NOT EXISTS test_md5 (id int PRIMARY
> KEY, userkey
> LONGVARCHAR, server LONGVARCHAR, tsession LONGVARCHAR, tpost LONGVARCHAR,
> tget LONGVARCHAR, adddate int) WITH
> "atomicity=transactional,cachegroup=somegroup"';
> $ignite->exec($sql);
> for($i=0; $i <= 10; $i++){
> $dbs = $ignite->prepare("INSERT INTO test_md5 (id,
> userkey, server,
> tsession, tpost, tget, adddate) VALUES ($i, 'Lorem ipsum dolor sit amet,
> consectetur adipiscing elit, sed do elit, sed', 'b', 'c', 'd', 'e', 1)");
> $dbs->execute();
> }
> } catch (PDOException $e) {
> print "Error!: " . $e->getMessage() . "\n";
> die();
> }
> ?>
> {code}
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)