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
949d69f9
Commit
949d69f9
authored
Jul 06, 2006
by
pekka@mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge pnousiainen@bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/space_old/pekka/ndb/version/my41
parents
1adaad2b
86132d5d
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
86 additions
and
8 deletions
+86
-8
myisam/mi_create.c
myisam/mi_create.c
+29
-7
mysql-test/r/myisam.result
mysql-test/r/myisam.result
+21
-0
mysql-test/t/myisam.test
mysql-test/t/myisam.test
+31
-0
support-files/mysql.spec.sh
support-files/mysql.spec.sh
+5
-1
No files found.
myisam/mi_create.c
View file @
949d69f9
...
...
@@ -519,9 +519,20 @@ int mi_create(const char *name,uint keys,MI_KEYDEF *keydefs,
if
(
ci
->
index_file_name
)
{
fn_format
(
filename
,
ci
->
index_file_name
,
""
,
MI_NAME_IEXT
,
4
);
fn_format
(
linkname
,
name
,
""
,
MI_NAME_IEXT
,
4
);
linkname_ptr
=
linkname
;
if
(
options
&
HA_OPTION_TMP_TABLE
)
{
char
*
path
;
/* chop off the table name, tempory tables use generated name */
if
((
path
=
strrchr
(
ci
->
index_file_name
,
FN_LIBCHAR
)))
*
path
=
'\0'
;
fn_format
(
filename
,
name
,
ci
->
index_file_name
,
MI_NAME_IEXT
,
MY_REPLACE_DIR
|
MY_UNPACK_FILENAME
);
}
else
fn_format
(
filename
,
ci
->
index_file_name
,
""
,
MI_NAME_IEXT
,
MY_UNPACK_FILENAME
);
fn_format
(
linkname
,
name
,
""
,
MI_NAME_IEXT
,
MY_UNPACK_FILENAME
);
linkname_ptr
=
linkname
;
/*
Don't create the table if the link or file exists to ensure that one
doesn't accidently destroy another table.
...
...
@@ -575,10 +586,21 @@ int mi_create(const char *name,uint keys,MI_KEYDEF *keydefs,
{
if
(
ci
->
data_file_name
)
{
fn_format
(
filename
,
ci
->
data_file_name
,
""
,
MI_NAME_DEXT
,
4
);
fn_format
(
linkname
,
name
,
""
,
MI_NAME_DEXT
,
4
);
linkname_ptr
=
linkname
;
create_flag
=
0
;
if
(
options
&
HA_OPTION_TMP_TABLE
)
{
char
*
path
;
/* chop off the table name, tempory tables use generated name */
if
((
path
=
strrchr
(
ci
->
data_file_name
,
FN_LIBCHAR
)))
*
path
=
'\0'
;
fn_format
(
filename
,
name
,
ci
->
data_file_name
,
MI_NAME_DEXT
,
MY_REPLACE_DIR
|
MY_UNPACK_FILENAME
);
}
else
fn_format
(
filename
,
ci
->
data_file_name
,
""
,
MI_NAME_DEXT
,
MY_UNPACK_FILENAME
);
fn_format
(
linkname
,
name
,
""
,
MI_NAME_DEXT
,
MY_UNPACK_FILENAME
);
linkname_ptr
=
linkname
;
create_flag
=
0
;
}
else
{
...
...
mysql-test/r/myisam.result
View file @
949d69f9
...
...
@@ -769,3 +769,24 @@ a b
xxxxxxxxx bbbbbb
xxxxxxxxx bbbbbb
DROP TABLE t1;
show create table t1;
Table Create Table
t1 CREATE TEMPORARY TABLE `t1` (
`a` int(11) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
show create table t1;
Table Create Table
t1 CREATE TEMPORARY TABLE `t1` (
`a` int(11) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
create table t1 (a int) engine=myisam select 42 a;
select * from t1;
a
9
select * from t1;
a
99
select * from t1;
a
42
drop table t1;
mysql-test/t/myisam.test
View file @
949d69f9
...
...
@@ -726,4 +726,35 @@ UPDATE t1 AS ta1,t1 AS ta2 SET ta1.b='aaaaaa',ta2.b='bbbbbb';
SELECT
*
FROM
t1
;
DROP
TABLE
t1
;
#
# Bug#8706 - temporary table with data directory option fails
#
connect
(
session1
,
localhost
,
root
,,);
connect
(
session2
,
localhost
,
root
,,);
connection
session1
;
disable_query_log
;
eval
create
temporary
table
t1
(
a
int
)
engine
=
myisam
data
directory
=
"
$MYSQL_TEST_DIR
/var/tmp"
select
9
a
;
enable_query_log
;
show
create
table
t1
;
connection
session2
;
disable_query_log
;
eval
create
temporary
table
t1
(
a
int
)
engine
=
myisam
data
directory
=
"
$MYSQL_TEST_DIR
/var/tmp"
select
99
a
;
enable_query_log
;
show
create
table
t1
;
connection
default
;
create
table
t1
(
a
int
)
engine
=
myisam
select
42
a
;
connection
session1
;
select
*
from
t1
;
disconnect
session1
;
connection
session2
;
select
*
from
t1
;
disconnect
session2
;
connection
default
;
select
*
from
t1
;
drop
table
t1
;
# End of 4.1 tests
support-files/mysql.spec.sh
View file @
949d69f9
...
...
@@ -577,6 +577,7 @@ fi
%attr
(
755, root, root
)
%
{
_bindir
}
/mysqlbug
%attr
(
755, root, root
)
%
{
_bindir
}
/mysqld_multi
%attr
(
755, root, root
)
%
{
_bindir
}
/mysqld_safe
%attr
(
755, root, root
)
%
{
_bindir
}
/mysqldumpslow
%attr
(
755, root, root
)
%
{
_bindir
}
/mysqlhotcopy
%attr
(
755, root, root
)
%
{
_bindir
}
/mysqltest
%attr
(
755, root, root
)
%
{
_bindir
}
/pack_isam
...
...
@@ -607,7 +608,6 @@ fi
%attr
(
755, root, root
)
%
{
_bindir
}
/mysqlbinlog
%attr
(
755, root, root
)
%
{
_bindir
}
/mysqlcheck
%attr
(
755, root, root
)
%
{
_bindir
}
/mysqldump
%attr
(
755, root, root
)
%
{
_bindir
}
/mysqldumpslow
%attr
(
755, root, root
)
%
{
_bindir
}
/mysqlimport
%attr
(
755, root, root
)
%
{
_bindir
}
/mysqlshow
...
...
@@ -712,6 +712,10 @@ fi
# itself - note that they must be ordered by date (important when
# merging BK trees)
%changelog
*
Tue Jun 27 2006 Joerg Bruehe <joerg@mysql.com>
- move
"mysqldumpslow"
from the client RPM to the server RPM
(
bug#20216
)
*
Sat May 20 2006 Kent Boortz <kent@mysql.com>
- Always compile
for
PIC, position independent code.
...
...
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