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
640fdb92
Commit
640fdb92
authored
Sep 10, 2009
by
Sergey Vojtovich
Browse files
Options
Browse Files
Download
Plain Diff
Local merge.
parents
dd16dc7e
16c57d90
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
56 additions
and
0 deletions
+56
-0
mysql-test/r/lowercase_mixed_tmpdir_innodb.result
mysql-test/r/lowercase_mixed_tmpdir_innodb.result
+6
-0
mysql-test/t/lowercase_mixed_tmpdir_innodb-master.opt
mysql-test/t/lowercase_mixed_tmpdir_innodb-master.opt
+2
-0
mysql-test/t/lowercase_mixed_tmpdir_innodb-master.sh
mysql-test/t/lowercase_mixed_tmpdir_innodb-master.sh
+6
-0
mysql-test/t/lowercase_mixed_tmpdir_innodb.test
mysql-test/t/lowercase_mixed_tmpdir_innodb.test
+12
-0
sql/handler.cc
sql/handler.cc
+30
-0
No files found.
mysql-test/r/lowercase_mixed_tmpdir_innodb.result
0 → 100755
View file @
640fdb92
drop table if exists t1;
create table t1 (id int) engine=InnoDB;
insert into t1 values (1);
create temporary table t2 engine=InnoDB select * from t1;
drop temporary table t2;
drop table t1;
mysql-test/t/lowercase_mixed_tmpdir_innodb-master.opt
0 → 100644
View file @
640fdb92
--lower-case-table-names=2
--tmpdir=$MYSQLTEST_VARDIR/tmp/MixedCase
mysql-test/t/lowercase_mixed_tmpdir_innodb-master.sh
0 → 100644
View file @
640fdb92
# This test requires a non-lowercase tmpdir directory on a case-sensitive
# filesystem.
d
=
"
$MYSQLTEST_VARDIR
/tmp/MixedCase"
test
-d
"
$d
"
||
mkdir
"
$d
"
rm
-f
"
$d
"
/
*
mysql-test/t/lowercase_mixed_tmpdir_innodb.test
0 → 100644
View file @
640fdb92
--
source
include
/
have_lowercase2
.
inc
--
source
include
/
have_innodb
.
inc
--
disable_warnings
drop
table
if
exists
t1
;
--
enable_warnings
create
table
t1
(
id
int
)
engine
=
InnoDB
;
insert
into
t1
values
(
1
);
create
temporary
table
t2
engine
=
InnoDB
select
*
from
t1
;
drop
temporary
table
t2
;
drop
table
t1
;
sql/handler.cc
View file @
640fdb92
...
...
@@ -1885,12 +1885,42 @@ bool ha_flush_logs(handlerton *db_type)
return
FALSE
;
}
/**
@brief make canonical filename
@param[in] file table handler
@param[in] path original path
@param[out] tmp_path buffer for canonized path
@details Lower case db name and table name path parts for
non file based tables when lower_case_table_names
is 2 (store as is, compare in lower case).
Filesystem path prefix (mysql_data_home or tmpdir)
is left intact.
@note tmp_path may be left intact if no conversion was
performed.
@retval canonized path
@todo This may be done more efficiently when table path
gets built. Convert this function to something like
ASSERT_CANONICAL_FILENAME.
*/
const
char
*
get_canonical_filename
(
handler
*
file
,
const
char
*
path
,
char
*
tmp_path
)
{
uint
i
;
if
(
lower_case_table_names
!=
2
||
(
file
->
ha_table_flags
()
&
HA_FILE_BASED
))
return
path
;
for
(
i
=
0
;
i
<=
mysql_tmpdir_list
.
max
;
i
++
)
{
if
(
is_prefix
(
path
,
mysql_tmpdir_list
.
list
[
i
]))
return
path
;
}
/* Ensure that table handler get path in lower case */
if
(
tmp_path
!=
path
)
strmov
(
tmp_path
,
path
);
...
...
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