dbfit.MySqlTest: BIGINT UNSIGNED is not supported

59 views
Skip to first unread message

Eoin O'Hehir

unread,
Jul 10, 2015, 10:13:24 AM7/10/15
to db...@googlegroups.com
Hi,

I am trying to validate that a resultset returned from a MySQL stored procedure contains the data I expect.

I am having issues because one of the columns in the result set is defined as a BIGING(20) UNSIGNED and causes a "Type BIGINT UNSIGNED is not supported" exception.

I cannot change the datatype in the stored procedure as this would break functionality.

Can anyone advise if there is a way around this ?

Thanks,

Eoin.


Versions:
    DbFit: 3.10
    Hosted on Ubuntu 15.04
    MySQL: 5.6.19

Sample stored procedure:
  
DELIMITER $$
    DROP PROCEDURE IF EXISTS  sp_eoh_test $$
    CREATE PROCEDURE sp_eoh_test
()
   
BEGIN
        declare l_customers_id bigint
(20) UNSIGNED;

       
set l_customers_id = 100;

       
select l_customers_id as Resultset1;
   
END$$
    DELIMITER
;



DbFit test:
   
!path lib/*.jar

!|dbfit.MySqlTest|
!|ConnectUsingFile|squirrelDEV.con|

!| Query|call sp_eoh_test()|
|Resultset1|
|100|



Exception returned:
   
 java.lang.UnsupportedOperationException: Type BIGINT UNSIGNED is not supported
        at dbfit
.environment.MySqlEnvironment.getJavaClass(MySqlEnvironment.java:165)
        at dbfit
.fixture.Query.getJavaClassForColumn(Query.java:69)
        at dbfit
.fixture.RowSetFixture.bind(RowSetFixture.java:79)
        at fit
.ColumnFixture.doRows(ColumnFixture.java:17)
        at dbfit
.fixture.RowSetFixture.doRows(RowSetFixture.java:93)
        at fit
.Fixture.doTable(Fixture.java:155)
        at fitlibrary
.traverse.AlienTraverseHandler.doTable(AlienTraverseHandler.java:18)
        at fitlibrary
.traverse.workflow.DoTraverseInterpreter.interpretWholeTable(DoTraverseInterpreter.java:99)
        at fitlibrary
.traverse.workflow.DoTraverseInterpreter.interpretWholeTable(DoTraverseInterpreter.java:87)
        at fitlibrary
.DoFixture.interpretWholeTable(DoFixture.java:69)
        at fitlibrary
.suite.InFlowPageRunner.run(InFlowPageRunner.java:34)
        at fitlibrary
.DoFixture.interpretTables(DoFixture.java:42)
        at dbfit
.DatabaseTest.interpretTables(DatabaseTest.java:26)
        at fit
.Fixture.doTables(Fixture.java:80)
        at fit
.FitServer.process(FitServer.java:81)
        at fit
.FitServer.run(FitServer.java:56)
        at fit
.FitServer.main(FitServer.java:41)


Mark Matten

unread,
Jul 11, 2015, 12:14:38 PM7/11/15
to db...@googlegroups.com
I guess this needs an update to the DbFit code to handle it properly.

In the short term can you wrap the proc call in another query in you Query and cast the data type to BIGINT or similar or must it really be a unsigned, presumably 64 bit, number?

Eoin O'Hehir

unread,
Jul 13, 2015, 10:29:08 AM7/13/15
to db...@googlegroups.com
Hi Mark,

Thanks for getting back to me.

I'll see if I can wrap the stored proc call in something and cast the offending column to a BIGINT. I'm assuming this is something I need to do through SQL or should I be using some DbFIT/Fitnesse fixture ?

FYI the BIGINT UNSIGNED is the underlying datatype for SERIAL (MySQL implementation of auto-increment).

Thanks,

Eoin.

Mark Matten

unread,
Jul 13, 2015, 11:02:18 AM7/13/15
to db...@googlegroups.com
Hi Eoin,

I meant to cast using a SQL query, wrapping the procedure call, using the DbFit 'Query' fixture.

A code fix for this issue has already been started (https://github.com/dbfit/dbfit/pull/395) though so this would just be a temporary measure.

Mark

Eoin O'Hehir

unread,
Jul 15, 2015, 6:13:16 AM7/15/15
to db...@googlegroups.com
Thanks Mark, Yavor and anyone else involved for working on a permanent fix. I'll keep an eye out for the next release.

Cheers,

Eoin.

Eoin O'Hehir

unread,
Aug 21, 2015, 7:42:46 AM8/21/15
to dbfit
Hi,

I tested this on 3.2.0 today and all good.

Thanks again.

Eoin.
Reply all
Reply to author
Forward
0 new messages