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
8e1e3d87
Commit
8e1e3d87
authored
Dec 22, 2006
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge neptunus:mysql/mysql-4.1-maint
into pilot.mysql.com:/home/msvensson/mysql/mysql-4.1-maint
parents
a50813a8
e7a93997
Changes
15
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
122 additions
and
84 deletions
+122
-84
mysql-test/r/myisam.result
mysql-test/r/myisam.result
+1
-21
mysql-test/r/symlink.result
mysql-test/r/symlink.result
+22
-0
mysql-test/r/type_ranges.result
mysql-test/r/type_ranges.result
+3
-3
mysql-test/r/type_timestamp.result
mysql-test/r/type_timestamp.result
+9
-9
mysql-test/r/windows.result
mysql-test/r/windows.result
+6
-0
mysql-test/t/myisam.test
mysql-test/t/myisam.test
+1
-36
mysql-test/t/symlink.test
mysql-test/t/symlink.test
+38
-1
mysql-test/t/windows.test
mysql-test/t/windows.test
+9
-0
mysys/default.c
mysys/default.c
+1
-0
scripts/mysqlbug.sh
scripts/mysqlbug.sh
+7
-1
scripts/mysqld_multi.sh
scripts/mysqld_multi.sh
+9
-1
scripts/mysqld_safe.sh
scripts/mysqld_safe.sh
+1
-0
scripts/mysqldumpslow.sh
scripts/mysqldumpslow.sh
+8
-2
sql/sql_parse.cc
sql/sql_parse.cc
+6
-0
sql/sql_show.cc
sql/sql_show.cc
+1
-10
No files found.
mysql-test/r/myisam.result
View file @
8e1e3d87
...
...
@@ -923,24 +923,4 @@ SET @@myisam_repair_threads=1;
SHOW VARIABLES LIKE 'myisam_repair%';
Variable_name Value
myisam_repair_threads 1
show create table t1;
Table Create Table
t1 CREATE TEMPORARY TABLE `t1` (
`a` int(11) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQL_TEST_DIR/var/log/'
show create table t1;
Table Create Table
t1 CREATE TEMPORARY TABLE `t1` (
`a` int(11) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQL_TEST_DIR/var/log/'
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;
End of 4.1 tests
mysql-test/r/symlink.result
View file @
8e1e3d87
...
...
@@ -102,3 +102,25 @@ t1 CREATE TABLE `t1` (
`i` int(11) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
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 DATA DIRECTORY='MYSQL_TEST_DIR/var/log/'
show create table t1;
Table Create Table
t1 CREATE TEMPORARY TABLE `t1` (
`a` int(11) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQL_TEST_DIR/var/log/'
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;
End of 4.1 tests
mysql-test/r/type_ranges.result
View file @
8e1e3d87
...
...
@@ -54,7 +54,7 @@ ushort smallint(5) unsigned zerofill NULL MUL 00000 #
umedium mediumint(8) unsigned NULL MUL 0 #
ulong int(11) unsigned NULL MUL 0 #
ulonglong bigint(13) unsigned NULL MUL 0 #
time_stamp timestamp NULL
YES
CURRENT_TIMESTAMP #
time_stamp timestamp NULL CURRENT_TIMESTAMP #
date_field date NULL YES NULL #
time_field time NULL YES NULL #
date_time datetime NULL YES NULL #
...
...
@@ -222,7 +222,7 @@ ushort smallint(5) unsigned zerofill NULL 00000 #
umedium mediumint(8) unsigned NULL MUL 0 #
ulong int(11) unsigned NULL MUL 0 #
ulonglong bigint(13) unsigned NULL MUL 0 #
time_stamp timestamp NULL
YES
CURRENT_TIMESTAMP #
time_stamp timestamp NULL CURRENT_TIMESTAMP #
date_field varchar(10) latin1_swedish_ci YES NULL #
time_field time NULL YES NULL #
date_time datetime NULL YES NULL #
...
...
@@ -248,7 +248,7 @@ ushort smallint(5) unsigned zerofill NULL 00000 #
umedium mediumint(8) unsigned NULL 0 #
ulong int(11) unsigned NULL 0 #
ulonglong bigint(13) unsigned NULL 0 #
time_stamp timestamp NULL
YES
0000-00-00 00:00:00 #
time_stamp timestamp NULL 0000-00-00 00:00:00 #
date_field varchar(10) latin1_swedish_ci YES NULL #
time_field time NULL YES NULL #
date_time datetime NULL YES NULL #
...
...
mysql-test/r/type_timestamp.result
View file @
8e1e3d87
...
...
@@ -188,9 +188,9 @@ t1 CREATE TABLE `t1` (
) ENGINE=MyISAM DEFAULT CHARSET=latin1
show columns from t1;
Field Type Null Key Default Extra
t1 timestamp
YES
2003-01-01 00:00:00
t1 timestamp 2003-01-01 00:00:00
t2 datetime YES NULL
t3 timestamp
YES
0000-00-00 00:00:00
t3 timestamp 0000-00-00 00:00:00
drop table t1;
create table t1 (t1 timestamp default now(), t2 datetime, t3 timestamp);
SET TIMESTAMP=1000000002;
...
...
@@ -212,9 +212,9 @@ t1 CREATE TABLE `t1` (
) ENGINE=MyISAM DEFAULT CHARSET=latin1
show columns from t1;
Field Type Null Key Default Extra
t1 timestamp
YES
CURRENT_TIMESTAMP
t1 timestamp CURRENT_TIMESTAMP
t2 datetime YES NULL
t3 timestamp
YES
0000-00-00 00:00:00
t3 timestamp 0000-00-00 00:00:00
drop table t1;
create table t1 (t1 timestamp default '2003-01-01 00:00:00' on update now(), t2 datetime);
SET TIMESTAMP=1000000004;
...
...
@@ -238,7 +238,7 @@ t1 CREATE TABLE `t1` (
) ENGINE=MyISAM DEFAULT CHARSET=latin1
show columns from t1;
Field Type Null Key Default Extra
t1 timestamp
YES
2003-01-01 00:00:00
t1 timestamp 2003-01-01 00:00:00
t2 datetime YES NULL
drop table t1;
create table t1 (t1 timestamp default now() on update now(), t2 datetime);
...
...
@@ -263,7 +263,7 @@ t1 CREATE TABLE `t1` (
) ENGINE=MyISAM DEFAULT CHARSET=latin1
show columns from t1;
Field Type Null Key Default Extra
t1 timestamp
YES
CURRENT_TIMESTAMP
t1 timestamp CURRENT_TIMESTAMP
t2 datetime YES NULL
drop table t1;
create table t1 (t1 timestamp, t2 datetime, t3 timestamp);
...
...
@@ -289,9 +289,9 @@ t1 CREATE TABLE `t1` (
) ENGINE=MyISAM DEFAULT CHARSET=latin1
show columns from t1;
Field Type Null Key Default Extra
t1 timestamp
YES
CURRENT_TIMESTAMP
t1 timestamp CURRENT_TIMESTAMP
t2 datetime YES NULL
t3 timestamp
YES
0000-00-00 00:00:00
t3 timestamp 0000-00-00 00:00:00
drop table t1;
create table t1 (t1 timestamp default current_timestamp on update current_timestamp, t2 datetime);
SET TIMESTAMP=1000000009;
...
...
@@ -315,7 +315,7 @@ t1 CREATE TABLE `t1` (
) ENGINE=MyISAM DEFAULT CHARSET=latin1
show columns from t1;
Field Type Null Key Default Extra
t1 timestamp
YES
CURRENT_TIMESTAMP
t1 timestamp CURRENT_TIMESTAMP
t2 datetime YES NULL
delete from t1;
insert into t1 values ('2004-04-01 00:00:00', '2004-04-01 00:00:00');
...
...
mysql-test/r/windows.result
View file @
8e1e3d87
...
...
@@ -6,3 +6,9 @@ use prn;
ERROR 42000: Unknown database 'prn'
create table nu (a int);
drop table nu;
drop table if exists t1;
CREATE TABLE t1 ( `ID` int(6) ) data directory 'c:/tmp/' index directory 'c:/tmp/' engine=MyISAM;
Warnings:
Warning 0 DATA DIRECTORY option ignored
Warning 0 INDEX DIRECTORY option ignored
drop table t1;
mysql-test/t/myisam.test
View file @
8e1e3d87
...
...
@@ -854,40 +854,5 @@ DROP TABLE t1;
#
SET
@@
myisam_repair_threads
=
1
;
SHOW
VARIABLES
LIKE
'myisam_repair%'
;
# 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/log"
select
9
a
;
enable_query_log
;
# If running test suite with a non standard tmp dir, the "show create table"
# will print "DATA_DIRECTORY=". Use replace_result to mask it out
--
replace_result
$MYSQL_TEST_DIR
MYSQL_TEST_DIR
show
create
table
t1
;
connection
session2
;
disable_query_log
;
eval
create
temporary
table
t1
(
a
int
)
engine
=
myisam
data
directory
=
"
$MYSQL_TEST_DIR
/var/log"
select
99
a
;
enable_query_log
;
# If running test suite with a non standard tmp dir, the "show create table"
# will print "DATA_DIRECTORY=". Use replace_result to mask it out
--
replace_result
$MYSQL_TEST_DIR
MYSQL_TEST_DIR
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
--
echo
End
of
4.1
tests
mysql-test/t/symlink.test
View file @
8e1e3d87
...
...
@@ -133,4 +133,41 @@ enable_query_log;
show
create
table
t1
;
drop
table
t1
;
# End of 4.1 tests
#
# 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/log"
select
9
a
;
enable_query_log
;
# If running test suite with a non standard tmp dir, the "show create table"
# will print "DATA_DIRECTORY=". Use replace_result to mask it out
--
replace_result
$MYSQL_TEST_DIR
MYSQL_TEST_DIR
show
create
table
t1
;
connection
session2
;
disable_query_log
;
eval
create
temporary
table
t1
(
a
int
)
engine
=
myisam
data
directory
=
"
$MYSQL_TEST_DIR
/var/log"
select
99
a
;
enable_query_log
;
# If running test suite with a non standard tmp dir, the "show create table"
# will print "DATA_DIRECTORY=". Use replace_result to mask it out
--
replace_result
$MYSQL_TEST_DIR
MYSQL_TEST_DIR
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
;
--
echo
End
of
4.1
tests
mysql-test/t/windows.test
View file @
8e1e3d87
...
...
@@ -17,4 +17,13 @@ use prn;
create
table
nu
(
a
int
);
drop
table
nu
;
#
# Bug17489: ailed to put data file in custom directory use "data directory" option
#
--
disable_warnings
drop
table
if
exists
t1
;
--
enable_warnings
CREATE
TABLE
t1
(
`ID`
int
(
6
)
)
data
directory
'c:/tmp/'
index
directory
'c:/tmp/'
engine
=
MyISAM
;
drop
table
t1
;
# End of 4.1 tests
mysys/default.c
View file @
8e1e3d87
...
...
@@ -49,6 +49,7 @@ const char *default_directories[]= {
"sys:/etc/"
,
#else
"/etc/"
,
"/etc/mysql/"
,
#endif
#ifdef DATADIR
DATADIR
,
...
...
scripts/mysqlbug.sh
View file @
8e1e3d87
...
...
@@ -132,7 +132,13 @@ if test -z "$VISUAL"
then
if
test
-z
"
$EDITOR
"
then
EDIT
=
emacs
# Honor debian sensible-editor
if
test
-x
"/usr/bin/sensible-editor"
then
EDIT
=
/usr/bin/sensible-editor
else
EDIT
=
emacs
fi
else
EDIT
=
"
$EDITOR
"
fi
...
...
scripts/mysqld_multi.sh
View file @
8e1e3d87
...
...
@@ -437,6 +437,14 @@ sub find_groups
{
$data
[
$i
] =
$line
;
}
if (-f "
/etc/mysql/my.cnf
" && -r "
/etc/mysql/my.cnf
")
{
open(MY_CNF, "
</etc/mysql/my.cnf
") && (@tmp=<MY_CNF>) && close(MY_CNF);
}
for (; (
$line
= shift @tmp);
$i
++)
{
$data
[
$i
] =
$line
;
}
if (-f "
$homedir
/.my.cnf
" && -r "
$homedir
/.my.cnf
")
{
open(MY_CNF, "
<
$homedir
/.my.cnf
") && (@tmp=<MY_CNF>) && close(MY_CNF);
...
...
@@ -446,7 +454,7 @@ sub find_groups
$data
[
$i
] =
$line
;
}
}
chop @data;
cho
m
p @data;
# Make a list of the wanted group ids
if (defined(
$raw_gids
))
{
...
...
scripts/mysqld_safe.sh
View file @
8e1e3d87
...
...
@@ -195,6 +195,7 @@ if [ ! -d $mysql_unix_port_dir ]
then
mkdir
$mysql_unix_port_dir
chown
$user
$mysql_unix_port_dir
chmod
755
$mysql_unix_port_dir
fi
# Use the mysqld-max binary by default if the user doesn't specify a binary
...
...
scripts/mysqldumpslow.sh
View file @
8e1e3d87
...
...
@@ -40,6 +40,7 @@ unless (@ARGV) {
warn
"basedir=
$basedir
\n
"
if
$opt
{
v
}
;
my
$datadir
=
(
$defaults
=
~ m/--datadir
=(
.
*
)
/
)[
0]
;
my
$slowlog
=
(
$defaults
=
~ m/--log-slow-queries
=(
.
*
)
/
)[
0]
;
if
(!
$datadir
or
$opt
{
i
})
{
# determine the datadir from the instances section of /etc/my.cnf, if any
my
$instances
=
`
my_print_defaults instances
`
;
...
...
@@ -55,8 +56,13 @@ unless (@ARGV) {
warn
"datadir=
$datadir
\n
"
if
$opt
{
v
}
;
}
@ARGV
=
<
$datadir
/
$opt
{
h
}
-slow
.log>
;
die
"Can't find '
$datadir
/
$opt
{h}-slow.log'
\n
"
unless @ARGV
;
if
(
-f
$slowlog
)
{
@ARGV
=
(
$slowlog
)
;
die
"Can't find '
$slowlog
'
\n
"
unless @ARGV
;
}
else
{
@ARGV
=
<
$datadir
/
$opt
{
h
}
-slow
.log>
;
die
"Can't find '
$datadir
/
$opt
{h}-slow.log'
\n
"
unless @ARGV
;
}
}
warn
"
\n
Reading mysql slow query log from @ARGV
\n
"
;
...
...
sql/sql_parse.cc
View file @
8e1e3d87
...
...
@@ -2485,6 +2485,12 @@ mysql_execute_command(THD *thd)
goto
unsent_create_error
;
#ifndef HAVE_READLINK
if
(
lex
->
create_info
.
data_file_name
)
push_warning
(
thd
,
MYSQL_ERROR
::
WARN_LEVEL_WARN
,
0
,
"DATA DIRECTORY option ignored"
);
if
(
lex
->
create_info
.
index_file_name
)
push_warning
(
thd
,
MYSQL_ERROR
::
WARN_LEVEL_WARN
,
0
,
"INDEX DIRECTORY option ignored"
);
lex
->
create_info
.
data_file_name
=
lex
->
create_info
.
index_file_name
=
0
;
#else
/* Fix names if symlinked tables */
...
...
sql/sql_show.cc
View file @
8e1e3d87
...
...
@@ -714,16 +714,7 @@ mysqld_show_fields(THD *thd, TABLE_LIST *table_list,const char *wild,
if
(
verbose
)
protocol
->
store
(
field
->
has_charset
()
?
field
->
charset
()
->
name
:
"NULL"
,
system_charset_info
);
/*
Even if TIMESTAMP field can't contain NULL as its value it
will accept NULL if you will try to insert such value and will
convert NULL value to current TIMESTAMP. So YES here means
that NULL is allowed for assignment (but may be won't be
returned).
*/
pos
=
(
byte
*
)
((
flags
&
NOT_NULL_FLAG
)
&&
field
->
type
()
!=
FIELD_TYPE_TIMESTAMP
?
""
:
"YES"
);
pos
=
(
byte
*
)
((
flags
&
NOT_NULL_FLAG
)
?
""
:
"YES"
);
protocol
->
store
((
const
char
*
)
pos
,
system_charset_info
);
pos
=
(
byte
*
)
((
field
->
flags
&
PRI_KEY_FLAG
)
?
"PRI"
:
(
field
->
flags
&
UNIQUE_KEY_FLAG
)
?
"UNI"
:
...
...
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