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
ee9ee8f4
Commit
ee9ee8f4
authored
Mar 14, 2008
by
istruewing@stella.local
Browse files
Options
Browse Files
Download
Plain Diff
Merge stella.local:/home2/mydev/mysql-5.0-axmrg
into stella.local:/home2/mydev/mysql-5.1-axmrg
parents
397c1783
21e2a000
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
42 additions
and
1 deletion
+42
-1
mysql-test/r/merge.result
mysql-test/r/merge.result
+22
-0
mysql-test/t/merge.test
mysql-test/t/merge.test
+13
-0
sql/sql_yacc.yy
sql/sql_yacc.yy
+1
-1
storage/myisammrg/ha_myisammrg.cc
storage/myisammrg/ha_myisammrg.cc
+6
-0
No files found.
mysql-test/r/merge.result
View file @
ee9ee8f4
...
@@ -964,6 +964,28 @@ id ref
...
@@ -964,6 +964,28 @@ id ref
3 2
3 2
4 5
4 5
DROP TABLE t1, t2, t3;
DROP TABLE t1, t2, t3;
CREATE TABLE t1(a INT);
CREATE TABLE m1(a INT) ENGINE=MERGE;
SHOW CREATE TABLE m1;
Table Create Table
m1 CREATE TABLE `m1` (
`a` int(11) default NULL
) ENGINE=MRG_MyISAM DEFAULT CHARSET=latin1
DROP TABLE m1;
CREATE TABLE m1(a INT) ENGINE=MERGE UNION=();
SHOW CREATE TABLE m1;
Table Create Table
m1 CREATE TABLE `m1` (
`a` int(11) default NULL
) ENGINE=MRG_MyISAM DEFAULT CHARSET=latin1
ALTER TABLE m1 UNION=(t1);
ALTER TABLE m1 UNION=();
SHOW CREATE TABLE m1;
Table Create Table
m1 CREATE TABLE `m1` (
`a` int(11) default NULL
) ENGINE=MRG_MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1, m1;
End of 5.0 tests
End of 5.0 tests
create table t1 (c1 int, index(c1));
create table t1 (c1 int, index(c1));
create table t2 (c1 int, index(c1)) engine=merge union=(t1);
create table t2 (c1 int, index(c1)) engine=merge union=(t1);
...
...
mysql-test/t/merge.test
View file @
ee9ee8f4
...
@@ -599,6 +599,19 @@ SELECT * FROM t3;
...
@@ -599,6 +599,19 @@ SELECT * FROM t3;
DROP
TABLE
t1
,
t2
,
t3
;
DROP
TABLE
t1
,
t2
,
t3
;
#
# BUG#28248 - mysqldump results with MERGE ... UNION=() cannot be executed
#
CREATE
TABLE
t1
(
a
INT
);
CREATE
TABLE
m1
(
a
INT
)
ENGINE
=
MERGE
;
SHOW
CREATE
TABLE
m1
;
DROP
TABLE
m1
;
CREATE
TABLE
m1
(
a
INT
)
ENGINE
=
MERGE
UNION
=
();
SHOW
CREATE
TABLE
m1
;
ALTER
TABLE
m1
UNION
=
(
t1
);
ALTER
TABLE
m1
UNION
=
();
SHOW
CREATE
TABLE
m1
;
DROP
TABLE
t1
,
m1
;
--
echo
End
of
5.0
tests
--
echo
End
of
5.0
tests
...
...
sql/sql_yacc.yy
View file @
ee9ee8f4
...
@@ -4357,7 +4357,7 @@ create_table_option:
...
@@ -4357,7 +4357,7 @@ create_table_option:
Lex->create_info.row_type= $3;
Lex->create_info.row_type= $3;
Lex->create_info.used_fields|= HA_CREATE_USED_ROW_FORMAT;
Lex->create_info.used_fields|= HA_CREATE_USED_ROW_FORMAT;
}
}
| UNION_SYM opt_equal '(' table_list ')'
| UNION_SYM opt_equal '('
opt_
table_list ')'
{
{
/* Move the union list to the merge_list */
/* Move the union list to the merge_list */
LEX *lex=Lex;
LEX *lex=Lex;
...
...
storage/myisammrg/ha_myisammrg.cc
View file @
ee9ee8f4
...
@@ -1102,6 +1102,12 @@ void ha_myisammrg::append_create_info(String *packet)
...
@@ -1102,6 +1102,12 @@ void ha_myisammrg::append_create_info(String *packet)
packet
->
append
(
STRING_WITH_LEN
(
" INSERT_METHOD="
));
packet
->
append
(
STRING_WITH_LEN
(
" INSERT_METHOD="
));
packet
->
append
(
get_type
(
&
merge_insert_method
,
file
->
merge_insert_method
-
1
));
packet
->
append
(
get_type
(
&
merge_insert_method
,
file
->
merge_insert_method
-
1
));
}
}
/*
There is no sence adding UNION clause in case there is no underlying
tables specified.
*/
if
(
file
->
open_tables
==
file
->
end_table
)
return
;
packet
->
append
(
STRING_WITH_LEN
(
" UNION=("
));
packet
->
append
(
STRING_WITH_LEN
(
" UNION=("
));
current_db
=
table
->
s
->
db
.
str
;
current_db
=
table
->
s
->
db
.
str
;
...
...
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