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
2905b2fe
Commit
2905b2fe
authored
Apr 10, 2016
by
Sergei Petrunia
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Window functions: return error if aggregate is not supported as window functions
parent
29705a4d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
1 deletion
+23
-1
mysql-test/r/win.result
mysql-test/r/win.result
+10
-0
mysql-test/t/win.test
mysql-test/t/win.test
+11
-0
sql/sql_window.cc
sql/sql_window.cc
+2
-1
No files found.
mysql-test/r/win.result
View file @
2905b2fe
...
...
@@ -1831,3 +1831,13 @@ rank() over (order by b)
0
0
drop table t1;
#
# MDEV-9894: Assertion `0' failed in Window_func_runner::setup
# return ER_NOT_SUPPORTED_YET for aggregates that are not yet supported
# as window functions.
#
create table t1 (i int);
insert into t1 values (1),(2);
SELECT MAX(i) OVER (PARTITION BY (i)) FROM t1;
ERROR 42000: This version of MariaDB doesn't yet support 'This aggregate as window function'
drop table t1;
mysql-test/t/win.test
View file @
2905b2fe
...
...
@@ -1113,3 +1113,14 @@ from
drop
table
t1
;
--
echo
#
--
echo
# MDEV-9894: Assertion `0' failed in Window_func_runner::setup
--
echo
# return ER_NOT_SUPPORTED_YET for aggregates that are not yet supported
--
echo
# as window functions.
--
echo
#
create
table
t1
(
i
int
);
insert
into
t1
values
(
1
),(
2
);
--
error
ER_NOT_SUPPORTED_YET
SELECT
MAX
(
i
)
OVER
(
PARTITION
BY
(
i
))
FROM
t1
;
drop
table
t1
;
sql/sql_window.cc
View file @
2905b2fe
...
...
@@ -1766,7 +1766,8 @@ bool Window_func_runner::setup(THD *thd)
break
;
}
default:
DBUG_ASSERT
(
0
);
my_error
(
ER_NOT_SUPPORTED_YET
,
MYF
(
0
),
"This aggregate as window function"
);
return
true
;
}
return
false
;
...
...
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