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
bcd2a795
Commit
bcd2a795
authored
Mar 28, 2006
by
mikael@c-bc0be253.1238-1-64736c10.cust.bredbandsbolaget.se
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
BUG#13520: BUG#13433: Fixed proper delimiters for fields and comments
parent
c85cc93f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
43 additions
and
2 deletions
+43
-2
mysql-test/r/partition.result
mysql-test/r/partition.result
+10
-0
mysql-test/t/partition.test
mysql-test/t/partition.test
+19
-0
sql/sql_partition.cc
sql/sql_partition.cc
+14
-2
No files found.
mysql-test/r/partition.result
View file @
bcd2a795
...
...
@@ -718,4 +718,14 @@ CALL test.p1(13);
Warnings:
Warning 1196 Some non-transactional changed tables couldn't be rolled back
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;
End of 5.1 tests
mysql-test/t/partition.test
View file @
bcd2a795
...
...
@@ -849,4 +849,23 @@ CALL test.p1(12);
CALL
test
.
p1
(
13
);
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
;
--
echo
End
of
5.1
tests
sql/sql_partition.cc
View file @
bcd2a795
...
...
@@ -1885,6 +1885,11 @@ static int add_write(File fptr, const char *buf, uint len)
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
)
{
return
add_write
(
fptr
,
string
,
strlen
(
string
));
...
...
@@ -1971,7 +1976,14 @@ static int add_key_partition(File fptr, List<char> field_list)
while
(
i
<
no_fields
)
{
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
))
err
+=
add_comma
(
fptr
);
i
++
;
...
...
@@ -2041,7 +2053,7 @@ static int add_partition_options(File fptr, partition_element *p_elem)
err
+=
add_keyword_string
(
fptr
,
"INDEX DIRECTORY"
,
TRUE
,
p_elem
->
index_file_name
);
if
(
p_elem
->
part_comment
)
err
+=
add_keyword_string
(
fptr
,
"COMMENT"
,
FALS
E
,
p_elem
->
part_comment
);
err
+=
add_keyword_string
(
fptr
,
"COMMENT"
,
TRU
E
,
p_elem
->
part_comment
);
return
err
+
add_engine
(
fptr
,
p_elem
->
engine_type
);
}
...
...
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