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
3818bbb0
Commit
3818bbb0
authored
Dec 21, 2014
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adding mariadb-version on the view creation to view frm. (MDEV-6916 followup)
parent
260727ad
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
1 deletion
+18
-1
mysql-test/r/view.result
mysql-test/r/view.result
+2
-0
mysql-test/t/view.test
mysql-test/t/view.test
+10
-0
sql/sql_view.cc
sql/sql_view.cc
+5
-1
sql/table.h
sql/table.h
+1
-0
No files found.
mysql-test/r/view.result
View file @
3818bbb0
...
...
@@ -5396,6 +5396,8 @@ SELECT `f1`(1);
DROP FUNCTION f1;
DROP VIEW v1;
DROP TABLE t1, t2;
create view v1 as select 1;
drop view v1;
# -----------------------------------------------------------------
# -- End of 5.5 tests.
# -----------------------------------------------------------------
...
...
mysql-test/t/view.test
View file @
3818bbb0
...
...
@@ -5335,6 +5335,16 @@ DROP FUNCTION f1;
DROP VIEW v1;
DROP TABLE t1, t2;
create view v1 as select 1;
--let $MYSQLD_DATADIR= `
select
@@
datadir
`
--
let
SEARCH_FILE
=
$MYSQLD_DATADIR
/
test
/
v1
.
frm
--
let
SEARCH_PATTERN
=
mariadb
-
version
--
source
include
/
search_pattern_in_file
.
inc
drop
view
v1
;
--
echo
# -----------------------------------------------------------------
--
echo
# -- End of 5.5 tests.
--
echo
# -----------------------------------------------------------------
...
...
sql/sql_view.cc
View file @
3818bbb0
...
...
@@ -730,7 +730,7 @@ bool mysql_create_view(THD *thd, TABLE_LIST *views,
/* number of required parameters for making view */
static
const
int
required_view_parameters
=
1
4
;
static
const
int
required_view_parameters
=
1
5
;
/*
table of VIEW .frm field descriptors
...
...
@@ -781,6 +781,9 @@ static File_option view_parameters[]=
{{(
char
*
)
STRING_WITH_LEN
(
"view_body_utf8"
)},
my_offsetof
(
TABLE_LIST
,
view_body_utf8
),
FILE_OPTIONS_ESTRING
},
{{
C_STRING_WITH_LEN
(
"mariadb-version"
)},
my_offsetof
(
TABLE_LIST
,
mariadb_version
),
FILE_OPTIONS_ULONGLONG
},
{{
NullS
,
0
},
0
,
FILE_OPTIONS_STRING
}
};
...
...
@@ -877,6 +880,7 @@ static int mysql_register_view(THD *thd, TABLE_LIST *view,
}
view
->
file_version
=
1
;
view
->
mariadb_version
=
MYSQL_VERSION_ID
;
view
->
calc_md5
(
md5
);
if
(
!
(
view
->
md5
.
str
=
(
char
*
)
thd
->
memdup
(
md5
,
32
)))
{
...
...
sql/table.h
View file @
3818bbb0
...
...
@@ -1807,6 +1807,7 @@ struct TABLE_LIST
LEX_STRING
timestamp
;
/* GMT time stamp of last operation */
st_lex_user
definer
;
/* definer of view */
ulonglong
file_version
;
/* version of file's field set */
ulonglong
mariadb_version
;
/* version of server on creation */
ulonglong
updatable_view
;
/* VIEW can be updated */
/**
@brief The declared algorithm, if this is a view.
...
...
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