You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by Igor Sapego <is...@apache.org> on 2018/02/01 10:26:49 UTC

Re: Apache Ignite & unixODBC and truncating text

I'm currently working on the fix.
Sorry guys, I was not able to fit it in 2.4.
I can share a separate patch when it will be ready though if you like.

Best Regards,
Igor

On Tue, Jan 30, 2018 at 5:45 AM, Rick Alexander <im...@gmail.com>
wrote:

> Hey Igor or anyone who knows,
>
> Looking to see when this will be released as well.
>
> You mention 2.4 but the task says 2.5 release.
>
> Please help! My project is at a stand-still...
>
> On Mon, Jan 15, 2018 at 9:33 AM, bagsiur <ra...@gmail.com>
> wrote:
>
>> ok,
>>
>> I ask becouse I wont to be sure. Fix will be included in Ignite 2.4 or
>> 2.5?
>>
>> On the ticket: https://issues.apache.org/jira/browse/IGNITE-7362 in
>> details
>> is write that fix this bug is planning for 2.5 version...
>>
>>
>>
>> --
>> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>>
>
>

Re: Apache Ignite & unixODBC and truncating text

Posted by Igor Sapego <is...@apache.org>.
Ok, can you enable ODBC logging [1] and share a logfile
for this scenario?

[1] - https://www.easysoft.com/support/kb/kb00946.html

Best Regards,
Igor

On Thu, Mar 1, 2018 at 9:01 AM, bagsiur <ra...@gmail.com>
wrote:

> Yes,
>
> Here is my libignite-odvc.so. Command "ldd /usr/local/lib/libignite-odbc.
> so"
> show:
>
>         linux-vdso.so.1 (0x00007fff18aad000)
>         libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2
> (0x00007f96a60f7000)
>         libignite-binary-2.5.0.26265.so.0 => not found
>         libodbcinst.so.2 => /usr/lib/x86_64-linux-gnu/libodbcinst.so.2
> (0x00007f96a5ee5000)
>         libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6
> (0x00007f96a5bda000)
>         libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f96a58d9000)
>         libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f96a552e000)
>         libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1
> (0x00007f96a5318000)
>         /lib64/ld-linux-x86-64.so.2 (0x00007f96a6592000)
>         libltdl.so.7 => /usr/lib/x86_64-linux-gnu/libltdl.so.7
> (0x00007f96a510e000)
>         libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0
> (0x00007f96a4ef1000)
>
>
>
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>

Re: Apache Ignite & unixODBC and truncating text

Posted by bagsiur <ra...@gmail.com>.
Yes,

Here is my libignite-odvc.so. Command "ldd /usr/local/lib/libignite-odbc.so"
show:

        linux-vdso.so.1 (0x00007fff18aad000)
        libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f96a60f7000)
        libignite-binary-2.5.0.26265.so.0 => not found
        libodbcinst.so.2 => /usr/lib/x86_64-linux-gnu/libodbcinst.so.2
(0x00007f96a5ee5000)
        libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6
(0x00007f96a5bda000)
        libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f96a58d9000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f96a552e000)
        libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1
(0x00007f96a5318000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f96a6592000)
        libltdl.so.7 => /usr/lib/x86_64-linux-gnu/libltdl.so.7
(0x00007f96a510e000)
        libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0
(0x00007f96a4ef1000)






--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/

Re: Apache Ignite & unixODBC and truncating text

Posted by Igor Sapego <is...@apache.org>.
The results for me for the code you provided:

array(14) {
  ["ID"]=>
  string(1) "0"
  [0]=>
  string(1) "0"
  ["USERKEY"]=>
  string(73) "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed
do elit, sed"
  [1]=>
  string(73) "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed
do elit, sed"
  ["SERVER"]=>
  string(1) "b"
  [2]=>
  string(1) "b"
  ["TSESSION"]=>
  string(1) "c"
  [3]=>
  string(1) "c"
  ["TPOST"]=>
  string(1) "d"
  [4]=>
  string(1) "d"
  ["TGET"]=>
  string(1) "e"
  [5]=>
  string(1) "e"
  ["ADDDATE"]=>
  string(1) "1"
  [6]=>
  string(1) "1"
}

Are you sure you are using new driver?


Best Regards,
Igor

On Wed, Feb 28, 2018 at 6:08 PM, bagsiur <ra...@gmail.com>
wrote:

> I'm try to execute fallowing 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();
>         }
>
> ?>
>
> String length is 73 characters...
>
> After when I try to read data from Ignite by similar code:
>
> $stmt = $ignite->prepare("select * from test_md5");
> $endTime = microtime(true);
>
> $stmt->execute();
> $rows = $stmt->fetchAll();
>
> foreach($rows as $item){
>         echo var_dump($item);
>         die();
> }
>
> I have fallowing results:
>
> array(14) { ["ID"]=> string(1) "0" [0]=> string(1) "0" ["USERKEY"]=> NULL
> [1]=> NULL ["SERVER"]=> string(1) "b" [2]=> string(1) "b" ["TSESSION"]=>
> string(1) "c" [3]=> string(1) "c" ["TPOST"]=> string(1) "d" [4]=> string(1)
> "d" ["TGET"]=> string(1) "e" [5]=> string(1) "e" ["ADDDATE"]=> string(1)
> "1"
> [6]=> string(1) "1" }
>
>
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>

Re: Apache Ignite & unixODBC and truncating text

Posted by bagsiur <ra...@gmail.com>.
I'm try to execute fallowing 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();
        }
       
?> 

String length is 73 characters...

After when I try to read data from Ignite by similar code:

$stmt = $ignite->prepare("select * from test_md5");
$endTime = microtime(true);

$stmt->execute();
$rows = $stmt->fetchAll();

foreach($rows as $item){
	echo var_dump($item);
	die();
}

I have fallowing results:

array(14) { ["ID"]=> string(1) "0" [0]=> string(1) "0" ["USERKEY"]=> NULL
[1]=> NULL ["SERVER"]=> string(1) "b" [2]=> string(1) "b" ["TSESSION"]=>
string(1) "c" [3]=> string(1) "c" ["TPOST"]=> string(1) "d" [4]=> string(1)
"d" ["TGET"]=> string(1) "e" [5]=> string(1) "e" ["ADDDATE"]=> string(1) "1"
[6]=> string(1) "1" } 





--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/

Re: Apache Ignite & unixODBC and truncating text

Posted by Igor Sapego <is...@apache.org>.
Hello,

How long is the value you are trying to put/fetch?
Do you get any kind of error, or just NULL value?

Best Regards,
Igor

On Wed, Feb 28, 2018 at 5:54 PM, bagsiur <ra...@gmail.com>
wrote:

> Hello,
>
> So, I was testing today fix of this bug and well... I have similar error.
> Different is that before I had truncated string and now I have NULL when I
> try to add more longer string.
>
> My Ignite version is: Ignite ver.
> 2.5.0-SNAPSHOT#20180228-sha1:6641267df826e74213c9921e1d0c3490f09aae45
>
> When I added string I have fallowing console logs:
>
> [28-02-2018 14:39:07][INFO ][exchange-worker-#38][time] Started exchange
> init [topVer=AffinityTopologyVersion [topVer=2, minorTopVer=1], crd=true,
> evt=DISCOVERY_CUSTOM_EVT, evtNode=231c449b-2e6b-44c5-b434-0d7f02f1afb8,
> customEvt=DynamicCacheChangeBatch
> [id=41fc8dcd161-63ea434c-0891-4184-8a24-4f36a03c845e,
> reqs=[DynamicCacheChangeRequest [cacheName=SQL_PUBLIC_TEST_MD5,
> hasCfg=true,
> nodeId=231c449b-2e6b-44c5-b434-0d7f02f1afb8, clientStartOnly=false,
> stop=false, destroy=false, disabledAfterStartfalse]],
> exchangeActions=ExchangeActions [startCaches=[SQL_PUBLIC_TEST_MD5],
> stopCaches=null, startGrps=[somegroup], stopGrps=[], resetParts=null,
> stateChangeRequest=null], startCaches=false], allowMerge=false]
> [28-02-2018 14:39:07][INFO ][exchange-worker-#38][GridCacheProcessor]
> Started cache [name=SQL_PUBLIC_TEST_MD5, id=-1243404074, group=somegroup,
> memoryPolicyName=Default_Region, mode=PARTITIONED,
> atomicity=TRANSACTIONAL,
> backups=0]
> [28-02-2018 14:39:07][INFO
> ][exchange-worker-#38][GridDhtPartitionsExchangeFuture] Finished waiting
> for
> partition release future [topVer=AffinityTopologyVersion [topVer=2,
> minorTopVer=1], waitTime=0ms, futInfo=NA]
> [28-02-2018 14:39:07][INFO
> ][exchange-worker-#38][GridDhtPartitionsExchangeFuture]
> finishExchangeOnCoordinator [topVer=AffinityTopologyVersion [topVer=2,
> minorTopVer=1], resVer=AffinityTopologyVersion [topVer=2, minorTopVer=1]]
> [28-02-2018 14:39:07][INFO
> ][exchange-worker-#38][GridDhtPartitionsExchangeFuture] Finish exchange
> future [startVer=AffinityTopologyVersion [topVer=2, minorTopVer=1],
> resVer=AffinityTopologyVersion [topVer=2, minorTopVer=1], err=null]
> [28-02-2018 14:39:07][INFO ][exchange-worker-#38][time] Finished exchange
> init [topVer=AffinityTopologyVersion [topVer=2, minorTopVer=1], crd=true]
> [28-02-2018 14:39:07][INFO
> ][exchange-worker-#38][GridCachePartitionExchangeManager] Skipping
> rebalancing (nothing scheduled) [top=AffinityTopologyVersion [topVer=2,
> minorTopVer=1], evt=DISCOVERY_CUSTOM_EVT,
> node=231c449b-2e6b-44c5-b434-0d7f02f1afb8]
>
> PHP code who I use is exactly the same like above. Before I start testing I
> was compile Ignite and ODBC driver one more time to be sure that everything
> is in newest version. What is wrong?
>
> Please help me.
>
>
>
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>

Re: Apache Ignite & unixODBC and truncating text

Posted by bagsiur <ra...@gmail.com>.
Hello,

So, I was testing today fix of this bug and well... I have similar error.
Different is that before I had truncated string and now I have NULL when I
try to add more longer string.

My Ignite version is: Ignite ver.
2.5.0-SNAPSHOT#20180228-sha1:6641267df826e74213c9921e1d0c3490f09aae45

When I added string I have fallowing console logs:

[28-02-2018 14:39:07][INFO ][exchange-worker-#38][time] Started exchange
init [topVer=AffinityTopologyVersion [topVer=2, minorTopVer=1], crd=true,
evt=DISCOVERY_CUSTOM_EVT, evtNode=231c449b-2e6b-44c5-b434-0d7f02f1afb8,
customEvt=DynamicCacheChangeBatch
[id=41fc8dcd161-63ea434c-0891-4184-8a24-4f36a03c845e,
reqs=[DynamicCacheChangeRequest [cacheName=SQL_PUBLIC_TEST_MD5, hasCfg=true,
nodeId=231c449b-2e6b-44c5-b434-0d7f02f1afb8, clientStartOnly=false,
stop=false, destroy=false, disabledAfterStartfalse]],
exchangeActions=ExchangeActions [startCaches=[SQL_PUBLIC_TEST_MD5],
stopCaches=null, startGrps=[somegroup], stopGrps=[], resetParts=null,
stateChangeRequest=null], startCaches=false], allowMerge=false]
[28-02-2018 14:39:07][INFO ][exchange-worker-#38][GridCacheProcessor]
Started cache [name=SQL_PUBLIC_TEST_MD5, id=-1243404074, group=somegroup,
memoryPolicyName=Default_Region, mode=PARTITIONED, atomicity=TRANSACTIONAL,
backups=0]
[28-02-2018 14:39:07][INFO
][exchange-worker-#38][GridDhtPartitionsExchangeFuture] Finished waiting for
partition release future [topVer=AffinityTopologyVersion [topVer=2,
minorTopVer=1], waitTime=0ms, futInfo=NA]
[28-02-2018 14:39:07][INFO
][exchange-worker-#38][GridDhtPartitionsExchangeFuture]
finishExchangeOnCoordinator [topVer=AffinityTopologyVersion [topVer=2,
minorTopVer=1], resVer=AffinityTopologyVersion [topVer=2, minorTopVer=1]]
[28-02-2018 14:39:07][INFO
][exchange-worker-#38][GridDhtPartitionsExchangeFuture] Finish exchange
future [startVer=AffinityTopologyVersion [topVer=2, minorTopVer=1],
resVer=AffinityTopologyVersion [topVer=2, minorTopVer=1], err=null]
[28-02-2018 14:39:07][INFO ][exchange-worker-#38][time] Finished exchange
init [topVer=AffinityTopologyVersion [topVer=2, minorTopVer=1], crd=true]
[28-02-2018 14:39:07][INFO
][exchange-worker-#38][GridCachePartitionExchangeManager] Skipping
rebalancing (nothing scheduled) [top=AffinityTopologyVersion [topVer=2,
minorTopVer=1], evt=DISCOVERY_CUSTOM_EVT,
node=231c449b-2e6b-44c5-b434-0d7f02f1afb8]

PHP code who I use is exactly the same like above. Before I start testing I
was compile Ignite and ODBC driver one more time to be sure that everything
is in newest version. What is wrong?

Please help me.






--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/

Re: Apache Ignite & unixODBC and truncating text

Posted by Igor Sapego <is...@apache.org>.
The issue is fixed and the fix is already in master.


Best Regards,
Igor

On Thu, Feb 1, 2018 at 1:26 PM, Igor Sapego <is...@apache.org> wrote:

> I'm currently working on the fix.
> Sorry guys, I was not able to fit it in 2.4.
> I can share a separate patch when it will be ready though if you like.
>
> Best Regards,
> Igor
>
> On Tue, Jan 30, 2018 at 5:45 AM, Rick Alexander <im...@gmail.com>
> wrote:
>
>> Hey Igor or anyone who knows,
>>
>> Looking to see when this will be released as well.
>>
>> You mention 2.4 but the task says 2.5 release.
>>
>> Please help! My project is at a stand-still...
>>
>> On Mon, Jan 15, 2018 at 9:33 AM, bagsiur <ra...@gmail.com>
>> wrote:
>>
>>> ok,
>>>
>>> I ask becouse I wont to be sure. Fix will be included in Ignite 2.4 or
>>> 2.5?
>>>
>>> On the ticket: https://issues.apache.org/jira/browse/IGNITE-7362 in
>>> details
>>> is write that fix this bug is planning for 2.5 version...
>>>
>>>
>>>
>>> --
>>> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>>>
>>
>>
>