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
9b1d5b6f
Commit
9b1d5b6f
authored
Oct 12, 2002
by
monty@hundin.mysql.fi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed bug where we could reference a freed tmp_table->table_name variable for some
GROUP BY ... ORDER BY queries.
parent
adf7809c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
1 deletion
+12
-1
Docs/manual.texi
Docs/manual.texi
+6
-0
sql/sql_select.cc
sql/sql_select.cc
+6
-1
No files found.
Docs/manual.texi
View file @
9b1d5b6f
...
@@ -46928,6 +46928,12 @@ not yet 100% confident in this code.
...
@@ -46928,6 +46928,12 @@ not yet 100% confident in this code.
@node News-3.23.54, News-3.23.53, News-3.23.x, News-3.23.x
@node News-3.23.54, News-3.23.53, News-3.23.x, News-3.23.x
@appendixsubsec Changes in release 3.23.54
@appendixsubsec Changes in release 3.23.54
@itemize
Fixed reference to freed memory when doing complicated @code{GROUP BY
... ORDER BY} queries. Symptom was that @code{mysqld} died in function
@code{send_fields}.
queries.
@end itemize
@node News-3.23.53, News-3.23.52, News-3.23.54, News-3.23.x
@node News-3.23.53, News-3.23.52, News-3.23.54, News-3.23.x
@appendixsubsec Changes in release 3.23.53
@appendixsubsec Changes in release 3.23.53
sql/sql_select.cc
View file @
9b1d5b6f
...
@@ -3395,7 +3395,10 @@ create_tmp_table(THD *thd,TMP_TABLE_PARAM *param,List<Item> &fields,
...
@@ -3395,7 +3395,10 @@ create_tmp_table(THD *thd,TMP_TABLE_PARAM *param,List<Item> &fields,
bzero
((
char
*
)
from_field
,
sizeof
(
Field
*
)
*
field_count
);
bzero
((
char
*
)
from_field
,
sizeof
(
Field
*
)
*
field_count
);
table
->
field
=
reg_field
;
table
->
field
=
reg_field
;
table
->
real_name
=
table
->
path
=
tmpname
;
table
->
real_name
=
table
->
path
=
tmpname
;
table
->
table_name
=
base_name
(
tmpname
);
/*
This must be "" as field may refer to it after tempory table is dropped
*/
table
->
table_name
=
(
char
*
)
""
;
table
->
reginfo
.
lock_type
=
TL_WRITE
;
/* Will be updated */
table
->
reginfo
.
lock_type
=
TL_WRITE
;
/* Will be updated */
table
->
db_stat
=
HA_OPEN_KEYFILE
+
HA_OPEN_RNDFILE
;
table
->
db_stat
=
HA_OPEN_KEYFILE
+
HA_OPEN_RNDFILE
;
table
->
blob_ptr_size
=
mi_portable_sizeof_char_ptr
;
table
->
blob_ptr_size
=
mi_portable_sizeof_char_ptr
;
...
@@ -3731,6 +3734,8 @@ create_tmp_table(THD *thd,TMP_TABLE_PARAM *param,List<Item> &fields,
...
@@ -3731,6 +3734,8 @@ create_tmp_table(THD *thd,TMP_TABLE_PARAM *param,List<Item> &fields,
if
(
create_myisam_tmp_table
(
table
,
param
,
select_options
))
if
(
create_myisam_tmp_table
(
table
,
param
,
select_options
))
goto
err
;
goto
err
;
}
}
/* Set table_name for easier debugging */
table
->
table_name
=
base_name
(
tmpname
);
if
(
!
open_tmp_table
(
table
))
if
(
!
open_tmp_table
(
table
))
DBUG_RETURN
(
table
);
DBUG_RETURN
(
table
);
...
...
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