Commit 62e8932d authored by aelkin@mysql.com's avatar aelkin@mysql.com

Merge aelkin@bk-internal.mysql.com:/home/bk/mysql-5.1-new

into  mysql.com:/usr_rh9/home/elkin.rh9/MySQL/BARE/mysql-5.1-new
parents 6ddab618 46eaae30
...@@ -718,6 +718,16 @@ CALL test.p1(13); ...@@ -718,6 +718,16 @@ CALL test.p1(13);
Warnings: Warnings:
Warning 1196 Some non-transactional changed tables couldn't be rolled back Warning 1196 Some non-transactional changed tables couldn't be rolled back
drop table t1; drop table t1;
CREATE TABLE t1 (a int not null)
partition by key(a)
(partition p0 COMMENT='first partition');
drop table t1;
CREATE TABLE t1 (`a b` int not null)
partition by key(`a b`);
drop table t1;
CREATE TABLE t1 (`a b` int not null)
partition by hash(`a b`);
drop table t1;
create table t1 (f1 integer) partition by range(f1) create table t1 (f1 integer) partition by range(f1)
(partition p1 values less than (0), partition p2 values less than (10)); (partition p1 values less than (0), partition p2 values less than (10));
insert into t1 set f1 = null; insert into t1 set f1 = null;
......
...@@ -849,6 +849,25 @@ CALL test.p1(12); ...@@ -849,6 +849,25 @@ CALL test.p1(12);
CALL test.p1(13); CALL test.p1(13);
drop table t1; drop table t1;
#
# Bug 13520: Problem with delimiters in COMMENT DATA DIRECTORY ..
#
CREATE TABLE t1 (a int not null)
partition by key(a)
(partition p0 COMMENT='first partition');
drop table t1;
#
# Bug 13433: Problem with delimited identifiers
#
CREATE TABLE t1 (`a b` int not null)
partition by key(`a b`);
drop table t1;
CREATE TABLE t1 (`a b` int not null)
partition by hash(`a b`);
drop table t1;
# #
# Bug#18053 Partitions: crash if null # Bug#18053 Partitions: crash if null
# Bug#18070 Partitions: wrong result on WHERE ... IS NULL # Bug#18070 Partitions: wrong result on WHERE ... IS NULL
......
...@@ -1508,6 +1508,11 @@ static int add_write(File fptr, const char *buf, uint len) ...@@ -1508,6 +1508,11 @@ static int add_write(File fptr, const char *buf, uint len)
return 1; return 1;
} }
static int add_string_object(File fptr, String *string)
{
return add_write(fptr, string->ptr(), string->length());
}
static int add_string(File fptr, const char *string) static int add_string(File fptr, const char *string)
{ {
return add_write(fptr, string, strlen(string)); return add_write(fptr, string, strlen(string));
...@@ -1594,7 +1599,14 @@ static int add_key_partition(File fptr, List<char> field_list) ...@@ -1594,7 +1599,14 @@ static int add_key_partition(File fptr, List<char> field_list)
while (i < no_fields) while (i < no_fields)
{ {
const char *field_str= part_it++; const char *field_str= part_it++;
err+= add_string(fptr, field_str); String field_string("", 0, system_charset_info);
THD *thd= current_thd;
ulonglong save_options= thd->options;
thd->options= 0;
append_identifier(thd, &field_string, field_str,
strlen(field_str));
thd->options= save_options;
err+= add_string_object(fptr, &field_string);
if (i != (no_fields-1)) if (i != (no_fields-1))
err+= add_comma(fptr); err+= add_comma(fptr);
i++; i++;
...@@ -1664,7 +1676,7 @@ static int add_partition_options(File fptr, partition_element *p_elem) ...@@ -1664,7 +1676,7 @@ static int add_partition_options(File fptr, partition_element *p_elem)
err+= add_keyword_string(fptr, "INDEX DIRECTORY", TRUE, err+= add_keyword_string(fptr, "INDEX DIRECTORY", TRUE,
p_elem->index_file_name); p_elem->index_file_name);
if (p_elem->part_comment) if (p_elem->part_comment)
err+= add_keyword_string(fptr, "COMMENT", FALSE, p_elem->part_comment); err+= add_keyword_string(fptr, "COMMENT", TRUE, p_elem->part_comment);
return err + add_engine(fptr,p_elem->engine_type); return err + add_engine(fptr,p_elem->engine_type);
} }
......
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