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
73db46fb
Commit
73db46fb
authored
Sep 15, 2006
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug #21056 ndb pushdown equal/setValue error on datetime: post review fixes, use my_bitmap
parent
33ccb2af
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
49 additions
and
30 deletions
+49
-30
sql/ha_ndbcluster.cc
sql/ha_ndbcluster.cc
+10
-10
sql/ha_ndbcluster.h
sql/ha_ndbcluster.h
+39
-20
No files found.
sql/ha_ndbcluster.cc
View file @
73db46fb
...
...
@@ -6938,7 +6938,7 @@ void ndb_serialize_cond(const Item *item, void *arg)
curr_cond
->
ndb_item
=
new
Ndb_item
(
field
,
col
->
getColumnNo
());
context
->
dont_expect
(
Item
::
FIELD_ITEM
);
context
->
expect_no_field_result
();
if
(
context
->
expect_mask
)
if
(
!
context
->
expecting_nothing
()
)
{
// We have not seen second argument yet
if
(
type
==
MYSQL_TYPE_TIME
||
...
...
@@ -7243,7 +7243,7 @@ void ndb_serialize_cond(const Item *item, void *arg)
NDB_ITEM_QUALIFICATION
q
;
q
.
value_type
=
Item
::
STRING_ITEM
;
curr_cond
->
ndb_item
=
new
Ndb_item
(
NDB_VALUE
,
q
,
item
);
if
(
context
->
expect_field_result_mask
)
if
(
!
context
->
expecting_no_field_result
()
)
{
// We have not seen the field argument yet
context
->
expect_only
(
Item
::
FIELD_ITEM
);
...
...
@@ -7273,7 +7273,7 @@ void ndb_serialize_cond(const Item *item, void *arg)
NDB_ITEM_QUALIFICATION
q
;
q
.
value_type
=
Item
::
REAL_ITEM
;
curr_cond
->
ndb_item
=
new
Ndb_item
(
NDB_VALUE
,
q
,
item
);
if
(
context
->
expect_field_result_mask
)
if
(
!
context
->
expecting_no_field_result
()
)
{
// We have not seen the field argument yet
context
->
expect_only
(
Item
::
FIELD_ITEM
);
...
...
@@ -7296,7 +7296,7 @@ void ndb_serialize_cond(const Item *item, void *arg)
NDB_ITEM_QUALIFICATION
q
;
q
.
value_type
=
Item
::
INT_ITEM
;
curr_cond
->
ndb_item
=
new
Ndb_item
(
NDB_VALUE
,
q
,
item
);
if
(
context
->
expect_field_result_mask
)
if
(
!
context
->
expecting_no_field_result
()
)
{
// We have not seen the field argument yet
context
->
expect_only
(
Item
::
FIELD_ITEM
);
...
...
@@ -7319,7 +7319,7 @@ void ndb_serialize_cond(const Item *item, void *arg)
NDB_ITEM_QUALIFICATION
q
;
q
.
value_type
=
Item
::
DECIMAL_ITEM
;
curr_cond
->
ndb_item
=
new
Ndb_item
(
NDB_VALUE
,
q
,
item
);
if
(
context
->
expect_field_result_mask
)
if
(
!
context
->
expecting_no_field_result
()
)
{
// We have not seen the field argument yet
context
->
expect_only
(
Item
::
FIELD_ITEM
);
...
...
@@ -7369,7 +7369,7 @@ void ndb_serialize_cond(const Item *item, void *arg)
NDB_ITEM_QUALIFICATION
q
;
q
.
value_type
=
Item
::
STRING_ITEM
;
curr_cond
->
ndb_item
=
new
Ndb_item
(
NDB_VALUE
,
q
,
item
);
if
(
context
->
expect_field_result_mask
)
if
(
!
context
->
expecting_no_field_result
()
)
{
// We have not seen the field argument yet
context
->
expect_only
(
Item
::
FIELD_ITEM
);
...
...
@@ -7402,7 +7402,7 @@ void ndb_serialize_cond(const Item *item, void *arg)
NDB_ITEM_QUALIFICATION
q
;
q
.
value_type
=
Item
::
INT_ITEM
;
curr_cond
->
ndb_item
=
new
Ndb_item
(
NDB_VALUE
,
q
,
item
);
if
(
context
->
expect_field_result_mask
)
if
(
!
context
->
expecting_no_field_result
()
)
{
// We have not seen the field argument yet
context
->
expect_only
(
Item
::
FIELD_ITEM
);
...
...
@@ -7429,7 +7429,7 @@ void ndb_serialize_cond(const Item *item, void *arg)
NDB_ITEM_QUALIFICATION
q
;
q
.
value_type
=
Item
::
REAL_ITEM
;
curr_cond
->
ndb_item
=
new
Ndb_item
(
NDB_VALUE
,
q
,
item
);
if
(
context
->
expect_field_result_mask
)
if
(
!
context
->
expecting_no_field_result
()
)
{
// We have not seen the field argument yet
context
->
expect_only
(
Item
::
FIELD_ITEM
);
...
...
@@ -7452,7 +7452,7 @@ void ndb_serialize_cond(const Item *item, void *arg)
NDB_ITEM_QUALIFICATION
q
;
q
.
value_type
=
Item
::
VARBIN_ITEM
;
curr_cond
->
ndb_item
=
new
Ndb_item
(
NDB_VALUE
,
q
,
item
);
if
(
context
->
expect_field_result_mask
)
if
(
!
context
->
expecting_no_field_result
()
)
{
// We have not seen the field argument yet
context
->
expect_only
(
Item
::
FIELD_ITEM
);
...
...
@@ -7477,7 +7477,7 @@ void ndb_serialize_cond(const Item *item, void *arg)
NDB_ITEM_QUALIFICATION
q
;
q
.
value_type
=
Item
::
DECIMAL_ITEM
;
curr_cond
->
ndb_item
=
new
Ndb_item
(
NDB_VALUE
,
q
,
item
);
if
(
context
->
expect_field_result_mask
)
if
(
!
context
->
expecting_no_field_result
()
)
{
// We have not seen the field argument yet
context
->
expect_only
(
Item
::
FIELD_ITEM
);
...
...
sql/ha_ndbcluster.h
View file @
73db46fb
...
...
@@ -362,76 +362,95 @@ class Ndb_cond_traverse_context
Ndb_cond_traverse_context
(
TABLE
*
tab
,
void
*
ndb_tab
,
Ndb_cond_stack
*
stack
)
:
table
(
tab
),
ndb_table
(
ndb_tab
),
supported
(
TRUE
),
stack_ptr
(
stack
),
cond_ptr
(
NULL
),
expect_mask
(
0
),
expect_field_type_mask
(
0
),
expect_field_result_mask
(
0
),
skip
(
0
),
collation
(
NULL
),
rewrite_stack
(
NULL
)
{
// Allocate type checking bitmaps
bitmap_init
(
&
expect_mask
,
0
,
512
,
TRUE
);
bitmap_init
(
&
expect_field_type_mask
,
0
,
512
,
TRUE
);
bitmap_init
(
&
expect_field_result_mask
,
0
,
512
,
TRUE
);
if
(
stack
)
cond_ptr
=
stack
->
ndb_cond
;
};
~
Ndb_cond_traverse_context
()
{
bitmap_free
(
&
expect_mask
);
bitmap_free
(
&
expect_field_type_mask
);
bitmap_free
(
&
expect_field_result_mask
);
if
(
rewrite_stack
)
delete
rewrite_stack
;
}
void
expect
(
Item
::
Type
type
)
{
expect_mask
|=
(
1
<<
type
);
bitmap_set_bit
(
&
expect_mask
,
(
uint
)
type
);
if
(
type
==
Item
::
FIELD_ITEM
)
expect_all_field_types
();
};
void
dont_expect
(
Item
::
Type
type
)
{
expect_mask
&=
~
(
1
<<
type
);
bitmap_clear_bit
(
&
expect_mask
,
(
uint
)
type
);
};
bool
expecting
(
Item
::
Type
type
)
{
return
(
expect_mask
&
(
1
<<
type
)
);
return
bitmap_is_set
(
&
expect_mask
,
(
uint
)
type
);
};
void
expect_nothing
()
{
expect_mask
=
0
;
bitmap_clear_all
(
&
expect_mask
)
;
};
bool
expecting_nothing
()
{
return
bitmap_is_clear_all
(
&
expect_mask
);
}
void
expect_only
(
Item
::
Type
type
)
{
expect_
mask
=
0
;
expect_
nothing
()
;
expect
(
type
);
};
void
expect_field_type
(
enum_field_types
result
)
void
expect_field_type
(
enum_field_types
type
)
{
expect_field_type_mask
|=
(
1
<<
result
);
bitmap_set_bit
(
&
expect_field_type_mask
,
(
uint
)
type
);
};
void
expect_all_field_types
()
{
expect_field_type_mask
=
~
0
;
bitmap_set_all
(
&
expect_field_type_mask
)
;
};
bool
expecting_field_type
(
enum_field_types
result
)
bool
expecting_field_type
(
enum_field_types
type
)
{
return
(
expect_field_type_mask
&
(
1
<<
result
)
);
return
bitmap_is_set
(
&
expect_field_type_mask
,
(
uint
)
type
);
};
void
expect_no_field_type
()
{
expect_field_type_mask
=
0
;
bitmap_clear_all
(
&
expect_field_type_mask
)
;
};
bool
expecting_no_field_type
()
{
return
bitmap_is_clear_all
(
&
expect_field_type_mask
);
}
void
expect_only_field_type
(
enum_field_types
result
)
{
expect_
field_type_mask
=
0
;
expect_
no_field_type
()
;
expect_field_type
(
result
);
};
void
expect_field_result
(
Item_result
result
)
{
expect_field_result_mask
|=
(
1
<<
result
);
bitmap_set_bit
(
&
expect_field_result_mask
,
(
uint
)
result
);
};
bool
expecting_field_result
(
Item_result
result
)
{
return
(
expect_field_result_mask
&
(
1
<<
result
)
);
return
bitmap_is_set
(
&
expect_field_result_mask
,
(
uint
)
result
);
};
void
expect_no_field_result
()
{
expect_field_result_mask
=
0
;
bitmap_clear_all
(
&
expect_field_result_mask
)
;
};
bool
expecting_no_field_result
()
{
return
bitmap_is_clear_all
(
&
expect_field_result_mask
);
}
void
expect_only_field_result
(
Item_result
result
)
{
expect_
field_result_mask
=
0
;
expect_
no_field_result
()
;
expect_field_result
(
result
);
};
void
expect_collation
(
CHARSET_INFO
*
col
)
...
...
@@ -451,9 +470,9 @@ class Ndb_cond_traverse_context
bool
supported
;
Ndb_cond_stack
*
stack_ptr
;
Ndb_cond
*
cond_ptr
;
uint
expect_mask
;
uint
expect_field_type_mask
;
uint
expect_field_result_mask
;
MY_BITMAP
expect_mask
;
MY_BITMAP
expect_field_type_mask
;
MY_BITMAP
expect_field_result_mask
;
uint
skip
;
CHARSET_INFO
*
collation
;
Ndb_rewrite_context
*
rewrite_stack
;
...
...
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