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
04e6f472
Commit
04e6f472
authored
Jun 28, 2005
by
igor@rurik.mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge rurik.mysql.com:/home/igor/mysql-4.1
into rurik.mysql.com:/home/igor/dev/mysql-4.1-0
parents
42bb0eaf
be1478f6
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
2 deletions
+21
-2
mysql-test/r/group_by.result
mysql-test/r/group_by.result
+6
-0
mysql-test/t/group_by.test
mysql-test/t/group_by.test
+12
-0
sql/sql_select.cc
sql/sql_select.cc
+3
-2
No files found.
mysql-test/r/group_by.result
View file @
04e6f472
...
@@ -751,3 +751,9 @@ COUNT(DISTINCT(t1.id)) err_comment
...
@@ -751,3 +751,9 @@ COUNT(DISTINCT(t1.id)) err_comment
1 NULL
1 NULL
1 a problem
1 a problem
DROP TABLE t1, t2;
DROP TABLE t1, t2;
CREATE TABLE t1 (n int);
INSERT INTO t1 VALUES (1);
SELECT n+1 AS n FROM t1 GROUP BY n;
n
2
DROP TABLE t1;
mysql-test/t/group_by.test
View file @
04e6f472
...
@@ -580,3 +580,15 @@ SELECT COUNT(DISTINCT(t1.id)), LEFT(err_comment, 256) AS err_comment
...
@@ -580,3 +580,15 @@ SELECT COUNT(DISTINCT(t1.id)), LEFT(err_comment, 256) AS err_comment
FROM
t1
LEFT
JOIN
t2
ON
t1
.
id
=
t2
.
id
GROUP
BY
err_comment
;
FROM
t1
LEFT
JOIN
t2
ON
t1
.
id
=
t2
.
id
GROUP
BY
err_comment
;
DROP
TABLE
t1
,
t2
;
DROP
TABLE
t1
,
t2
;
#
# Test for bug #11414: crash on Windows for a simple GROUP BY query
#
CREATE
TABLE
t1
(
n
int
);
INSERT
INTO
t1
VALUES
(
1
);
SELECT
n
+
1
AS
n
FROM
t1
GROUP
BY
n
;
DROP
TABLE
t1
;
sql/sql_select.cc
View file @
04e6f472
...
@@ -8725,7 +8725,7 @@ setup_copy_fields(THD *thd, TMP_TABLE_PARAM *param,
...
@@ -8725,7 +8725,7 @@ setup_copy_fields(THD *thd, TMP_TABLE_PARAM *param,
{
{
Item
*
pos
;
Item
*
pos
;
List_iterator_fast
<
Item
>
li
(
all_fields
);
List_iterator_fast
<
Item
>
li
(
all_fields
);
Copy_field
*
copy
;
Copy_field
*
copy
=
NULL
;
res_selected_fields
.
empty
();
res_selected_fields
.
empty
();
res_all_fields
.
empty
();
res_all_fields
.
empty
();
List_iterator_fast
<
Item
>
itr
(
res_all_fields
);
List_iterator_fast
<
Item
>
itr
(
res_all_fields
);
...
@@ -8733,7 +8733,8 @@ setup_copy_fields(THD *thd, TMP_TABLE_PARAM *param,
...
@@ -8733,7 +8733,8 @@ setup_copy_fields(THD *thd, TMP_TABLE_PARAM *param,
uint
i
,
border
=
all_fields
.
elements
-
elements
;
uint
i
,
border
=
all_fields
.
elements
-
elements
;
DBUG_ENTER
(
"setup_copy_fields"
);
DBUG_ENTER
(
"setup_copy_fields"
);
if
(
!
(
copy
=
param
->
copy_field
=
new
Copy_field
[
param
->
field_count
]))
if
(
param
->
field_count
&&
!
(
copy
=
param
->
copy_field
=
new
Copy_field
[
param
->
field_count
]))
goto
err2
;
goto
err2
;
param
->
copy_funcs
.
empty
();
param
->
copy_funcs
.
empty
();
...
...
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