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
988d263e
Commit
988d263e
authored
Feb 22, 2011
by
Michael Widenius
Browse files
Options
Browse Files
Download
Plain Diff
Merge with main
parents
1392eba6
9c10b73b
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
25 additions
and
4 deletions
+25
-4
mysql-test/suite/federated/federated_partition.result
mysql-test/suite/federated/federated_partition.result
+9
-0
mysql-test/suite/federated/federated_partition.test
mysql-test/suite/federated/federated_partition.test
+3
-0
sql/ha_partition.cc
sql/ha_partition.cc
+4
-3
sql/partition_element.h
sql/partition_element.h
+2
-0
sql/sql_partition.cc
sql/sql_partition.cc
+3
-0
unittest/mytap/tap.c
unittest/mytap/tap.c
+4
-1
No files found.
mysql-test/suite/federated/federated_partition.result
View file @
988d263e
...
@@ -9,6 +9,15 @@ partition by list (s1)
...
@@ -9,6 +9,15 @@ partition by list (s1)
connection='mysql://root@127.0.0.1:SLAVE_PORT/federated/t1_1',
connection='mysql://root@127.0.0.1:SLAVE_PORT/federated/t1_1',
partition p2 values in (2,4)
partition p2 values in (2,4)
connection='mysql://root@127.0.0.1:SLAVE_PORT/federated/t1_2');
connection='mysql://root@127.0.0.1:SLAVE_PORT/federated/t1_2');
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`s1` int(11) NOT NULL,
PRIMARY KEY (`s1`)
) ENGINE=FEDERATED DEFAULT CHARSET=latin1
/*!50100 PARTITION BY LIST (s1)
(PARTITION p1 VALUES IN (1,3) CONNECTION = 'mysql://root@127.0.0.1:SLAVE_PORT/federated/t1_1' ENGINE = FEDERATED,
PARTITION p2 VALUES IN (2,4) CONNECTION = 'mysql://root@127.0.0.1:SLAVE_PORT/federated/t1_2' ENGINE = FEDERATED) */
insert into t1 values (1), (2), (3), (4);
insert into t1 values (1), (2), (3), (4);
select * from t1;
select * from t1;
s1
s1
...
...
mysql-test/suite/federated/federated_partition.test
View file @
988d263e
...
@@ -30,6 +30,9 @@ eval create table t1 (s1 int primary key) engine=federated
...
@@ -30,6 +30,9 @@ eval create table t1 (s1 int primary key) engine=federated
partition
p2
values
in
(
2
,
4
)
partition
p2
values
in
(
2
,
4
)
connection
=
'mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/t1_2'
);
connection
=
'mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/t1_2'
);
--
replace_result
$SLAVE_MYPORT
SLAVE_PORT
show
create
table
t1
;
insert
into
t1
values
(
1
),
(
2
),
(
3
),
(
4
);
insert
into
t1
values
(
1
),
(
2
),
(
3
),
(
4
);
select
*
from
t1
;
select
*
from
t1
;
...
...
sql/ha_partition.cc
View file @
988d263e
...
@@ -2237,9 +2237,10 @@ bool ha_partition::create_handler_file(const char *name)
...
@@ -2237,9 +2237,10 @@ bool ha_partition::create_handler_file(const char *name)
part_elem
=
part_it
++
;
part_elem
=
part_it
++
;
uint
length
=
part_elem
->
connect_string
.
length
;
uint
length
=
part_elem
->
connect_string
.
length
;
int4store
(
buffer
,
length
);
int4store
(
buffer
,
length
);
result
=
(
my_write
(
file
,
buffer
,
4
,
MYF
(
MY_WME
|
MY_NABP
))
||
if
(
my_write
(
file
,
buffer
,
4
,
MYF
(
MY_WME
|
MY_NABP
))
||
my_write
(
file
,
(
uchar
*
)
part_elem
->
connect_string
.
str
,
length
,
my_write
(
file
,
(
uchar
*
)
part_elem
->
connect_string
.
str
,
length
,
MYF
(
MY_WME
|
MY_NABP
)));
MYF
(
MY_WME
|
MY_NABP
)))
result
=
TRUE
;
}
}
VOID
(
my_close
(
file
,
MYF
(
0
)));
VOID
(
my_close
(
file
,
MYF
(
0
)));
}
}
...
...
sql/partition_element.h
View file @
988d263e
...
@@ -98,6 +98,8 @@ class partition_element :public Sql_alloc {
...
@@ -98,6 +98,8 @@ class partition_element :public Sql_alloc {
nodegroup_id
(
part_elem
->
nodegroup_id
),
nodegroup_id
(
part_elem
->
nodegroup_id
),
has_null_value
(
FALSE
)
has_null_value
(
FALSE
)
{
{
connect_string
.
str
=
0
;
connect_string
.
length
=
0
;
}
}
~
partition_element
()
{}
~
partition_element
()
{}
};
};
sql/sql_partition.cc
View file @
988d263e
...
@@ -1983,6 +1983,9 @@ static int add_partition_options(File fptr, partition_element *p_elem)
...
@@ -1983,6 +1983,9 @@ static int add_partition_options(File fptr, partition_element *p_elem)
}
}
if
(
p_elem
->
part_comment
)
if
(
p_elem
->
part_comment
)
err
+=
add_keyword_string
(
fptr
,
"COMMENT"
,
TRUE
,
p_elem
->
part_comment
);
err
+=
add_keyword_string
(
fptr
,
"COMMENT"
,
TRUE
,
p_elem
->
part_comment
);
if
(
p_elem
->
connect_string
.
length
)
err
+=
add_keyword_string
(
fptr
,
"CONNECTION"
,
TRUE
,
p_elem
->
connect_string
.
str
);
return
err
+
add_engine
(
fptr
,
p_elem
->
engine_type
);
return
err
+
add_engine
(
fptr
,
p_elem
->
engine_type
);
}
}
...
...
unittest/mytap/tap.c
View file @
988d263e
...
@@ -126,7 +126,7 @@ emit_endl()
...
@@ -126,7 +126,7 @@ emit_endl()
static
void
static
void
handle_core_signal
(
int
signo
)
handle_core_signal
(
int
signo
)
{
{
BAIL_OUT
(
"Signal %d thrown"
,
signo
);
BAIL_OUT
(
"Signal %d thrown
\n
"
,
signo
);
}
}
void
void
...
@@ -136,6 +136,8 @@ BAIL_OUT(char const *fmt, ...)
...
@@ -136,6 +136,8 @@ BAIL_OUT(char const *fmt, ...)
va_start
(
ap
,
fmt
);
va_start
(
ap
,
fmt
);
fprintf
(
tapout
,
"Bail out! "
);
fprintf
(
tapout
,
"Bail out! "
);
vfprintf
(
tapout
,
fmt
,
ap
);
vfprintf
(
tapout
,
fmt
,
ap
);
diag
(
"%d tests planned, %d failed, %d was last executed"
,
g_test
.
plan
,
g_test
.
failed
,
g_test
.
last
);
emit_endl
();
emit_endl
();
va_end
(
ap
);
va_end
(
ap
);
exit
(
255
);
exit
(
255
);
...
@@ -159,6 +161,7 @@ typedef struct signal_entry {
...
@@ -159,6 +161,7 @@ typedef struct signal_entry {
}
signal_entry
;
}
signal_entry
;
static
signal_entry
install_signal
[]
=
{
static
signal_entry
install_signal
[]
=
{
{
SIGINT
,
handle_core_signal
},
{
SIGQUIT
,
handle_core_signal
},
{
SIGQUIT
,
handle_core_signal
},
{
SIGILL
,
handle_core_signal
},
{
SIGILL
,
handle_core_signal
},
{
SIGABRT
,
handle_core_signal
},
{
SIGABRT
,
handle_core_signal
},
...
...
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