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
8154355a
Commit
8154355a
authored
Jan 17, 2007
by
msvensson@pilot.mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge pilot.mysql.com:/home/msvensson/mysql/mysql-4.1
into pilot.mysql.com:/home/msvensson/mysql/mysql-4.1-maint
parents
a7862496
75d91ded
Changes
28
Hide whitespace changes
Inline
Side-by-side
Showing
28 changed files
with
267 additions
and
142 deletions
+267
-142
Makefile.am
Makefile.am
+26
-25
client/mysqltest.c
client/mysqltest.c
+14
-5
mysql-test/lib/mtr_cases.pl
mysql-test/lib/mtr_cases.pl
+2
-5
mysql-test/lib/mtr_process.pl
mysql-test/lib/mtr_process.pl
+2
-1
mysql-test/mysql-test-run.pl
mysql-test/mysql-test-run.pl
+42
-9
mysql-test/r/ctype_hebrew.result
mysql-test/r/ctype_hebrew.result
+11
-0
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/ctype_hebrew.test
mysql-test/t/ctype_hebrew.test
+16
-0
mysql-test/t/kill.test
mysql-test/t/kill.test
+4
-1
mysql-test/t/myisam.test
mysql-test/t/myisam.test
+1
-36
mysql-test/t/mysqladmin.test
mysql-test/t/mysqladmin.test
+2
-2
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
mysys/mf_iocache.c
mysys/mf_iocache.c
+4
-3
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/share/charsets/hebrew.xml
sql/share/charsets/hebrew.xml
+2
-2
sql/sql_parse.cc
sql/sql_parse.cc
+6
-0
sql/sql_show.cc
sql/sql_show.cc
+1
-10
strings/conf_to_src.c
strings/conf_to_src.c
+8
-1
strings/ctype-extra.c
strings/ctype-extra.c
+12
-4
No files found.
Makefile.am
View file @
8154355a
...
...
@@ -95,7 +95,11 @@ dist-hook:
tags
:
support-files/build-tags
.PHONY
:
init-db bin-dist
.PHONY
:
init-db bin-dist
\
test test-force test-full test-force-full test-force-mem
\
test-pl test-force-pl test-full-pl test-force-full-pl test-force-pl-mem
\
test-ps test-ns
# Target 'test' will run the regression test suite using the built server.
#
...
...
@@ -105,36 +109,33 @@ tags:
# will then calculate the various port numbers it needs from this,
# making sure each user use different ports.
test
:
test
-ps
:
cd
mysql-test
;
\
./mysql-test-run
&&
\
./mysql-test-run
--ps-protocol
@PERL@ ./mysql-test-run.pl
$(force)
--ps-protocol
test-force
:
cd
mysql-test
;
\
./mysql-test-run
--force
&&
\
./mysql-test-run
--ps-protocol
--force
test-ns
:
cd
mysql-test
;
\
@PERL@ ./mysql-test-run.pl
$(force)
test-force-mem
:
cd
mysql-test
;
\
./mysql-test-run
--force
--mem
&&
\
./mysql-test-run
--ps-protocol
--force
--mem
test
:
test-ns test-ps
# To ease script-writing, although in 4.1 it is identical to 'test'
test-full
:
test
# We are testing a new Perl version of the test script
test-pl
:
cd
mysql-test
;
\
./mysql-test-run.pl
&&
\
./mysql-test-run.pl
--ps-protocol
test-force
:
$(MAKE)
force
=
--force
test
test-force-pl
:
cd
mysql-test
;
\
./mysql-test-run.pl
--force
&&
\
./mysql-test-run.pl
--ps-protocol
--force
test-force-full
:
$(MAKE)
force
=
--force
test-full
#used by autopush.pl to run memory based tests
test-force-pl-mem
:
cd
mysql-test
;
\
./mysql-test-run.pl
--force
--mem
&&
\
./mysql-test-run.pl
--ps-protocol
--force
--mem
test-force-mem
:
$(MAKE)
'force=--force --mem'
test
# Keep these for a while
test-pl
:
test
test-full-pl
:
test-full
test-force-pl
:
test-force
test-force-pl-mem
:
test-force-mem
test-force-full-pl
:
test-force-full
client/mysqltest.c
View file @
8154355a
...
...
@@ -1240,7 +1240,9 @@ void var_set(const char *var_name, const char *var_name_end,
v
->
int_dirty
=
0
;
v
->
str_val_len
=
strlen
(
v
->
str_val
);
}
strxmov
(
buf
,
v
->
name
,
"="
,
v
->
str_val
,
NullS
);
my_snprintf
(
buf
,
sizeof
(
buf
),
"%.*s=%.*s"
,
v
->
name_len
,
v
->
name
,
v
->
str_val_len
,
v
->
str_val
);
if
(
!
(
v
->
env_s
=
my_strdup
(
buf
,
MYF
(
MY_WME
))))
die
(
"Out of memory"
);
putenv
(
v
->
env_s
);
...
...
@@ -2968,7 +2970,12 @@ void safe_connect(MYSQL* mysql, const char *name, const char *host,
if
((
mysql_errno
(
mysql
)
==
CR_CONN_HOST_ERROR
||
mysql_errno
(
mysql
)
==
CR_CONNECTION_ERROR
)
&&
failed_attempts
<
opt_max_connect_retries
)
{
verbose_msg
(
"Connect attempt %d/%d failed: %d: %s"
,
failed_attempts
,
opt_max_connect_retries
,
mysql_errno
(
mysql
),
mysql_error
(
mysql
));
my_sleep
(
connection_retry_sleep
);
}
else
{
if
(
failed_attempts
>
0
)
...
...
@@ -4678,10 +4685,9 @@ void run_query_normal(struct st_connection *cn, struct st_command *command,
}
/*
Store the result. If res is NULL, use mysql_field_count to
determine if that was expected
Store the result of the query if it will return any fields
*/
if
(
!
(
res
=
mysql_store_result
(
mysql
))
&&
mysql_field_count
(
mysql
))
if
(
mysql_field_count
(
mysql
)
&&
((
res
=
mysql_store_result
(
mysql
))
==
0
))
{
handle_error
(
command
,
mysql_errno
(
mysql
),
mysql_error
(
mysql
),
mysql_sqlstate
(
mysql
),
ds
);
...
...
@@ -4733,7 +4739,10 @@ void run_query_normal(struct st_connection *cn, struct st_command *command,
}
if
(
res
)
{
mysql_free_result
(
res
);
res
=
0
;
}
counter
++
;
}
while
(
!
(
err
=
mysql_next_result
(
mysql
)));
if
(
err
>
0
)
...
...
@@ -4800,7 +4809,7 @@ void handle_error(struct st_command *command,
err_errno
,
err_error
);
/* Abort the run of this test, pass the failed query as reason */
abort_not_supported_test
(
"Query '%s' failed, required functionality"
\
abort_not_supported_test
(
"Query '%s' failed, required functionality
"
\
"not supported"
,
command
->
query
);
}
...
...
mysql-test/lib/mtr_cases.pl
View file @
8154355a
...
...
@@ -288,6 +288,7 @@ sub collect_one_test_case($$$$$$$) {
$tinfo
->
{'
timezone
'}
=
"
GMT-3
";
# for UNIX_TIMESTAMP tests to work
$tinfo
->
{'
slave_num
'}
=
0
;
# Default, no slave
$tinfo
->
{'
master_num
'}
=
1
;
# Default, 1 master
if
(
defined
mtr_match_prefix
(
$tname
,"
rpl
")
)
{
if
(
$::opt_skip_rpl
)
...
...
@@ -297,13 +298,8 @@ sub collect_one_test_case($$$$$$$) {
return
;
}
$tinfo
->
{'
slave_num
'}
=
1
;
# Default for rpl* tests, use one slave
if
(
$tname
eq
'
rpl_failsafe
'
or
$tname
eq
'
rpl_chain_temp_table
'
)
{
# $tinfo->{'slave_num'}= 3; # Not 3 ? Check old code, strange
}
}
if
(
defined
mtr_match_prefix
(
$tname
,"
federated
")
)
...
...
@@ -582,6 +578,7 @@ our @tags=
["
include/have_debug.inc
",
"
need_debug
",
1
],
["
include/have_ndb.inc
",
"
ndb_test
",
1
],
["
include/have_ndb_extra.inc
",
"
ndb_extra
",
1
],
["
include/have_multi_ndb.inc
",
"
master_num
",
2
],
["
require_manager
",
"
require_manager
",
1
],
);
...
...
mysql-test/lib/mtr_process.pl
View file @
8154355a
...
...
@@ -220,7 +220,8 @@ sub spawn_parent_impl {
my
$ret_pid
=
waitpid
(
$pid
,
0
);
if
(
$ret_pid
!=
$pid
)
{
mtr_error
("
$path
(
$pid
) got lost somehow
");
mtr_error
("
waitpid(
$pid
, 0) returned
$ret_pid
"
.
"
when waiting for '
$path
'
");
}
return
mtr_process_exit_status
(
$?
);
...
...
mysql-test/mysql-test-run.pl
View file @
8154355a
...
...
@@ -222,10 +222,12 @@ our $opt_ndbconnectstring_slave;
our
$opt_record
;
our
$opt_report_features
;
our
$opt_check_testcases
;
our
$opt_mark_progress
;
our
$opt_skip
;
our
$opt_skip_rpl
;
our
$max_slave_num
=
0
;
our
$max_master_num
=
0
;
our
$use_innodb
;
our
$opt_skip_test
;
our
$opt_skip_im
;
...
...
@@ -403,6 +405,15 @@ sub main () {
$max_slave_num
=
$test
->
{
slave_num
};
mtr_error
("
Too many slaves
")
if
$max_slave_num
>
3
;
}
# Count max number of masters used by a test case
if
(
$test
->
{
master_num
}
>
$max_master_num
)
{
$max_master_num
=
$test
->
{
master_num
};
mtr_error
("
Too many masters
")
if
$max_master_num
>
2
;
mtr_error
("
Too few masters
")
if
$max_master_num
<
1
;
}
$use_innodb
||=
$test
->
{'
innodb_test
'};
}
...
...
@@ -555,6 +566,7 @@ sub command_line_setup () {
# Test case authoring
'
record
'
=>
\
$opt_record
,
'
check-testcases
'
=>
\
$opt_check_testcases
,
'
mark-progress
'
=>
\
$opt_mark_progress
,
# Extra options used when starting mysqld
'
mysqld=s
'
=>
\
@opt_extra_mysqld_opt
,
...
...
@@ -1215,14 +1227,28 @@ sub command_line_setup () {
$path_ndb_testrun_log
=
"
$opt_vardir
/log/ndb_testrun.log
";
$path_snapshot
=
"
$opt_tmpdir
/snapshot_
$opt_master_myport
/
";
if
(
$opt_valgrind
and
$opt_debug
)
{
# When both --valgrind and --debug is selected, send
# all output to the trace file, making it possible to
# see the exact location where valgrind complains
foreach
my
$mysqld
(
@
{
$master
},
@
{
$slave
})
{
my
$sidx
=
$mysqld
->
{
idx
}
?
"
$mysqld
->{idx}
"
:
"";
$mysqld
->
{
path_myerr
}
=
"
$opt_vardir
/log/
"
.
$mysqld
->
{
type
}
.
"
$sidx
.trace
";
}
}
}
sub
datadir_list_setup
()
{
# Make a list of all data_dirs
@data_dir_lst
=
(
$master
->
[
0
]
->
{'
path_myddir
'},
$master
->
[
1
]
->
{'
path_myddir
'});
for
(
my
$idx
=
0
;
$idx
<
$max_master_num
;
$idx
++
)
{
push
(
@data_dir_lst
,
$master
->
[
$idx
]
->
{'
path_myddir
'});
}
for
(
my
$idx
=
0
;
$idx
<
$max_slave_num
;
$idx
++
)
{
...
...
@@ -2629,8 +2655,10 @@ sub mysql_install_db () {
install_db
('
master
',
$master
->
[
0
]
->
{'
path_myddir
'});
# FIXME check if testcase really is using second master
copy_install_db
('
master
',
$master
->
[
1
]
->
{'
path_myddir
'});
if
(
$max_master_num
)
{
copy_install_db
('
master
',
$master
->
[
1
]
->
{'
path_myddir
'});
}
# Install the number of slave databses needed
for
(
my
$idx
=
0
;
$idx
<
$max_slave_num
;
$idx
++
)
...
...
@@ -3432,11 +3460,10 @@ sub mysqld_arguments ($$$$$) {
if
(
$glob_use_embedded_server
)
{
$prefix
=
"
--server-arg=
";
}
else
{
# We can't pass embedded server --no-defaults
mtr_add_arg
(
$args
,
"
--no-defaults
");
}
mtr_add_arg
(
$args
,
"
%s--no-defaults
",
$prefix
);
mtr_add_arg
(
$args
,
"
%s--console
",
$prefix
);
mtr_add_arg
(
$args
,
"
%s--basedir=%s
",
$prefix
,
$path_my_basedir
);
mtr_add_arg
(
$args
,
"
%s--character-sets-dir=%s
",
$prefix
,
$path_charsetsdir
);
...
...
@@ -4165,7 +4192,8 @@ sub run_testcase_start_servers($) {
}
if
(
$clusters
->
[
0
]
->
{'
pid
'}
and
!
$master
->
[
1
]
->
{'
pid
'}
)
if
(
$clusters
->
[
0
]
->
{'
pid
'}
and
!
$master
->
[
1
]
->
{'
pid
'}
and
$tinfo
->
{'
master_num
'}
>
1
)
{
# Test needs cluster, start an extra mysqld connected to cluster
...
...
@@ -4376,6 +4404,10 @@ sub run_mysqltest ($) {
mtr_add_arg
(
$args
,
"
--tmpdir=%s
",
$opt_tmpdir
);
mtr_add_arg
(
$args
,
"
--character-sets-dir=%s
",
$path_charsetsdir
);
# Log line number and time for each line in .test file
mtr_add_arg
(
$args
,
"
--mark-progress
")
if
$opt_mark_progress
;
if
(
$tinfo
->
{'
component_id
'}
eq
'
im
')
{
mtr_add_arg
(
$args
,
"
--socket=%s
",
$instance_manager
->
{'
path_sock
'});
...
...
@@ -4829,6 +4861,7 @@ Options for test case authoring
record TESTNAME (Re)genereate the result file for TESTNAME
check-testcases Check testcases for sideeffects
mark-progress Log line number and elapsed time to <testname>.progress
Options that pass on options
...
...
mysql-test/r/ctype_hebrew.result
0 → 100644
View file @
8154355a
DROP TABLE IF EXISTS t1;
SET NAMES hebrew;
CREATE TABLE t1 (a char(1)) DEFAULT CHARSET=hebrew;
INSERT INTO t1 VALUES (0xFD),(0xFE);
ALTER TABLE t1 CONVERT TO CHARACTER SET utf8;
SELECT HEX(a) FROM t1;
HEX(a)
E2808E
E2808F
DROP TABLE t1;
End of 4.1 tests
mysql-test/r/myisam.result
View file @
8154355a
...
...
@@ -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 @
8154355a
...
...
@@ -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 @
8154355a
...
...
@@ -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 @
8154355a
...
...
@@ -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 @
8154355a
...
...
@@ -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/ctype_hebrew.test
0 → 100644
View file @
8154355a
#
# BUG #24037: Lossy Hebrew to Unicode conversion
#
# Test if LRM and RLM characters are correctly converted to UTF-8
--
disable_warnings
DROP
TABLE
IF
EXISTS
t1
;
--
enable_warnings
SET
NAMES
hebrew
;
CREATE
TABLE
t1
(
a
char
(
1
))
DEFAULT
CHARSET
=
hebrew
;
INSERT
INTO
t1
VALUES
(
0xFD
),(
0xFE
);
ALTER
TABLE
t1
CONVERT
TO
CHARACTER
SET
utf8
;
SELECT
HEX
(
a
)
FROM
t1
;
DROP
TABLE
t1
;
--
echo
End
of
4.1
tests
mysql-test/t/kill.test
View file @
8154355a
...
...
@@ -70,11 +70,14 @@ insert into t2 select id from t1;
create
table
t3
(
kill_id
int
);
insert
into
t3
values
(
connection_id
());
connect
(
conn2
,
localhost
,
root
,,);
connection
conn2
;
connection
conn1
;
--
disable_result_log
send
select
id
from
t1
where
id
in
(
select
distinct
id
from
t2
);
--
enable_result_log
connect
(
conn2
,
localhost
,
root
,,);
connection
conn2
;
select
((
@
id
:=
kill_id
)
-
kill_id
)
from
t3
;
--
sleep
1
...
...
mysql-test/t/myisam.test
View file @
8154355a
...
...
@@ -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/mysqladmin.test
View file @
8154355a
...
...
@@ -17,7 +17,7 @@
database
=
db1
EOF
--
replace_regex
/
\
/.*
mysqladmin
/
mysqladmi
n
/
--
replace_regex
/
.*
mysqladmin
.*:
unknown
/
mysqladmin
:
unknow
n
/
--
error
7
--
exec
$MYSQLADMIN
--
defaults
-
file
=
$MYSQLTEST_VARDIR
/
tmp
/
bug10608
.
cnf
-
S
$MASTER_MYSOCK
-
P
$MASTER_MYPORT
-
u
root
--
password
=
ping
2
>&
1
...
...
@@ -29,6 +29,6 @@ EOF
loose
-
database
=
db2
EOF
--
replace_regex
/
Warning
:
.*
mysqladmin
/
Warning
:
mysqladmi
n
/
--
replace_regex
/
Warning
:
.*
mysqladmin
.*:
unknown
/
Warning
:
mysqladmin
:
unknow
n
/
--
exec
$MYSQLADMIN
--
defaults
-
file
=
$MYSQLTEST_VARDIR
/
tmp
/
bug10608
.
cnf
-
S
$MASTER_MYSOCK
-
P
$MASTER_MYPORT
-
u
root
--
password
=
ping
2
>&
1
mysql-test/t/symlink.test
View file @
8154355a
...
...
@@ -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 @
8154355a
...
...
@@ -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 @
8154355a
...
...
@@ -49,6 +49,7 @@ const char *default_directories[]= {
"sys:/etc/"
,
#else
"/etc/"
,
"/etc/mysql/"
,
#endif
#ifdef DATADIR
DATADIR
,
...
...
mysys/mf_iocache.c
View file @
8154355a
...
...
@@ -199,11 +199,11 @@ int init_io_cache(IO_CACHE *info, File file, uint cachesize,
if
(
type
!=
READ_NET
&&
type
!=
WRITE_NET
)
{
/* Retry allocating memory in smaller blocks until we get one */
cachesize
=
(
uint
)
((
ulong
)
(
cachesize
+
min_cache
-
1
)
&
(
ulong
)
~
(
min_cache
-
1
));
for
(;;)
{
uint
buffer_block
;
cachesize
=
(
uint
)
((
ulong
)
(
cachesize
+
min_cache
-
1
)
&
(
ulong
)
~
(
min_cache
-
1
));
if
(
cachesize
<
min_cache
)
cachesize
=
min_cache
;
buffer_block
=
cachesize
;
...
...
@@ -222,7 +222,8 @@ int init_io_cache(IO_CACHE *info, File file, uint cachesize,
}
if
(
cachesize
==
min_cache
)
DBUG_RETURN
(
2
);
/* Can't alloc cache */
cachesize
=
(
uint
)
((
long
)
cachesize
*
3
/
4
);
/* Try with less memory */
/* Try with less memory */
cachesize
=
(
uint
)
((
ulong
)
cachesize
*
3
/
4
&
(
ulong
)
~
(
min_cache
-
1
));
}
}
...
...
scripts/mysqlbug.sh
View file @
8154355a
...
...
@@ -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 @
8154355a
...
...
@@ -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 @
8154355a
...
...
@@ -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 @
8154355a
...
...
@@ -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/share/charsets/hebrew.xml
View file @
8154355a
...
...
@@ -40,7 +40,7 @@
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02
02 02 02 02 02 02 02 02 02 02 02 00 00
00 0
0 00
02 02 02 02 02 02 02 02 02 02 02 00 00
20 2
0 00
</map>
</ctype>
...
...
@@ -106,7 +106,7 @@
0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 2017
05D0 05D1 05D2 05D3 05D4 05D5 05D6 05D7 05D8 05D9 05DA 05DB 05DC 05DD 05DE 05DF
05E0 05E1 05E2 05E3 05E4 05E5 05E6 05E7 05E8 05E9 05EA 0000 0000
0000 0000
0000
05E0 05E1 05E2 05E3 05E4 05E5 05E6 05E7 05E8 05E9 05EA 0000 0000
200E 200F
0000
</map>
</unicode>
...
...
sql/sql_parse.cc
View file @
8154355a
...
...
@@ -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 @
8154355a
...
...
@@ -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"
:
...
...
strings/conf_to_src.c
View file @
8154355a
...
...
@@ -270,7 +270,14 @@ main(int argc, char **argv __attribute__((unused)))
}
}
fprintf
(
f
,
"/*
\n
"
);
fprintf
(
f
,
" This file was generated by the conf_to_src utility. "
"Do not edit it directly,
\n
"
);
fprintf
(
f
,
" edit the XML definitions in sql/share/charsets/ instead.
\n\n
"
);
fprintf
(
f
,
" To re-generate, run the following in the strings/ "
"directory:
\n
"
);
fprintf
(
f
,
" ./conf_to_src ../sql/share/charsets/ > FILE
\n
"
);
fprintf
(
f
,
"*/
\n\n
"
);
fprintf
(
f
,
"#include <my_global.h>
\n
"
);
fprintf
(
f
,
"#include <m_ctype.h>
\n\n
"
);
...
...
strings/ctype-extra.c
View file @
8154355a
/*
This file was generated by the conf_to_src utility. Do not edit it directly,
edit the XML definitions in sql/share/charsets/ instead.
To re-generate, run the following in the strings/ directory:
./conf_to_src ../sql/share/charsets/ > FILE
*/
#include <my_global.h>
#include <m_ctype.h>
...
...
@@ -1169,7 +1177,7 @@ uchar ctype_hebrew_general_ci[] = {
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x02
,
0x02
,
0x02
,
0x02
,
0x02
,
0x02
,
0x02
,
0x02
,
0x02
,
0x02
,
0x02
,
0x02
,
0x02
,
0x02
,
0x02
,
0x02
,
0x02
,
0x02
,
0x02
,
0x02
,
0x02
,
0x02
,
0x02
,
0x02
,
0x02
,
0x02
,
0x02
,
0x00
,
0x00
,
0x
00
,
0x0
0
,
0x00
0x02
,
0x02
,
0x02
,
0x02
,
0x02
,
0x02
,
0x02
,
0x02
,
0x02
,
0x02
,
0x02
,
0x00
,
0x00
,
0x
20
,
0x2
0
,
0x00
};
uchar
to_lower_hebrew_general_ci
[]
=
{
...
...
@@ -1261,7 +1269,7 @@ uint16 to_uni_hebrew_general_ci[] = {
0x05D0
,
0x05D1
,
0x05D2
,
0x05D3
,
0x05D4
,
0x05D5
,
0x05D6
,
0x05D7
,
0x05D8
,
0x05D9
,
0x05DA
,
0x05DB
,
0x05DC
,
0x05DD
,
0x05DE
,
0x05DF
,
0x05E0
,
0x05E1
,
0x05E2
,
0x05E3
,
0x05E4
,
0x05E5
,
0x05E6
,
0x05E7
,
0x05E8
,
0x05E9
,
0x05EA
,
0x0000
,
0x0000
,
0x
0000
,
0x0000
,
0x0000
0x05E8
,
0x05E9
,
0x05EA
,
0x0000
,
0x0000
,
0x
200E
,
0x200F
,
0x0000
};
#endif
...
...
@@ -5100,7 +5108,7 @@ uchar ctype_hebrew_bin[] = {
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x02
,
0x02
,
0x02
,
0x02
,
0x02
,
0x02
,
0x02
,
0x02
,
0x02
,
0x02
,
0x02
,
0x02
,
0x02
,
0x02
,
0x02
,
0x02
,
0x02
,
0x02
,
0x02
,
0x02
,
0x02
,
0x02
,
0x02
,
0x02
,
0x02
,
0x02
,
0x02
,
0x00
,
0x00
,
0x
00
,
0x0
0
,
0x00
0x02
,
0x02
,
0x02
,
0x02
,
0x02
,
0x02
,
0x02
,
0x02
,
0x02
,
0x02
,
0x02
,
0x00
,
0x00
,
0x
20
,
0x2
0
,
0x00
};
uchar
to_lower_hebrew_bin
[]
=
{
...
...
@@ -5173,7 +5181,7 @@ uint16 to_uni_hebrew_bin[] = {
0x05D0
,
0x05D1
,
0x05D2
,
0x05D3
,
0x05D4
,
0x05D5
,
0x05D6
,
0x05D7
,
0x05D8
,
0x05D9
,
0x05DA
,
0x05DB
,
0x05DC
,
0x05DD
,
0x05DE
,
0x05DF
,
0x05E0
,
0x05E1
,
0x05E2
,
0x05E3
,
0x05E4
,
0x05E5
,
0x05E6
,
0x05E7
,
0x05E8
,
0x05E9
,
0x05EA
,
0x0000
,
0x0000
,
0x
0000
,
0x0000
,
0x0000
0x05E8
,
0x05E9
,
0x05EA
,
0x0000
,
0x0000
,
0x
200E
,
0x200F
,
0x0000
};
#endif
...
...
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