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
8f4c5254
Commit
8f4c5254
authored
Jul 05, 2005
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
merge
sql/item_sum.h: Auto merged
parents
c6c905f7
7565403e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
1 deletion
+18
-1
mysql-test/r/view.result
mysql-test/r/view.result
+7
-0
mysql-test/t/view.test
mysql-test/t/view.test
+9
-0
sql/item_sum.h
sql/item_sum.h
+2
-1
No files found.
mysql-test/r/view.result
View file @
8f4c5254
...
...
@@ -1850,6 +1850,13 @@ SELECT * FROM v1;
SUBSTRING_INDEX("dkjhgd:kjhdjh", ":", 1)
dkjhgd
drop view v1;
create table t1 (s1 int);
create view v1 as select var_samp(s1) from t1;
show create view v1;
View Create View
v1 CREATE ALGORITHM=UNDEFINED VIEW `test`.`v1` AS select var_samp(`test`.`t1`.`s1`) AS `var_samp(s1)` from `test`.`t1`
drop view v1;
drop table t1;
set sql_mode='strict_all_tables';
CREATE TABLE t1 (col1 INT NOT NULL, col2 INT NOT NULL) ENGINE = INNODB;
CREATE VIEW v1 (vcol1) AS SELECT col1 FROM t1;
...
...
mysql-test/t/view.test
View file @
8f4c5254
...
...
@@ -1697,6 +1697,15 @@ CREATE VIEW v1 AS SELECT SUBSTRING_INDEX("dkjhgd:kjhdjh", ":", 1);
SELECT
*
FROM
v1
;
drop
view
v1
;
#
# Using var_samp with view (BUG#10651)
#
create
table
t1
(
s1
int
);
create
view
v1
as
select
var_samp
(
s1
)
from
t1
;
show
create
view
v1
;
drop
view
v1
;
drop
table
t1
;
#
# Correct inserting data check (absence of default value) for view
# underlying tables (BUG#6443)
...
...
sql/item_sum.h
View file @
8f4c5254
...
...
@@ -479,7 +479,8 @@ class Item_sum_variance : public Item_sum_num
Item
*
result_item
(
Field
*
field
)
{
return
new
Item_variance_field
(
this
);
}
void
no_rows_in_result
()
{}
const
char
*
func_name
()
const
{
return
"variance("
;
}
const
char
*
func_name
()
const
{
return
sample
?
"var_samp("
:
"variance("
;
}
Item
*
copy_or_same
(
THD
*
thd
);
Field
*
create_tmp_field
(
bool
group
,
TABLE
*
table
,
uint
convert_blob_length
);
enum
Item_result
result_type
()
const
{
return
hybrid_type
;
}
...
...
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