Closed samasri closed 6 years ago
The plan is to remove IDs of functions and make the primary key for functions signature and classID
When changing the primary keys in the functions table, I ran into the error of having duplicate primary keys. It turned out that some of the rows in allFunctions would be referring to the same function but having different isFirstOccurrence
or isVirtual
values. Two examples are below for reference:
FunctionName; FunctionSignature; IsFirstOccurence; Namespace; ClassName; isImplicit; isVirtual
operator delete; operator delete(void *,TR::Region &); 0; TR;VPConstraint; 0; 0
operator delete; operator delete(void *,TR::Region &); 1; TR; VPConstraint; 0; 0
rexBits, rexBits(); 1; OMR::X86; Instruction; 0; 1
rexBits, rexBits(); 1; OMR::X86; Instruction; 0; 0
Had an issue adding functions with same signature characters, but different case-sensitivity since MySQL is not case-sensitive by default. Added a line to the table creation to make it case sensitive: ALTER TABLE [tableName] CONVERT TO CHARACTER SET latin1 COLLATE latin1_general_cs;
Example of cases that caused errors:
FunctionName; FunctionSignature; IsFirstOccurence; Namespace; ClassName; isImplicit; isVirtual
SetUp;SetUp();1;testing;Environment;0;1
Setup;Setup();1;testing;Environment;0;1
Suppose we have the following 2 hierarchies: C --> B --> A F --> E --> D Each of these classes have a function
a()
The following is the functions table:The overrides table would be the following:
Although for the last 2 rows in the overriddes table, the ID should be 2