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
67dd8dce
Commit
67dd8dce
authored
Jul 26, 2006
by
gkodinov/kgeorge@rakia.(none)
Browse files
Options
Browse Files
Download
Plain Diff
Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into rakia.(none):/home/kgeorge/mysql/autopush/B21086-5.0-opt
parents
0a84eb5f
f5b0dd6a
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
40 additions
and
3 deletions
+40
-3
mysql-test/r/view.result
mysql-test/r/view.result
+13
-0
mysql-test/t/view.test
mysql-test/t/view.test
+19
-0
sql/item_strfunc.h
sql/item_strfunc.h
+1
-1
sql/sql_base.cc
sql/sql_base.cc
+7
-2
No files found.
mysql-test/r/view.result
View file @
67dd8dce
...
...
@@ -2807,3 +2807,16 @@ yadda
yad
DROP VIEW v1;
DROP TABLE t1;
CREATE TABLE t1 (s1 char);
INSERT INTO t1 VALUES ('Z');
CREATE VIEW v1 AS SELECT s1 collate latin1_german1_ci AS col FROM t1;
CREATE VIEW v2 (col) AS SELECT s1 collate latin1_german1_ci FROM t1;
INSERT INTO v1 (col) VALUES ('b');
INSERT INTO v2 (col) VALUES ('c');
SELECT s1 FROM t1;
s1
Z
b
c
DROP VIEW v1, v2;
DROP TABLE t1;
mysql-test/t/view.test
View file @
67dd8dce
...
...
@@ -2667,3 +2667,22 @@ SELECT * FROM v1;
DROP
VIEW
v1
;
DROP
TABLE
t1
;
#
# Bug #21086: server crashes when VIEW defined with a SELECT with COLLATE
# clause is called
#
CREATE
TABLE
t1
(
s1
char
);
INSERT
INTO
t1
VALUES
(
'Z'
);
CREATE
VIEW
v1
AS
SELECT
s1
collate
latin1_german1_ci
AS
col
FROM
t1
;
CREATE
VIEW
v2
(
col
)
AS
SELECT
s1
collate
latin1_german1_ci
FROM
t1
;
# either of these statements will cause crash
INSERT
INTO
v1
(
col
)
VALUES
(
'b'
);
INSERT
INTO
v2
(
col
)
VALUES
(
'c'
);
SELECT
s1
FROM
t1
;
DROP
VIEW
v1
,
v2
;
DROP
TABLE
t1
;
sql/item_strfunc.h
View file @
67dd8dce
...
...
@@ -728,7 +728,7 @@ public:
void
fix_length_and_dec
();
bool
eq
(
const
Item
*
item
,
bool
binary_cmp
)
const
;
const
char
*
func_name
()
const
{
return
"collate"
;
}
enum
Functype
func
_
type
()
const
{
return
COLLATE_FUNC
;
}
enum
Functype
functype
()
const
{
return
COLLATE_FUNC
;
}
void
print
(
String
*
str
);
Item_field
*
filed_for_view_update
()
{
...
...
sql/sql_base.cc
View file @
67dd8dce
...
...
@@ -4959,12 +4959,17 @@ fill_record(THD * thd, List<Item> &fields, List<Item> &values,
bool
ignore_errors
)
{
List_iterator_fast
<
Item
>
f
(
fields
),
v
(
values
);
Item
*
value
;
Item
*
value
,
*
fld
;
Item_field
*
field
;
DBUG_ENTER
(
"fill_record"
);
while
((
field
=
(
Item_field
*
)
f
++
))
while
((
fld
=
f
++
))
{
if
(
!
(
field
=
fld
->
filed_for_view_update
()))
{
my_error
(
ER_NONUPDATEABLE_COLUMN
,
MYF
(
0
),
fld
->
name
);
DBUG_RETURN
(
TRUE
);
}
value
=
v
++
;
Field
*
rfield
=
field
->
field
;
TABLE
*
table
=
rfield
->
table
;
...
...
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