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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
a8839c53
Commit
a8839c53
authored
Jun 14, 2006
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge bk-internal.mysql.com:/data0/bk/mysql-5.0
into bk-internal.mysql.com:/data0/bk/mysql-5.0-kt
parents
d4bf9674
8b4362b6
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
74 additions
and
4 deletions
+74
-4
mysql-test/r/ndb_condition_pushdown.result
mysql-test/r/ndb_condition_pushdown.result
+24
-0
mysql-test/t/ndb_condition_pushdown.test
mysql-test/t/ndb_condition_pushdown.test
+22
-0
sql/ha_ndbcluster.cc
sql/ha_ndbcluster.cc
+28
-4
No files found.
mysql-test/r/ndb_condition_pushdown.result
View file @
a8839c53
...
...
@@ -1842,5 +1842,29 @@ a b
select * from t1 where b like 'abc' or b like 'abc';
a b
3 abc
drop table t1;
create table t1 ( fname varchar(255), lname varchar(255) )
engine=ndbcluster;
insert into t1 values ("Young","Foo");
set engine_condition_pushdown = 0;
SELECT fname, lname FROM t1 WHERE (fname like 'Y%') or (lname like 'F%');
fname lname
Young Foo
set engine_condition_pushdown = 1;
SELECT fname, lname FROM t1 WHERE (fname like 'Y%') or (lname like 'F%');
fname lname
Young Foo
insert into t1 values ("aaa", "aaa");
insert into t1 values ("bbb", "bbb");
insert into t1 values ("ccc", "ccc");
insert into t1 values ("ddd", "ddd");
set engine_condition_pushdown = 0;
SELECT fname, lname FROM t1 WHERE (fname like 'Y%') or (lname like 'F%');
fname lname
Young Foo
set engine_condition_pushdown = 1;
SELECT fname, lname FROM t1 WHERE (fname like 'Y%') or (lname like 'F%');
fname lname
Young Foo
set engine_condition_pushdown = @old_ecpd;
DROP TABLE t1,t2,t3,t4,t5;
mysql-test/t/ndb_condition_pushdown.test
View file @
a8839c53
...
...
@@ -1686,5 +1686,27 @@ select * from t1 where b like 'ab' or b like 'ab';
select
*
from
t1
where
b
like
'abc'
;
select
*
from
t1
where
b
like
'abc'
or
b
like
'abc'
;
# bug#20406 (maybe same as bug#17421 -1, not seen on 32-bit x86)
drop
table
t1
;
create
table
t1
(
fname
varchar
(
255
),
lname
varchar
(
255
)
)
engine
=
ndbcluster
;
insert
into
t1
values
(
"Young"
,
"Foo"
);
set
engine_condition_pushdown
=
0
;
SELECT
fname
,
lname
FROM
t1
WHERE
(
fname
like
'Y%'
)
or
(
lname
like
'F%'
);
set
engine_condition_pushdown
=
1
;
SELECT
fname
,
lname
FROM
t1
WHERE
(
fname
like
'Y%'
)
or
(
lname
like
'F%'
);
# make sure optimizer does not do some crazy shortcut
insert
into
t1
values
(
"aaa"
,
"aaa"
);
insert
into
t1
values
(
"bbb"
,
"bbb"
);
insert
into
t1
values
(
"ccc"
,
"ccc"
);
insert
into
t1
values
(
"ddd"
,
"ddd"
);
set
engine_condition_pushdown
=
0
;
SELECT
fname
,
lname
FROM
t1
WHERE
(
fname
like
'Y%'
)
or
(
lname
like
'F%'
);
set
engine_condition_pushdown
=
1
;
SELECT
fname
,
lname
FROM
t1
WHERE
(
fname
like
'Y%'
)
or
(
lname
like
'F%'
);
set
engine_condition_pushdown
=
@
old_ecpd
;
DROP
TABLE
t1
,
t2
,
t3
,
t4
,
t5
;
sql/ha_ndbcluster.cc
View file @
a8839c53
...
...
@@ -4467,15 +4467,29 @@ int ha_ndbcluster::delete_table(const char *name)
int
ha_ndbcluster
::
drop_table
()
{
THD
*
thd
=
current_thd
;
Ndb
*
ndb
=
get_ndb
();
NdbDictionary
::
Dictionary
*
dict
=
ndb
->
getDictionary
();
DBUG_ENTER
(
"drop_table"
);
DBUG_PRINT
(
"enter"
,
(
"Deleting %s"
,
m_tabname
));
release_metadata
();
if
(
dict
->
dropTable
(
m_tabname
))
while
(
dict
->
dropTable
(
m_tabname
))
{
const
NdbError
err
=
dict
->
getNdbError
();
switch
(
err
.
status
)
{
case
NdbError
:
:
TemporaryError
:
if
(
!
thd
->
killed
)
continue
;
// retry indefinitly
break
;
default:
break
;
}
ERR_RETURN
(
dict
->
getNdbError
());
}
DBUG_RETURN
(
0
);
}
...
...
@@ -4884,14 +4898,24 @@ int ndbcluster_drop_database(const char *path)
List_iterator_fast
<
char
>
it
(
drop_list
);
while
((
tabname
=
it
++
))
{
if
(
dict
->
dropTable
(
tabname
))
while
(
dict
->
dropTable
(
tabname
))
{
const
NdbError
err
=
dict
->
getNdbError
();
if
(
err
.
code
!=
709
)
switch
(
err
.
status
)
{
case
NdbError
:
:
TemporaryError
:
if
(
!
thd
->
killed
)
continue
;
// retry indefinitly
break
;
default:
break
;
}
if
(
err
.
code
!=
709
)
// 709: No such table existed
{
ERR_PRINT
(
err
);
ret
=
ndb_to_mysql_error
(
&
err
);
}
break
;
}
}
DBUG_RETURN
(
ret
);
...
...
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