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
c77992cd
Commit
c77992cd
authored
Oct 18, 2010
by
Sergey Glukhov
Browse files
Options
Browse Files
Download
Plain Diff
5.1-security->5.5-security merge
parents
c8adfa33
9a8f22fa
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
103 additions
and
2 deletions
+103
-2
mysql-test/r/fulltext.result
mysql-test/r/fulltext.result
+36
-0
mysql-test/t/fulltext.test
mysql-test/t/fulltext.test
+37
-0
mysys/my_symlink.c
mysys/my_symlink.c
+16
-1
sql/item_func.cc
sql/item_func.cc
+10
-0
sql/item_func.h
sql/item_func.h
+1
-1
sql/sql_select.cc
sql/sql_select.cc
+3
-0
No files found.
mysql-test/r/fulltext.result
View file @
c77992cd
...
...
@@ -652,4 +652,40 @@ Table Op Msg_type Msg_text
test.t1 repair status OK
SET myisam_sort_buffer_size=@@global.myisam_sort_buffer_size;
DROP TABLE t1;
#
# Bug#54484 explain + prepared statement: crash and Got error -1 from storage engine
#
CREATE TABLE t1(f1 VARCHAR(6) NOT NULL, FULLTEXT KEY(f1), UNIQUE(f1));
INSERT INTO t1 VALUES ('test');
SELECT 1 FROM t1 WHERE 1 >
ALL((SELECT 1 FROM t1 JOIN t1 a
ON (MATCH(t1.f1) against (""))
WHERE t1.f1 GROUP BY t1.f1)) xor f1;
1
1
PREPARE stmt FROM
'SELECT 1 FROM t1 WHERE 1 >
ALL((SELECT 1 FROM t1 RIGHT OUTER JOIN t1 a
ON (MATCH(t1.f1) against (""))
WHERE t1.f1 GROUP BY t1.f1)) xor f1';
EXECUTE stmt;
1
1
EXECUTE stmt;
1
1
DEALLOCATE PREPARE stmt;
PREPARE stmt FROM
'SELECT 1 FROM t1 WHERE 1 >
ALL((SELECT 1 FROM t1 JOIN t1 a
ON (MATCH(t1.f1) against (""))
WHERE t1.f1 GROUP BY t1.f1))';
EXECUTE stmt;
1
1
EXECUTE stmt;
1
1
DEALLOCATE PREPARE stmt;
DROP TABLE t1;
End of 5.1 tests
mysql-test/t/fulltext.test
View file @
c77992cd
...
...
@@ -594,4 +594,41 @@ REPAIR TABLE t1;
SET
myisam_sort_buffer_size
=@@
global
.
myisam_sort_buffer_size
;
DROP
TABLE
t1
;
--
echo
#
--
echo
# Bug#54484 explain + prepared statement: crash and Got error -1 from storage engine
--
echo
#
CREATE
TABLE
t1
(
f1
VARCHAR
(
6
)
NOT
NULL
,
FULLTEXT
KEY
(
f1
),
UNIQUE
(
f1
));
INSERT
INTO
t1
VALUES
(
'test'
);
--
disable_warnings
SELECT
1
FROM
t1
WHERE
1
>
ALL
((
SELECT
1
FROM
t1
JOIN
t1
a
ON
(
MATCH
(
t1
.
f1
)
against
(
""
))
WHERE
t1
.
f1
GROUP
BY
t1
.
f1
))
xor
f1
;
PREPARE
stmt
FROM
'SELECT 1 FROM t1 WHERE 1 >
ALL((SELECT 1 FROM t1 RIGHT OUTER JOIN t1 a
ON (MATCH(t1.f1) against (""))
WHERE t1.f1 GROUP BY t1.f1)) xor f1'
;
EXECUTE
stmt
;
EXECUTE
stmt
;
DEALLOCATE
PREPARE
stmt
;
PREPARE
stmt
FROM
'SELECT 1 FROM t1 WHERE 1 >
ALL((SELECT 1 FROM t1 JOIN t1 a
ON (MATCH(t1.f1) against (""))
WHERE t1.f1 GROUP BY t1.f1))'
;
EXECUTE
stmt
;
EXECUTE
stmt
;
DEALLOCATE
PREPARE
stmt
;
--
enable_warnings
DROP
TABLE
t1
;
--
echo
End
of
5.1
tests
mysys/my_symlink.c
View file @
c77992cd
...
...
@@ -113,7 +113,6 @@ int my_is_symlink(const char *filename __attribute__((unused)))
#endif
}
/*
Resolve all symbolic links in path
'to' may be equal to 'filename'
...
...
@@ -146,8 +145,24 @@ int my_realpath(char *to, const char *filename,
result
=
-
1
;
}
DBUG_RETURN
(
result
);
#else
#ifdef _WIN32
int
ret
=
GetFullPathName
(
filename
,
FN_REFLEN
,
to
,
NULL
);
if
(
ret
==
0
||
ret
>
FN_REFLEN
)
{
if
(
ret
>
FN_REFLEN
)
my_errno
=
ENAMETOOLONG
;
else
my_errno
=
EACCES
;
if
(
MyFlags
&
MY_WME
)
my_error
(
EE_REALPATH
,
MYF
(
0
),
filename
,
my_errno
);
return
-
1
;
}
#else
my_load_path
(
to
,
filename
,
NullS
);
#endif
return
0
;
#endif
}
sql/item_func.cc
View file @
c77992cd
...
...
@@ -5677,7 +5677,17 @@ void Item_func_match::init_search(bool no_order)
/* Check if init_search() has been called before */
if
(
ft_handler
)
{
/*
We should reset ft_handler as it is cleaned up
on destruction of FT_SELECT object
(necessary in case of re-execution of subquery).
TODO: FT_SELECT should not clean up ft_handler.
*/
if
(
join_key
)
table
->
file
->
ft_handler
=
ft_handler
;
DBUG_VOID_RETURN
;
}
if
(
key
==
NO_SUCH_KEY
)
{
...
...
sql/item_func.h
View file @
c77992cd
...
...
@@ -1595,7 +1595,7 @@ public:
join_key
(
0
),
ft_handler
(
0
),
table
(
0
),
master
(
0
),
concat_ws
(
0
)
{
}
void
cleanup
()
{
DBUG_ENTER
(
"Item_func_match"
);
DBUG_ENTER
(
"Item_func_match
::cleanup
"
);
Item_real_func
::
cleanup
();
if
(
!
master
&&
ft_handler
)
ft_handler
->
please
->
close_search
(
ft_handler
);
...
...
sql/sql_select.cc
View file @
c77992cd
...
...
@@ -1754,6 +1754,9 @@ JOIN::reinit()
func
->
clear
();
}
if
(
!
(
select_options
&
SELECT_DESCRIBE
))
init_ftfuncs
(
thd
,
select_lex
,
test
(
order
));
DBUG_RETURN
(
0
);
}
...
...
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