Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
476a4907
Commit
476a4907
authored
Jul 22, 2005
by
pappa@c-8b0ae253.1238-1-64736c10.cust.bredbandsbolaget.se
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug #12116 patch
parent
2061b38e
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
2 deletions
+8
-2
sql/field.h
sql/field.h
+6
-0
sql/key.cc
sql/key.cc
+2
-2
No files found.
sql/field.h
View file @
476a4907
...
@@ -185,6 +185,12 @@ class Field
...
@@ -185,6 +185,12 @@ class Field
return
test
(
record
[(
uint
)
(
null_ptr
-
(
uchar
*
)
table
->
record
[
0
])]
&
return
test
(
record
[(
uint
)
(
null_ptr
-
(
uchar
*
)
table
->
record
[
0
])]
&
null_bit
);
null_bit
);
}
}
inline
bool
is_null_in_record_with_offset
(
my_ptrdiff_t
offset
)
{
if
(
!
null_ptr
)
return
0
;
return
test
(
null_ptr
[
offset
]
&
null_bit
);
}
inline
void
set_null
(
int
row_offset
=
0
)
inline
void
set_null
(
int
row_offset
=
0
)
{
if
(
null_ptr
)
null_ptr
[
row_offset
]
|=
null_bit
;
}
{
if
(
null_ptr
)
null_ptr
[
row_offset
]
|=
null_bit
;
}
inline
void
set_notnull
(
int
row_offset
=
0
)
inline
void
set_notnull
(
int
row_offset
=
0
)
...
...
sql/key.cc
View file @
476a4907
...
@@ -473,8 +473,8 @@ int key_rec_cmp(void *key, byte *first_rec, byte *second_rec)
...
@@ -473,8 +473,8 @@ int key_rec_cmp(void *key, byte *first_rec, byte *second_rec)
if
(
key_part
->
null_bit
)
if
(
key_part
->
null_bit
)
{
{
/* The key_part can contain NULL values */
/* The key_part can contain NULL values */
bool
first_is_null
=
field
->
is_null
(
first_diff
);
bool
first_is_null
=
field
->
is_null
_in_record_with_offset
(
first_diff
);
bool
sec_is_null
=
field
->
is_null
(
sec_diff
);
bool
sec_is_null
=
field
->
is_null
_in_record_with_offset
(
sec_diff
);
/*
/*
NULL is smaller then everything so if first is NULL and the other
NULL is smaller then everything so if first is NULL and the other
not then we know that we should return -1 and for the opposite
not then we know that we should return -1 and for the opposite
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment