Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

REC_OFFS_SQL_NULL and REC_OFFS_EXTERNAL set incorrectly on linux/x86_64 #2

Open
GoogleCodeExporter opened this issue Mar 29, 2016 · 2 comments

Comments

@GoogleCodeExporter
Copy link

--------
What steps will reproduce the problem?
--------

Configure, compile & run constraints_parser on an x86_64 platform and no 
rows containing a field that is null will be recovered. Errors will be 
similar to:

 Invalid offset for field 12: 2147483701

--------
What is the expected output? What do you see instead?
--------

in constraints_parser.c:ibrec_init_offsets_old(), the following lines are 
executed:
 offs |= REC_OFFS_SQL_NULL; (lines 261, 279) 
and
 offs |= REC_OFFS_EXTERNAL; (line 284)


 The problem is that REC_OFFS_SQL_NULL and REC_OFFS_EXTERNAL are set to (1 
<< 31) when ulint is in fact 64 bit and should be (1 << 63) instead.


As a workaround, replacing these 3 lines with
 offs |= REC_OFFS_SQL_NULL << 32;
and
 offs |= REC_OFFS_EXTERNAL << 32;

fixes it.

(As a wild guess this may be a problem with configure, rather than the 
header files themselves)

--------
What version of the product are you using? On what operating system?
--------
uname -a

  Linux <hostname> 2.6.18-8.1.8.el5 #1 SMP Mon Jun 25 17:06:07 EDT 2007 
x86_64 x86_64 x86_64 GNU/Linux

cat /etc/redhat-release

  Red Hat Enterprise Linux Server release 5.1 (Tikanga)

Original issue reported on code.google.com by [email protected] on 22 Feb 2008 at 12:42

@GoogleCodeExporter
Copy link
Author

Also, I get a segfault when recovering data from pages that are more than 16k 
in 
size -- I presume this is related to the same 32bit/64bit issue but haven't had 
time 
to do a diagnosis.

Original comment by [email protected] on 22 Feb 2008 at 1:26

@GoogleCodeExporter
Copy link
Author

Thanks for you report, I'll review my code and will perform a few tests on 
64bit OS
this weekend and fix 64-bit related bugs. 

Original comment by [email protected] on 22 Feb 2008 at 2:25

  • Changed state: Accepted

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant