Description:
Creating a bit field in Ndb API with size 0 causes system failure,
this should be caught in Ndb API. From SQL this is allowed and
has the same effect as CHAR(0), i.e. a field that can be NULL or NOT NULL.
#0 0x0000002a95b556cd in raise () from /lib64/tls/libc.so.6
#1 0x0000002a95b56c7e in abort () from /lib64/tls/libc.so.6
#2 0x00000000005bfb04 in NdbShutdown (type=NST_ErrorHandler,
restartType=NRT_Default) at Emulator.cpp:244
#3 0x00000000005c4f68 in ErrorReporter::handleError (type=Variable "type" is not available.
)
at ErrorReporter.cpp:203
#4 0x00000000005b97aa in SimulatedBlock::progError (this=0x2a96dfa010,
line=352, err_code=2341, extra=0x60df82 "DbtupMeta.cpp")
at SimulatedBlock.cpp:728
#5 0x0000000000559865 in Dbtup::execTUP_ADD_ATTRREQ (this=0x2a96dfa010,
signal=0x840060) at DbtupMeta.cpp:352
#6 0x00000000005bc967 in FastScheduler::doJob (this=0x8499a0)
at SimulatedBlock.hpp:529
#7 0x00000000005be07f in ThreadConfig::ipControlLoop (this=0x8540b0)
at ThreadConfig.cpp:175
#8 0x0000000000472f48 in main (argc=3, argv=0x7fbfffee18) at main.cpp:203
How to repeat:
col.setType(NDBCOL::Bit);
col.setLength(0);
Suggested fix:
Change so that a bit field will always have a lenght of at least 1 (max(1, no_of_bits))
Description: Creating a bit field in Ndb API with size 0 causes system failure, this should be caught in Ndb API. From SQL this is allowed and has the same effect as CHAR(0), i.e. a field that can be NULL or NOT NULL. #0 0x0000002a95b556cd in raise () from /lib64/tls/libc.so.6 #1 0x0000002a95b56c7e in abort () from /lib64/tls/libc.so.6 #2 0x00000000005bfb04 in NdbShutdown (type=NST_ErrorHandler, restartType=NRT_Default) at Emulator.cpp:244 #3 0x00000000005c4f68 in ErrorReporter::handleError (type=Variable "type" is not available. ) at ErrorReporter.cpp:203 #4 0x00000000005b97aa in SimulatedBlock::progError (this=0x2a96dfa010, line=352, err_code=2341, extra=0x60df82 "DbtupMeta.cpp") at SimulatedBlock.cpp:728 #5 0x0000000000559865 in Dbtup::execTUP_ADD_ATTRREQ (this=0x2a96dfa010, signal=0x840060) at DbtupMeta.cpp:352 #6 0x00000000005bc967 in FastScheduler::doJob (this=0x8499a0) at SimulatedBlock.hpp:529 #7 0x00000000005be07f in ThreadConfig::ipControlLoop (this=0x8540b0) at ThreadConfig.cpp:175 #8 0x0000000000472f48 in main (argc=3, argv=0x7fbfffee18) at main.cpp:203 How to repeat: col.setType(NDBCOL::Bit); col.setLength(0); Suggested fix: Change so that a bit field will always have a lenght of at least 1 (max(1, no_of_bits))