insert a big integer value from xml file

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

insert a big integer value from xml file

acec acec
Hi, all
I have a problem to load a big integer value from xml file.

I created a table as the following:
CREATE TABLE statistic (
    ...
    big_numeric_value BIGINT UNSIGNED,
    big_delta_value BIGINT UNSIGNED,
    ...
);

In my dbunit xml file, I have the following two lines:
<statistic ... big_numeric_value="7446744073709551630"  big_delta_value="1000000000000000005" ... />
<statistic ... big_numeric_value="17446744073709551630"  big_delta_value="10000000000000000000" ... />

When I load the testing data into database using the following codes:

ReplacementDataSet dataSet = new ReplacementDataSet(new FlatXmlDataSet(inputStream));
DatabaseOperation.CLEAN_INSERT.execute(conn, dataSet);

I got the following message:
Data truncation: Out of range value adjusted for column 'big_numeric_value' at row 1

I checked my database, the first line of dbunit xml file was loaded successfully. But the second line was not loaded, it seems the value is too big.

I can input that value by using Tora, but I can not load from dbunit.

Is there a way to load a big integer value from dbunit?

Thanks a lot.



      __________________________________________________________________
The new Internet Explorer® 8 - Faster, safer, easier.  Optimized for Yahoo!  Get it Now for Free! at http://downloads.yahoo.com/ca/internetexplorer/


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
dbunit-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/dbunit-user
Reply | Threaded
Open this post in threaded view
|

Re: insert a big integer value from xml file

Matthias Gommeringer
Hi there,

I tested this and was able to reproduce your problem on mysql. I already created a fix for it on my local box. Could you please created a bug report on the sourceforge tracker? Then I'll commit the fix and write a detailed report and workaround for this into the tracker.

thx,
matthias


> -----Ursprüngliche Nachricht-----
> Von: "acec acec" <[hidden email]>
> Gesendet: 09.09.09 16:37:00
> An: [hidden email]
> Betreff: [dbunit-user] insert a big integer value from xml file


> Hi, all
> I have a problem to load a big integer value from xml file.
>
> I created a table as the following:
> CREATE TABLE statistic (
>     ...
>     big_numeric_value BIGINT UNSIGNED,
>     big_delta_value BIGINT UNSIGNED,
>     ...
> );
>
> In my dbunit xml file, I have the following two lines:
> <statistic ... big_numeric_value="7446744073709551630"  big_delta_value="1000000000000000005" ... />
> <statistic ... big_numeric_value="17446744073709551630"  big_delta_value="10000000000000000000" ... />
>
> When I load the testing data into database using the following codes:
>
> ReplacementDataSet dataSet = new ReplacementDataSet(new FlatXmlDataSet(inputStream));
> DatabaseOperation.CLEAN_INSERT.execute(conn, dataSet);
>
> I got the following message:
> Data truncation: Out of range value adjusted for column 'big_numeric_value' at row 1
>
> I checked my database, the first line of dbunit xml file was loaded successfully. But the second line was not loaded, it seems the value is too big.
>
> I can input that value by using Tora, but I can not load from dbunit.
>
> Is there a way to load a big integer value from dbunit?
>
> Thanks a lot.
>
>
>
>       __________________________________________________________________
> The new Internet Explorer® 8 - Faster, safer, easier.  Optimized for Yahoo!  Get it Now for Free! at http://downloads.yahoo.com/ca/internetexplorer/
>
>
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
> trial. Simplify your report design, integration and deployment - and focus on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> _______________________________________________
> dbunit-user mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/dbunit-user
>


______________________________________________________
GRATIS für alle WEB.DE-Nutzer: Die maxdome Movie-FLAT!
Jetzt freischalten unter http://movieflat.web.de


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
dbunit-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/dbunit-user
Reply | Threaded
Open this post in threaded view
|

Re: insert a big integer value from xml file

Matthias Gommeringer
In reply to this post by acec acec
Hi Acec Acec,

I created a bug report for you and will write further information down there: https://sourceforge.net/tracker/?func=detail&aid=2858410&group_id=47439&atid=449491
The bug will be fixed with the next 2.4.6 release.

rgds,
matthias

> -----Ursprüngliche Nachricht-----
> Von: "acec acec" <[hidden email]>
> Gesendet: 09.09.09 16:37:00
> An: [hidden email]
> Betreff: [dbunit-user] insert a big integer value from xml file


> Hi, all
> I have a problem to load a big integer value from xml file.
>
> I created a table as the following:
> CREATE TABLE statistic (
>     ...
>     big_numeric_value BIGINT UNSIGNED,
>     big_delta_value BIGINT UNSIGNED,
>     ...
> );
>
> In my dbunit xml file, I have the following two lines:
> <statistic ... big_numeric_value="7446744073709551630"  big_delta_value="1000000000000000005" ... />
> <statistic ... big_numeric_value="17446744073709551630"  big_delta_value="10000000000000000000" ... />
>
> When I load the testing data into database using the following codes:
>
> ReplacementDataSet dataSet = new ReplacementDataSet(new FlatXmlDataSet(inputStream));
> DatabaseOperation.CLEAN_INSERT.execute(conn, dataSet);
>
> I got the following message:
> Data truncation: Out of range value adjusted for column 'big_numeric_value' at row 1
>
> I checked my database, the first line of dbunit xml file was loaded successfully. But the second line was not loaded, it seems the value is too big.
>
> I can input that value by using Tora, but I can not load from dbunit.
>
> Is there a way to load a big integer value from dbunit?
>
> Thanks a lot.
>
>
>
>       __________________________________________________________________
> The new Internet Explorer® 8 - Faster, safer, easier.  Optimized for Yahoo!  Get it Now for Free! at http://downloads.yahoo.com/ca/internetexplorer/
>
>
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
> trial. Simplify your report design, integration and deployment - and focus on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> _______________________________________________
> dbunit-user mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/dbunit-user
>


________________________________________________________________
Neu: WEB.DE Doppel-FLAT mit Internet-Flatrate + Telefon-Flatrate
für nur 19,99 Euro/mtl.!* http://produkte.web.de/go/02/


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
dbunit-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/dbunit-user