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

IDs are not consistent #32

Closed
samasri opened this issue Apr 5, 2018 · 3 comments
Closed

IDs are not consistent #32

samasri opened this issue Apr 5, 2018 · 3 comments
Labels

Comments

@samasri
Copy link
Owner

samasri commented Apr 5, 2018

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:

ID Signature Class (first occurrence)
1 a() A
2 a() D

The overrides table would be the following:

FunctionID BaseClassName OverridingClassName
1 A B
1 B C
1 D E
1 E F

Although for the last 2 rows in the overriddes table, the ID should be 2

@samasri
Copy link
Owner Author

samasri commented Apr 5, 2018

The plan is to remove IDs of functions and make the primary key for functions signature and classID

@samasri samasri added the bug label Apr 9, 2018
@samasri
Copy link
Owner Author

samasri commented Apr 10, 2018

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

@samasri
Copy link
Owner Author

samasri commented Apr 10, 2018

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

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

No branches or pull requests

1 participant