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
42827536
Commit
42827536
authored
Jan 19, 2007
by
evgen@moonbone.local
Browse files
Options
Browse Files
Download
Plain Diff
Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into moonbone.local:/work/25172-bug-5.0-opt-mysql
parents
3c814f22
d7d5db64
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
30 additions
and
7 deletions
+30
-7
mysql-test/r/select.result
mysql-test/r/select.result
+8
-0
mysql-test/t/select.test
mysql-test/t/select.test
+11
-0
sql/sql_delete.cc
sql/sql_delete.cc
+1
-1
sql/sql_select.cc
sql/sql_select.cc
+8
-4
sql/sql_table.cc
sql/sql_table.cc
+1
-1
sql/sql_update.cc
sql/sql_update.cc
+1
-1
No files found.
mysql-test/r/select.result
View file @
42827536
...
...
@@ -3611,3 +3611,11 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 range si,ai si 5 NULL 2 Using where
1 SIMPLE t3 eq_ref PRIMARY,ci PRIMARY 4 test.t2.a 1 Using where
DROP TABLE t1,t2,t3;
CREATE TABLE t1 ( f1 int primary key, f2 int, f3 int, f4 int, f5 int, f6 int, checked_out int);
CREATE TABLE t2 ( f11 int PRIMARY KEY );
INSERT INTO t1 VALUES (1,1,1,0,0,0,0),(2,1,1,3,8,1,0),(3,1,1,4,12,1,0);
INSERT INTO t2 VALUES (62);
SELECT * FROM t1 LEFT JOIN t2 ON f11 = t1.checked_out GROUP BY f1 ORDER BY f2, f3, f4, f5 LIMIT 0, 1;
f1 f2 f3 f4 f5 f6 checked_out f11
1 1 1 0 0 0 0 NULL
DROP TABLE t1, t2;
mysql-test/t/select.test
View file @
42827536
...
...
@@ -3092,3 +3092,14 @@ SELECT t3.a FROM t1,t2,t3
t3
.
c
IN
(
'bb'
,
'ee'
);
DROP
TABLE
t1
,
t2
,
t3
;
#
# Bug#25172: Not checked buffer size leads to a server crash
#
CREATE
TABLE
t1
(
f1
int
primary
key
,
f2
int
,
f3
int
,
f4
int
,
f5
int
,
f6
int
,
checked_out
int
);
CREATE
TABLE
t2
(
f11
int
PRIMARY
KEY
);
INSERT
INTO
t1
VALUES
(
1
,
1
,
1
,
0
,
0
,
0
,
0
),(
2
,
1
,
1
,
3
,
8
,
1
,
0
),(
3
,
1
,
1
,
4
,
12
,
1
,
0
);
INSERT
INTO
t2
VALUES
(
62
);
SELECT
*
FROM
t1
LEFT
JOIN
t2
ON
f11
=
t1
.
checked_out
GROUP
BY
f1
ORDER
BY
f2
,
f3
,
f4
,
f5
LIMIT
0
,
1
;
DROP
TABLE
t1
,
t2
;
sql/sql_delete.cc
View file @
42827536
...
...
@@ -142,7 +142,7 @@ bool mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds,
if
(
order
&&
order
->
elements
)
{
uint
length
;
uint
length
=
0
;
SORT_FIELD
*
sortorder
;
TABLE_LIST
tables
;
List
<
Item
>
fields
;
...
...
sql/sql_select.cc
View file @
42827536
...
...
@@ -12262,7 +12262,7 @@ static int
create_sort_index
(
THD
*
thd
,
JOIN
*
join
,
ORDER
*
order
,
ha_rows
filesort_limit
,
ha_rows
select_limit
)
{
uint
length
;
uint
length
=
0
;
ha_rows
examined_rows
;
TABLE
*
table
;
SQL_SELECT
*
select
;
...
...
@@ -12283,8 +12283,10 @@ create_sort_index(THD *thd, JOIN *join, ORDER *order,
!
(
join
->
select_options
&
SELECT_BIG_RESULT
))
&&
test_if_skip_sort_order
(
tab
,
order
,
select_limit
,
0
))
DBUG_RETURN
(
0
);
for
(
ORDER
*
ord
=
join
->
order
;
ord
;
ord
=
ord
->
next
)
length
++
;
if
(
!
(
join
->
sortorder
=
make_unireg_sortorder
(
order
,
&
length
,
join
->
sortorder
)))
make_unireg_sortorder
(
order
,
&
length
,
join
->
sortorder
)))
goto
err
;
/* purecov: inspected */
table
->
sort
.
io_cache
=
(
IO_CACHE
*
)
my_malloc
(
sizeof
(
IO_CACHE
),
...
...
@@ -12690,8 +12692,10 @@ SORT_FIELD *make_unireg_sortorder(ORDER *order, uint *length,
for
(
ORDER
*
tmp
=
order
;
tmp
;
tmp
=
tmp
->
next
)
count
++
;
if
(
!
sortorder
)
sortorder
=
(
SORT_FIELD
*
)
sql_alloc
(
sizeof
(
SORT_FIELD
)
*
(
count
+
1
));
pos
=
sort
=
sortorder
;
sortorder
=
(
SORT_FIELD
*
)
sql_alloc
(
sizeof
(
SORT_FIELD
)
*
(
max
(
count
,
*
length
)
+
1
));
pos
=
sort
=
sortorder
;
if
(
!
pos
)
return
0
;
...
...
sql/sql_table.cc
View file @
42827536
...
...
@@ -3883,7 +3883,7 @@ copy_data_between_tables(TABLE *from,TABLE *to,
Copy_field
*
copy
,
*
copy_end
;
ulong
found_count
,
delete_count
;
THD
*
thd
=
current_thd
;
uint
length
;
uint
length
=
0
;
SORT_FIELD
*
sortorder
;
READ_RECORD
info
;
TABLE_LIST
tables
;
...
...
sql/sql_update.cc
View file @
42827536
...
...
@@ -304,7 +304,7 @@ int mysql_update(THD *thd,
Doing an ORDER BY; Let filesort find and sort the rows we are going
to update
*/
uint
length
;
uint
length
=
0
;
SORT_FIELD
*
sortorder
;
ha_rows
examined_rows
;
...
...
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