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
c51ed128
Commit
c51ed128
authored
Jul 10, 2013
by
Alexander Barkov
Browse files
Options
Browse Files
Download
Plain Diff
Merge from 5.3
parents
1f3ec980
8a732d5a
Changes
13
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
83 additions
and
12 deletions
+83
-12
mysql-test/r/fulltext_derived_4257.result
mysql-test/r/fulltext_derived_4257.result
+6
-0
mysql-test/r/mrr_derived_crash_4610.result
mysql-test/r/mrr_derived_crash_4610.result
+19
-0
mysql-test/r/sp_missing_4665.result
mysql-test/r/sp_missing_4665.result
+6
-0
mysql-test/suite/plugins/r/fulltext_plugin.result
mysql-test/suite/plugins/r/fulltext_plugin.result
+2
-0
mysql-test/suite/plugins/t/fulltext_plugin.test
mysql-test/suite/plugins/t/fulltext_plugin.test
+6
-0
mysql-test/t/fulltext_derived_4257.test
mysql-test/t/fulltext_derived_4257.test
+6
-0
mysql-test/t/mrr_derived_crash_4610.test
mysql-test/t/mrr_derived_crash_4610.test
+16
-0
mysql-test/t/sp_missing_4665.test
mysql-test/t/sp_missing_4665.test
+9
-0
plugin/fulltext/plugin_example.c
plugin/fulltext/plugin_example.c
+1
-1
sql/item_func.h
sql/item_func.h
+0
-1
sql/sql_select.cc
sql/sql_select.cc
+3
-2
sql/sql_show.cc
sql/sql_show.cc
+2
-3
sql/table.cc
sql/table.cc
+7
-5
No files found.
mysql-test/r/fulltext_derived_4257.result
0 → 100644
View file @
c51ed128
set optimizer_switch = 'derived_merge=on';
create table t1 (c1 char(8), c2 char(8)) engine=myisam;
insert into t1 values ('test1','test2'),('test3','test4');
select * from (select c1 from t1 where match (c2) against ('hello' in boolean mode)) as alias;
c1
drop table t1;
mysql-test/r/mrr_derived_crash_4610.result
0 → 100644
View file @
c51ed128
create table t1 (f1 char(4) primary key) engine=innodb charset=utf8 ;
insert into t1 values ('aaaa');
create table t2 (f2 text, f3 char(4) not null) engine=innodb charset=utf8 ;
create table t3 (id int not null) engine=innodb charset=utf8 ;
create table t4 (val int not null) engine=innodb charset=utf8;
explain select 1 from
(select f2, f3, val, count(id) from t4 join t2 left join t3 on 0) top
join t1 on f1 = f3 where f3 = 'aaaa' order by val;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 const PRIMARY PRIMARY 12 const 1 Using index; Using filesort
1 PRIMARY <derived2> ref key0 key0 13 const 0 Using where
2 DERIVED t4 ALL NULL NULL NULL NULL 1
2 DERIVED t2 ALL NULL NULL NULL NULL 1 Using join buffer (flat, BNL join)
2 DERIVED t3 ALL NULL NULL NULL NULL 1 Using where; Using join buffer (incremental, BNL join)
select 1 from
(select f2, f3, val, count(id) from t4 join t2 left join t3 on 0) top
join t1 on f1 = f3 where f3 = 'aaaa' order by val;
1
drop table t1, t2, t3, t4;
mysql-test/r/sp_missing_4665.result
0 → 100644
View file @
c51ed128
create table t (a int);
create or replace view v as select 1 from t where a;
delete from v where (select g());
ERROR 42000: FUNCTION test.g does not exist
drop view v;
drop table t;
mysql-test/suite/plugins/r/fulltext_plugin.result
View file @
c51ed128
...
...
@@ -3,3 +3,5 @@ CREATE TABLE t1(a TEXT, b TEXT, FULLTEXT(a) WITH PARSER simple_parser);
ALTER TABLE t1 ADD FULLTEXT(b) WITH PARSER simple_parser;
DROP TABLE t1;
UNINSTALL PLUGIN simple_parser;
show status like 'a%status';
Variable_name Value
mysql-test/suite/plugins/t/fulltext_plugin.test
View file @
c51ed128
...
...
@@ -9,3 +9,9 @@ CREATE TABLE t1(a TEXT, b TEXT, FULLTEXT(a) WITH PARSER simple_parser);
ALTER
TABLE
t1
ADD
FULLTEXT
(
b
)
WITH
PARSER
simple_parser
;
DROP
TABLE
t1
;
UNINSTALL
PLUGIN
simple_parser
;
#
# Bug #69682 - mysqld crashes after uninstall of plugin with "first" status var
#
show
status
like
'a%status'
;
mysql-test/t/fulltext_derived_4257.test
0 → 100644
View file @
c51ed128
set
optimizer_switch
=
'derived_merge=on'
;
create
table
t1
(
c1
char
(
8
),
c2
char
(
8
))
engine
=
myisam
;
insert
into
t1
values
(
'test1'
,
'test2'
),(
'test3'
,
'test4'
);
select
*
from
(
select
c1
from
t1
where
match
(
c2
)
against
(
'hello'
in
boolean
mode
))
as
alias
;
drop
table
t1
;
mysql-test/t/mrr_derived_crash_4610.test
0 → 100644
View file @
c51ed128
#
# MDEV-4610 SQL query crashes MariaDB with derived_with_keys
#
--
source
include
/
have_innodb
.
inc
create
table
t1
(
f1
char
(
4
)
primary
key
)
engine
=
innodb
charset
=
utf8
;
insert
into
t1
values
(
'aaaa'
);
create
table
t2
(
f2
text
,
f3
char
(
4
)
not
null
)
engine
=
innodb
charset
=
utf8
;
create
table
t3
(
id
int
not
null
)
engine
=
innodb
charset
=
utf8
;
create
table
t4
(
val
int
not
null
)
engine
=
innodb
charset
=
utf8
;
explain
select
1
from
(
select
f2
,
f3
,
val
,
count
(
id
)
from
t4
join
t2
left
join
t3
on
0
)
top
join
t1
on
f1
=
f3
where
f3
=
'aaaa'
order
by
val
;
select
1
from
(
select
f2
,
f3
,
val
,
count
(
id
)
from
t4
join
t2
left
join
t3
on
0
)
top
join
t1
on
f1
=
f3
where
f3
=
'aaaa'
order
by
val
;
drop
table
t1
,
t2
,
t3
,
t4
;
mysql-test/t/sp_missing_4665.test
0 → 100644
View file @
c51ed128
#
# MDEV-4665 crash when referencing missing function in a subquery
#
create
table
t
(
a
int
);
create
or
replace
view
v
as
select
1
from
t
where
a
;
--
error
ER_SP_DOES_NOT_EXIST
delete
from
v
where
(
select
g
());
drop
view
v
;
drop
table
t
;
plugin/fulltext/plugin_example.c
View file @
c51ed128
...
...
@@ -210,7 +210,7 @@ static struct st_mysql_ftparser simple_parser_descriptor=
static
struct
st_mysql_show_var
simple_status
[]
=
{
{
"
static"
,
(
char
*
)
"just a static text"
,
SHOW_CHAR
},
{
"
A_static"
,
(
char
*
)
"just a static text"
,
SHOW_CHAR
},
{
"called"
,
(
char
*
)
&
number_of_calls
,
SHOW_LONG
},
{
0
,
0
,
0
}
};
...
...
sql/item_func.h
View file @
c51ed128
...
...
@@ -1807,7 +1807,6 @@ public:
bool
is_expensive_processor
(
uchar
*
arg
)
{
return
TRUE
;
}
enum
Functype
functype
()
const
{
return
FT_FUNC
;
}
const
char
*
func_name
()
const
{
return
"match"
;
}
void
update_used_tables
()
{}
table_map
not_null_tables
()
const
{
return
0
;
}
bool
fix_fields
(
THD
*
thd
,
Item
**
ref
);
bool
eq
(
const
Item
*
,
bool
binary_cmp
)
const
;
...
...
sql/sql_select.cc
View file @
c51ed128
...
...
@@ -19195,6 +19195,9 @@ create_sort_index(THD *thd, JOIN *join, ORDER *order,
MYF
(
MY_WME
|
MY_ZEROFILL
));
table
->
status
=
0
;
// May be wrong if quick_select
if
(
!
tab
->
preread_init_done
&&
tab
->
preread_init
())
goto
err
;
// If table has a range, move it to select
if
(
select
&&
!
select
->
quick
&&
tab
->
ref
.
key
>=
0
)
{
...
...
@@ -19231,8 +19234,6 @@ create_sort_index(THD *thd, JOIN *join, ORDER *order,
get_schema_tables_result
(
join
,
PROCESSED_BY_CREATE_SORT_INDEX
))
goto
err
;
if
(
!
tab
->
preread_init_done
&&
tab
->
preread_init
())
goto
err
;
if
(
table
->
s
->
tmp_table
)
table
->
file
->
info
(
HA_STATUS_VARIABLE
);
// Get record count
table
->
sort
.
found_records
=
filesort
(
thd
,
table
,
join
->
sortorder
,
length
,
...
...
sql/sql_show.cc
View file @
c51ed128
...
...
@@ -2547,12 +2547,11 @@ void remove_status_vars(SHOW_VAR *list)
{
mysql_mutex_lock
(
&
LOCK_status
);
SHOW_VAR
*
all
=
dynamic_element
(
&
all_status_vars
,
0
,
SHOW_VAR
*
);
int
a
=
0
,
b
=
all_status_vars
.
elements
,
c
=
(
a
+
b
)
/
2
;
for
(;
list
->
name
;
list
++
)
{
int
res
=
0
;
for
(
a
=
0
,
b
=
all_status_vars
.
elements
;
b
-
a
>
1
;
c
=
(
a
+
b
)
/
2
)
int
res
=
0
,
a
=
0
,
b
=
all_status_vars
.
elements
,
c
=
(
a
+
b
)
/
2
;
for
(
;
b
-
a
>
0
;
c
=
(
a
+
b
)
/
2
)
{
res
=
show_var_cmp
(
list
,
all
+
c
);
if
(
res
<
0
)
...
...
sql/table.cc
View file @
c51ed128
...
...
@@ -4192,6 +4192,7 @@ bool TABLE_LIST::prep_where(THD *thd, Item **conds,
bool
no_where_clause
)
{
DBUG_ENTER
(
"TABLE_LIST::prep_where"
);
bool
res
=
FALSE
;
for
(
TABLE_LIST
*
tbl
=
merge_underlying_list
;
tbl
;
tbl
=
tbl
->
next_local
)
{
...
...
@@ -4240,10 +4241,11 @@ bool TABLE_LIST::prep_where(THD *thd, Item **conds,
if
(
tbl
==
0
)
{
if
(
*
conds
&&
!
(
*
conds
)
->
fixed
)
(
*
conds
)
->
fix_fields
(
thd
,
conds
);
res
=
(
*
conds
)
->
fix_fields
(
thd
,
conds
);
if
(
!
res
)
*
conds
=
and_conds
(
*
conds
,
where
->
copy_andor_structure
(
thd
));
if
(
*
conds
&&
!
(
*
conds
)
->
fixed
)
(
*
conds
)
->
fix_fields
(
thd
,
conds
);
if
(
*
conds
&&
!
(
*
conds
)
->
fixed
&&
!
res
)
res
=
(
*
conds
)
->
fix_fields
(
thd
,
conds
);
}
if
(
arena
)
thd
->
restore_active_arena
(
arena
,
&
backup
);
...
...
@@ -4251,7 +4253,7 @@ bool TABLE_LIST::prep_where(THD *thd, Item **conds,
}
}
DBUG_RETURN
(
FALSE
);
DBUG_RETURN
(
res
);
}
/**
...
...
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