Commit 988d263e authored by Michael Widenius's avatar Michael Widenius

Merge with main

parents 1392eba6 9c10b73b
...@@ -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
......
...@@ -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;
......
...@@ -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)));
} }
......
...@@ -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() {}
}; };
...@@ -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);
} }
......
...@@ -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 },
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment