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
fad69f17
Commit
fad69f17
authored
Aug 20, 2008
by
Sergey Glukhov
Browse files
Options
Browse Files
Download
Plain Diff
5.0-bugteam->5.1-bugteam merge
parents
b9bfa25f
de73b729
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
51 additions
and
7 deletions
+51
-7
mysql-test/r/metadata.result
mysql-test/r/metadata.result
+5
-5
mysql-test/r/sp.result
mysql-test/r/sp.result
+16
-0
mysql-test/t/sp.test
mysql-test/t/sp.test
+24
-0
sql/item.cc
sql/item.cc
+4
-0
tests/mysql_client_test.c
tests/mysql_client_test.c
+2
-2
No files found.
mysql-test/r/metadata.result
View file @
fad69f17
...
...
@@ -108,11 +108,11 @@ id
1
select * from v1 group by id limit 0;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
def test
t
1 v1 id id 3 10 0 Y 32768 0 63
def test
v
1 v1 id id 3 10 0 Y 32768 0 63
id
select * from v1 where id=1000 group by id;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
def test
t
1 v1 id id 3 10 0 Y 32768 0 63
def test
v
1 v1 id id 3 10 0 Y 32768 0 63
id
select * from v1 where id=1 group by id;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
...
...
@@ -126,7 +126,7 @@ renamed
1
select * from v3 where renamed=1 group by renamed;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
def
v3
renamed 8 12 0 Y 32896 0 63
def
v3 v3 renamed
renamed 8 12 0 Y 32896 0 63
renamed
drop table t1;
drop view v1,v2,v3;
...
...
@@ -156,8 +156,8 @@ c1
3
SELECT v1.c1, v2.c2 FROM v1 JOIN v2 ON c1=c2;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
def test
t
1 v1 c1 c1 254 1 1 Y 0 0 8
def test
t
2 v2 c2 c2 254 1 1 Y 0 0 8
def test
v
1 v1 c1 c1 254 1 1 Y 0 0 8
def test
v
2 v2 c2 c2 254 1 1 Y 0 0 8
c1 c2
1 1
2 2
...
...
mysql-test/r/sp.result
View file @
fad69f17
...
...
@@ -6820,6 +6820,22 @@ ttt
2
drop function func30787;
drop table t1;
create table t1(c1 INT);
create function f1(p1 int) returns varchar(32)
return 'aaa';
create view v1 as select f1(c1) as parent_control_name from t1;
create procedure p1()
begin
select parent_control_name as c1 from v1;
end //
call p1();
c1
call p1();
c1
drop procedure p1;
drop function f1;
drop view v1;
drop table t1;
# ------------------------------------------------------------------
# -- End of 5.0 tests
# ------------------------------------------------------------------
...
...
mysql-test/t/sp.test
View file @
fad69f17
...
...
@@ -7999,6 +7999,30 @@ drop table t1;
###########################################################################
#
# Bug#38291 memory corruption and server crash with view/sp/function
#
create
table
t1
(
c1
INT
);
create
function
f1
(
p1
int
)
returns
varchar
(
32
)
return
'aaa'
;
create
view
v1
as
select
f1
(
c1
)
as
parent_control_name
from
t1
;
delimiter
//;
create
procedure
p1
()
begin
select
parent_control_name
as
c1
from
v1
;
end
//
delimiter
;
//
call
p1
();
call
p1
();
drop
procedure
p1
;
drop
function
f1
;
drop
view
v1
;
drop
table
t1
;
--
echo
# ------------------------------------------------------------------
--
echo
# -- End of 5.0 tests
--
echo
# ------------------------------------------------------------------
...
...
sql/item.cc
View file @
fad69f17
...
...
@@ -5930,6 +5930,10 @@ void Item_ref::make_field(Send_field *field)
field
->
table_name
=
table_name
;
if
(
db_name
)
field
->
db_name
=
db_name
;
if
(
orig_field_name
)
field
->
org_col_name
=
orig_field_name
;
if
(
orig_table_name
)
field
->
org_table_name
=
orig_table_name
;
}
...
...
tests/mysql_client_test.c
View file @
fad69f17
...
...
@@ -16233,7 +16233,7 @@ static void test_bug32265()
metadata
=
mysql_stmt_result_metadata
(
stmt
);
field
=
mysql_fetch_field
(
metadata
);
DIE_UNLESS
(
strcmp
(
field
->
table
,
"v1"
)
==
0
);
DIE_UNLESS
(
strcmp
(
field
->
org_table
,
"
t
1"
)
==
0
);
DIE_UNLESS
(
strcmp
(
field
->
org_table
,
"
v
1"
)
==
0
);
DIE_UNLESS
(
strcmp
(
field
->
db
,
"client_test_db"
)
==
0
);
mysql_free_result
(
metadata
);
mysql_stmt_close
(
stmt
);
...
...
@@ -16245,7 +16245,7 @@ static void test_bug32265()
metadata
=
mysql_stmt_result_metadata
(
stmt
);
field
=
mysql_fetch_field
(
metadata
);
DIE_UNLESS
(
strcmp
(
field
->
table
,
"v1"
)
==
0
);
DIE_UNLESS
(
strcmp
(
field
->
org_table
,
"
t
1"
)
==
0
);
DIE_UNLESS
(
strcmp
(
field
->
org_table
,
"
v
1"
)
==
0
);
DIE_UNLESS
(
strcmp
(
field
->
db
,
"client_test_db"
)
==
0
);
mysql_free_result
(
metadata
);
mysql_stmt_close
(
stmt
);
...
...
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