-
Notifications
You must be signed in to change notification settings - Fork 13
compare bug in temporary tables #64
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -28,6 +28,7 @@ | |
|
|
||
| #include <villagesql/extension.h> | ||
|
|
||
| #include <cassert> | ||
| #include <cmath> | ||
| #include <cstddef> | ||
| #include <cstdint> | ||
|
|
@@ -180,6 +181,7 @@ bool decode_complex(const unsigned char *buffer, size_t buffer_size, char *to, | |
| int cmp_complex(const unsigned char *data1, size_t len1, | ||
| const unsigned char *data2, size_t len2) { | ||
| if (len1 < kComplexSize || len2 < kComplexSize) { | ||
| assert(len1 != 0); | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we want this, or len1 != kComplexSize and len2 as well?
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I replace this assert in a follow up PR, with a warning, so I don't think it is worth changing here. |
||
| return 0; // Invalid lengths, treat as equal | ||
| } | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So the call WAS going through sql/field.cc Line 6757, which was trying to use the length prefix. But if it is NOT a custom type, it is doing the same thing below on Line 6764. Why is that not problematic? Do we have a different representation than other varstring?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't follow
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We had a discussion offline, it is because we aren't using an encoding, which is not something that other binary varchars would use. I am not sure if there is a simplification, that would get rid of these special cases, but let's unblock for now.