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
baa424ee
Commit
baa424ee
authored
Apr 05, 2005
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge mskold@bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/usr/local/home/marty/MySQL/mysql-5.0
parents
b419262f
3e59235e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
123 additions
and
1 deletion
+123
-1
mysql-test/r/ndb_condition_pushdown.result
mysql-test/r/ndb_condition_pushdown.result
+57
-1
mysql-test/t/ndb_condition_pushdown.test
mysql-test/t/ndb_condition_pushdown.test
+59
-0
sql/records.cc
sql/records.cc
+7
-0
No files found.
mysql-test/r/ndb_condition_pushdown.result
View file @
baa424ee
...
@@ -1023,6 +1023,62 @@ auto
...
@@ -1023,6 +1023,62 @@ auto
1
1
3
3
4
4
update t1
set medium = 17
where
string = "aaaa" and
vstring = "aaaa" and
bin = 0xAAAA and
vbin = 0xAAAA and
tiny = -1 and
short = -1 and
medium = -1 and
long_int = -1 and
longlong = -1 and
real_float > 1.0 and real_float < 2.0 and
real_double > 1.0 and real_double < 2.0 and
real_decimal > 1.0 and real_decimal < 2.0 and
utiny = 1 and
ushort = 1 and
umedium = 1 and
ulong = 1 and
ulonglong = 1 and
/* bits = b'001' and */
options = 'one' and
flags = 'one' and
date_field = '1901-01-01' and
year_field = '1901' and
time_field = '01:01:01' and
date_time = '1901-01-01 01:01:01';
delete from t1
where
string = "aaaa" and
vstring = "aaaa" and
bin = 0xAAAA and
vbin = 0xAAAA and
tiny = -1 and
short = -1 and
medium = 17 and
long_int = -1 and
longlong = -1 and
real_float > 1.0 and real_float < 2.0 and
real_double > 1.0 and real_double < 2.0 and
real_decimal > 1.0 and real_decimal < 2.0 and
utiny = 1 and
ushort = 1 and
umedium = 1 and
ulong = 1 and
ulonglong = 1 and
/* bits = b'001' and */
options = 'one' and
flags = 'one' and
date_field = '1901-01-01' and
year_field = '1901' and
time_field = '01:01:01' and
date_time = '1901-01-01 01:01:01';
select count(*) from t1;
count(*)
3
explain
explain
select * from t2 where attr3 is null or attr1 > 2 and pk1= 3 order by pk1;
select * from t2 where attr3 is null or attr1 > 2 and pk1= 3 order by pk1;
id select_type table type possible_keys key key_len ref rows Extra
id select_type table type possible_keys key key_len ref rows Extra
...
@@ -1078,7 +1134,7 @@ pk1 attr1 attr2 attr3 attr4 pk1 attr1 attr2 attr3 attr4
...
@@ -1078,7 +1134,7 @@ pk1 attr1 attr2 attr3 attr4 pk1 attr1 attr2 attr3 attr4
explain
explain
select auto from t1 where string = "aaaa" collate latin1_general_ci order by auto;
select auto from t1 where string = "aaaa" collate latin1_general_ci order by auto;
id select_type table type possible_keys key key_len ref rows Extra
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL
4
Using where; Using filesort
1 SIMPLE t1 ALL NULL NULL NULL NULL
3
Using where; Using filesort
explain
explain
select * from t2 where (attr1 < 2) = (attr2 < 2) order by pk1;
select * from t2 where (attr1 < 2) = (attr2 < 2) order by pk1;
id select_type table type possible_keys key key_len ref rows Extra
id select_type table type possible_keys key key_len ref rows Extra
...
...
mysql-test/t/ndb_condition_pushdown.test
View file @
baa424ee
...
@@ -954,6 +954,65 @@ bin not like concat(0xBB, '%') and
...
@@ -954,6 +954,65 @@ bin not like concat(0xBB, '%') and
vbin
not
like
concat
(
0xBB
,
'%'
)
vbin
not
like
concat
(
0xBB
,
'%'
)
order
by
auto
;
order
by
auto
;
# Update test
update
t1
set
medium
=
17
where
string
=
"aaaa"
and
vstring
=
"aaaa"
and
bin
=
0xAAAA
and
vbin
=
0xAAAA
and
tiny
=
-
1
and
short
=
-
1
and
medium
=
-
1
and
long_int
=
-
1
and
longlong
=
-
1
and
real_float
>
1.0
and
real_float
<
2.0
and
real_double
>
1.0
and
real_double
<
2.0
and
real_decimal
>
1.0
and
real_decimal
<
2.0
and
utiny
=
1
and
ushort
=
1
and
umedium
=
1
and
ulong
=
1
and
ulonglong
=
1
and
/* bits = b'001' and */
options
=
'one'
and
flags
=
'one'
and
date_field
=
'1901-01-01'
and
year_field
=
'1901'
and
time_field
=
'01:01:01'
and
date_time
=
'1901-01-01 01:01:01'
;
# Delete test
delete
from
t1
where
string
=
"aaaa"
and
vstring
=
"aaaa"
and
bin
=
0xAAAA
and
vbin
=
0xAAAA
and
tiny
=
-
1
and
short
=
-
1
and
medium
=
17
and
long_int
=
-
1
and
longlong
=
-
1
and
real_float
>
1.0
and
real_float
<
2.0
and
real_double
>
1.0
and
real_double
<
2.0
and
real_decimal
>
1.0
and
real_decimal
<
2.0
and
utiny
=
1
and
ushort
=
1
and
umedium
=
1
and
ulong
=
1
and
ulonglong
=
1
and
/* bits = b'001' and */
options
=
'one'
and
flags
=
'one'
and
date_field
=
'1901-01-01'
and
year_field
=
'1901'
and
time_field
=
'01:01:01'
and
date_time
=
'1901-01-01 01:01:01'
;
select
count
(
*
)
from
t1
;
# Various tests
# Various tests
explain
explain
select
*
from
t2
where
attr3
is
null
or
attr1
>
2
and
pk1
=
3
order
by
pk1
;
select
*
from
t2
where
attr3
is
null
or
attr1
>
2
and
pk1
=
3
order
by
pk1
;
...
...
sql/records.cc
View file @
baa424ee
...
@@ -128,6 +128,13 @@ void init_read_record(READ_RECORD *info,THD *thd, TABLE *table,
...
@@ -128,6 +128,13 @@ void init_read_record(READ_RECORD *info,THD *thd, TABLE *table,
VOID
(
table
->
file
->
extra_opt
(
HA_EXTRA_CACHE
,
VOID
(
table
->
file
->
extra_opt
(
HA_EXTRA_CACHE
,
thd
->
variables
.
read_buff_size
));
thd
->
variables
.
read_buff_size
));
}
}
/* Condition pushdown to storage engine */
if
(
thd
->
variables
.
engine_condition_pushdown
&&
select
&&
select
->
cond
&&
select
->
cond
->
used_tables
()
&
table
->
map
&&
!
(
select
->
quick
||
table
->
file
->
pushed_cond
))
table
->
file
->
cond_push
(
select
->
cond
);
DBUG_VOID_RETURN
;
DBUG_VOID_RETURN
;
}
/* init_read_record */
}
/* init_read_record */
...
...
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