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
497ff2fa
Commit
497ff2fa
authored
Mar 29, 2007
by
holyfoot/hf@mysql.com/hfmain.(none)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug #24633 (sql_mode NO_DIR_IN_CREATE doesn't work with partitioned tables)
additional patch to fix SHOW CREATE behaviour
parent
ce89422b
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
8 deletions
+29
-8
mysql-test/r/partition.result
mysql-test/r/partition.result
+7
-1
mysql-test/t/partition.test
mysql-test/t/partition.test
+13
-1
sql/sql_partition.cc
sql/sql_partition.cc
+9
-6
No files found.
mysql-test/r/partition.result
View file @
497ff2fa
...
...
@@ -1231,5 +1231,11 @@ partition p01 values less than (1000)
data directory='/not/existing'
index directory='/not/existing'
);
DROP TABLE t1;
show create table t2;
Table Create Table
t2 CREATE TABLE `t2` (
`i` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (i) (PARTITION p01 VALUES LESS THAN (1000) ENGINE = MyISAM) */
DROP TABLE t1, t2;
set @@sql_mode=@org_mode;
End of 5.1 tests
mysql-test/t/partition.test
View file @
497ff2fa
...
...
@@ -1467,6 +1467,16 @@ drop table t1, t2;
# Bug #24633 SQL MODE "NO_DIR_IN_CREATE" does not work with partitioned tables
#
disable_query_log
;
eval
create
table
t2
(
i
int
)
partition
by
range
(
i
)
(
partition
p01
values
less
than
(
1000
)
data
directory
=
"
$MYSQLTEST_VARDIR
/master-data/test/"
index
directory
=
"
$MYSQLTEST_VARDIR
/master-data/test/"
);
enable_query_log
;
set
@
org_mode
=@@
sql_mode
;
set
@@
sql_mode
=
'NO_DIR_IN_CREATE'
;
select
@@
sql_mode
;
...
...
@@ -1478,6 +1488,8 @@ partition by range (i)
index
directory
=
'/not/existing'
);
DROP
TABLE
t1
;
show
create
table
t2
;
DROP
TABLE
t1
,
t2
;
set
@@
sql_mode
=@
org_mode
;
--
echo
End
of
5.1
tests
sql/sql_partition.cc
View file @
497ff2fa
...
...
@@ -1892,12 +1892,15 @@ static int add_partition_options(File fptr, partition_element *p_elem)
err
+=
add_keyword_int
(
fptr
,
"MAX_ROWS"
,(
longlong
)
p_elem
->
part_max_rows
);
if
(
p_elem
->
part_min_rows
)
err
+=
add_keyword_int
(
fptr
,
"MIN_ROWS"
,(
longlong
)
p_elem
->
part_min_rows
);
if
(
!
(
current_thd
->
variables
.
sql_mode
&
MODE_NO_DIR_IN_CREATE
))
{
if
(
p_elem
->
data_file_name
)
err
+=
add_keyword_string
(
fptr
,
"DATA DIRECTORY"
,
TRUE
,
p_elem
->
data_file_name
);
if
(
p_elem
->
index_file_name
)
err
+=
add_keyword_string
(
fptr
,
"INDEX DIRECTORY"
,
TRUE
,
p_elem
->
index_file_name
);
}
if
(
p_elem
->
part_comment
)
err
+=
add_keyword_string
(
fptr
,
"COMMENT"
,
TRUE
,
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