Support Requests: Browse | Submit New | Admin

[#18611] 2.8pre1 test case error on 64-bit x86_64 Fedora 8

Date:
2008-03-05 14:56
Priority:
3
Submitted By:
Nobody
Assigned To:
Nobody (None)
Category:
None
State:
Open
Summary:
2.8pre1 test case error on 64-bit x86_64 Fedora 8

Detailed description
I am getting the following errors when running the test.rb script:

% ruby test.rb -- localhost test test
Started
...............................................................................F...F.....F........................
Finished in 0.156387 seconds.

  1) Failure:
test_fetch_mediumint(TC_MysqlStmt2) [test.rb:794]:
<[-1]> expected but was
<[4294967295]>.

  2) Failure:
test_fetch_smallint(TC_MysqlStmt2) [test.rb:763]:
<[-1]> expected but was
<[4294967295]>.

  3) Failure:
test_fetch_tinyint(TC_MysqlStmt2) [test.rb:732]:
<[-1]> expected but was
<[4294967295]>.

114 tests, 369 assertions, 3 failures, 0 errors

I am guessing that this is related to the compilation warnings I see, and perhaps is due to slicing a 64-bit integer
down to 32 bits somehow.  The compiler warnings I see are of the sort:

mysql.c:1762: warning: format ‘%04d’ expects type ‘int’, but argument 3 has type ‘long int’

Add A Comment: Notepad

Please login


Followup

Message
Date: 2008-03-05 16:08
Sender: Bill Lear

If I change the stmt_fetch() function from:

            case MYSQL_TYPE_LONG:
                v = INT2NUM(*(long*)s->result.bind[i].buffer);
                break;

to:

       case MYSQL_TYPE_LONG:
                v = INT2NUM(*(int*)s->result.bind[i].buffer);
                break;

the test cases pass.  I am not sure that this is the correct
solution, or if INT2NUM is the issue --- it seems that it could
be the problem.  I will try to investigate more and post
a followup.

Attached Files:

Name Description Download
No Files Currently Attached

Changes:

No Changes Have Been Made to This Item