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
bc1f79fb
Commit
bc1f79fb
authored
Oct 18, 2009
by
Bjorn Munch
Browse files
Options
Browse Files
Download
Plain Diff
merge from trunk
parents
06ac5598
df129b74
Changes
14
Show whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
260 additions
and
359 deletions
+260
-359
Makefile.am
Makefile.am
+18
-16
configure.in
configure.in
+1
-1
mysql-test/collections/default.experimental
mysql-test/collections/default.experimental
+66
-5
mysql-test/collections/mysql-trunk.push
mysql-test/collections/mysql-trunk.push
+5
-0
mysql-test/r/index_merge_innodb.result
mysql-test/r/index_merge_innodb.result
+0
-326
mysql-test/suite/funcs_1/t/disabled.def
mysql-test/suite/funcs_1/t/disabled.def
+1
-1
mysql-test/suite/innodb/t/disabled.def
mysql-test/suite/innodb/t/disabled.def
+1
-1
mysql-test/suite/parts/t/disabled.def
mysql-test/suite/parts/t/disabled.def
+1
-1
mysql-test/suite/rpl/t/disabled.def
mysql-test/suite/rpl/t/disabled.def
+1
-1
mysql-test/t/index_merge_innodb.test
mysql-test/t/index_merge_innodb.test
+2
-6
scripts/make_binary_distribution.sh
scripts/make_binary_distribution.sh
+8
-0
scripts/mysql_config.sh
scripts/mysql_config.sh
+13
-0
scripts/mysqld_safe.sh
scripts/mysqld_safe.sh
+132
-1
support-files/mysql.spec.sh
support-files/mysql.spec.sh
+11
-0
No files found.
Makefile.am
View file @
bc1f79fb
...
...
@@ -137,46 +137,48 @@ test-force-full:
test-force-mem
:
$(MAKE)
force
=
--force
mem
=
--mem
test
EXP
=
--experimental
=
collections/default.experimental
test-bt
:
-
cd
mysql-test
;
MTR_BUILD_THREAD
=
auto
\
@PERL@ ./mysql-test-run.pl
--comment
=
normal
--force
--timer
\
--skip-ndbcluster
--report-features
--skip-ndbcluster
--report-features
$(EXP)
-
cd
mysql-test
;
MTR_BUILD_THREAD
=
auto
\
@PERL@ ./mysql-test-run.pl
--comment
=
ps
--force
--timer
\
--skip-ndbcluster
--ps-protocol
--skip-ndbcluster
--ps-protocol
$(EXP)
-
if
[
-e
bin/ndbd
-o
-e
storage/ndb/src/kernel/ndbd
]
;
then
\
cd
mysql-test
;
\
MTR_BUILD_THREAD
=
auto
\
@PERL@ ./mysql-test-run.pl
--comment
=
ndb+rpl_ndb+ps
--force
--timer
\
--ps-protocol
--mysqld
=
--binlog-format
=
row
--suite
=
ndb,rpl_ndb
;
\
--ps-protocol
--mysqld
=
--binlog-format
=
row
--suite
=
ndb,rpl_ndb
$(EXP)
;
\
MTR_BUILD_THREAD
=
auto
\
@PERL@ ./mysql-test-run.pl
--comment
=
ndb
--force
--timer
\
--with-ndbcluster-only
;
\
--with-ndbcluster-only
$(EXP)
;
\
else
\
echo
"no program found for 'ndbcluster' tests - skipped testing"
;
\
fi
-
cd
mysql-test
;
MTR_BUILD_THREAD
=
auto
\
@PERL@ ./mysql-test-run.pl
--force
--comment
=
funcs1+ps
--ps-protocol
--reorder
--suite
=
funcs_1
@PERL@ ./mysql-test-run.pl
--force
--comment
=
funcs1+ps
--ps-protocol
--reorder
--suite
=
funcs_1
$(EXP)
-
cd
mysql-test
;
MTR_BUILD_THREAD
=
auto
\
@PERL@ ./mysql-test-run.pl
--force
--comment
=
funcs2
--suite
=
funcs_2
@PERL@ ./mysql-test-run.pl
--force
--comment
=
funcs2
--suite
=
funcs_2
$(EXP)
-
cd
mysql-test
;
MTR_BUILD_THREAD
=
auto
\
@PERL@ ./mysql-test-run.pl
--force
--comment
=
partitions
--suite
=
parts
@PERL@ ./mysql-test-run.pl
--force
--comment
=
partitions
--suite
=
parts
$(EXP)
-
cd
mysql-test
;
MTR_BUILD_THREAD
=
auto
\
@PERL@ ./mysql-test-run.pl
--force
--comment
=
stress
--suite
=
stress
@PERL@ ./mysql-test-run.pl
--force
--comment
=
stress
--suite
=
stress
$(EXP)
-
cd
mysql-test
;
MTR_BUILD_THREAD
=
auto
\
@PERL@ ./mysql-test-run.pl
--force
--comment
=
jp
--suite
=
jp
@PERL@ ./mysql-test-run.pl
--force
--comment
=
jp
--suite
=
jp
$(EXP)
-
if
[
-d
mysql-test/suite/nist
]
;
then
\
cd
mysql-test
;
MTR_BUILD_THREAD
=
auto
\
@PERL@ ./mysql-test-run.pl
--comment
=
nist
--force
--suite
=
nist
;
\
@PERL@ ./mysql-test-run.pl
--comment
=
nist
--force
--suite
=
nist
$(EXP)
;
\
fi
-
if
[
-d
mysql-test/suite/nist
]
;
then
\
cd
mysql-test
;
MTR_BUILD_THREAD
=
auto
\
@PERL@ ./mysql-test-run.pl
--comment
=
nist+ps
--force
--suite
=
nist
--ps-protocol
;
\
@PERL@ ./mysql-test-run.pl
--comment
=
nist+ps
--force
--suite
=
nist
--ps-protocol
$(EXP)
;
\
fi
-
if
[
-e
bin/mysqltest_embedded
-o
-e
libmysqld/examples/mysqltest_embedded
]
;
then
\
cd
mysql-test
;
MTR_BUILD_THREAD
=
auto
\
@PERL@ ./mysql-test-run.pl
--comment
=
embedded
--force
--timer
\
--embedded-server
--skip-rpl
--skip-ndbcluster
;
\
--embedded-server
--skip-rpl
--skip-ndbcluster
$(EXP)
;
\
else
\
echo
"no program found for 'embedded' tests - skipped testing"
;
\
fi
...
...
@@ -184,22 +186,22 @@ test-bt:
test-bt-fast
:
-
cd
mysql-test
;
MTR_BUILD_THREAD
=
auto
\
@PERL@ ./mysql-test-run.pl
--comment
=
ps
--force
--timer
\
--skip-ndbcluster
--ps-protocol
--report-features
--skip-ndbcluster
--ps-protocol
--report-features
$(EXP)
-
if
[
-e
bin/ndbd
-o
-e
storage/ndb/src/kernel/ndbd
]
;
then
\
cd
mysql-test
;
\
MTR_BUILD_THREAD
=
auto
\
@PERL@ ./mysql-test-run.pl
--comment
=
ndb
--force
--timer
\
--with-ndbcluster-only
;
\
--with-ndbcluster-only
$(EXP)
;
\
else
\
echo
"no program found for 'ndbcluster' tests - skipped testing"
;
\
fi
-
cd
mysql-test
;
MTR_BUILD_THREAD
=
auto
\
@PERL@ ./mysql-test-run.pl
--force
--comment
=
stress
--suite
=
stress
@PERL@ ./mysql-test-run.pl
--force
--comment
=
stress
--suite
=
stress
$(EXP)
test-bt-debug
:
-
cd
mysql-test
;
MTR_BUILD_THREAD
=
auto
\
@PERL@ ./mysql-test-run.pl
--comment
=
debug
--force
--timer
\
--skip-ndbcluster
--skip-rpl
--report-features
--skip-ndbcluster
--skip-rpl
--report-features
$(EXP)
test-bt-debug-fast
:
...
...
configure.in
View file @
bc1f79fb
...
...
@@ -10,7 +10,7 @@ AC_CANONICAL_SYSTEM
#
# When changing major version number please also check switch statement
# in client/mysqlbinlog.cc:check_master_version().
AM_INIT_AUTOMAKE
(
mysql, 5.
4.5
-beta
)
AM_INIT_AUTOMAKE
(
mysql, 5.
5.0
-beta
)
AM_CONFIG_HEADER
([
include/config.h:config.h.in]
)
PROTOCOL_VERSION
=
10
...
...
mysql-test/collections/default.experimental
View file @
bc1f79fb
...
...
@@ -2,18 +2,79 @@
# in alphabetical order. This also helps with merge conflict resolution.
binlog.binlog_tmp_table* # Bug#45578:2009-07-10 alik Test binlog_tmp_table fails ramdonly on PB2: Unknown table 't2'
funcs_1.charset_collation_1 # depends on compile-time decisions
innodb.innodb_information_schema # Bug#47449 2009-09-19 alik main.information_schema and innodb.innodb_information_schema fail sporadically
main.ctype_gbk_binlog @solaris # Bug#46010: main.ctype_gbk_binlog fails sporadically : Table 't2' already exists
main.information_schema # Bug#47449 2009-09-19 alik main.information_schema and innodb.innodb_information_schema fail sporadically
main.innodb-autoinc # Bug#44030 2009-09-24 alik Marking innodb-autoinc experimental while waiting for the patch to be merged
main.lock_multi_bug38499 # Bug#47448 2009-09-19 alik main.lock_multi_bug38499 times out sporadically
main.plugin* @solaris # Bug#47146 Linking problem with example plugin when dtrace enabled
main.plugin_load @solaris # Bug#47146
main.lock_multi_bug38691 @solaris # Bug#47792 2009-10-02 alik main.lock_multi_bug38691 times out sporadically on Solaris 10
main.log_tables # Bug#47924 2009-10-08 alik main.log_tables times out sporadically
main.plugin # Bug#47146 Linking problem with example plugin when dtrace enabled
main.plugin_load # Bug#47146
rpl.rpl_get_master_version_and_clock* # Bug#46931 2009-08-26 alik rpl.rpl_get_master_version_and_clock fails on hpux11.31
rpl.rpl_innodb_bug28430* @solaris # Bug#46029
rpl.rpl_innodb_bug30888* @solaris # Bug#47646 2009-09-25 alik rpl.rpl_innodb_bug30888 fails sporadically on Solaris
rpl.rpl_plugin_load* @solaris # Bug#47146
rpl.rpl_row_create_table* # Bug#45576: rpl_row_create_table fails on PB2
rpl_ndb.rpl_ndb_log # Bug#38998
rpl.rpl_log_pos* # Bug#47743 2009-10-02 alik rpl.rpl_log_pos fails sporadically
rpl.rpl_trigger* # Bug#46656 2009-09-25 alik InnoDB plugin: memory leaks (Valgrind)
# Declare all NDB-tests in ndb and rpl_ndb test suites experimental.
# Usually the test cases from ndb and rpl_ndb test suites are not run in PB,
# but they run by gcov.
#
ndb.*
rpl_ndb.*
# Declare all NDB-tests in other test suites experimental.
stress.ddl_ndb
sys_vars.ndb_log_update_as_write_basic
sys_vars.have_ndbcluster_basic
sys_vars.ndb_log_updated_only_basic
funcs_1.ndb_storedproc_10
funcs_1.ndb_bitdata
funcs_1.ndb_trig_03
funcs_1.ndb_trig_0102
funcs_1.is_tables_ndb
funcs_1.is_columns_ndb
funcs_1.ndb_trig_0407
funcs_1.ndb_trig_1011ext
funcs_1.ndb_storedproc_06
funcs_1.ndb_views
funcs_1.is_cml_ndb
funcs_1.ndb_storedproc_02
funcs_1.ndb_storedproc_03
funcs_1.ndb_trig_03e
funcs_1.is_engines_ndb
funcs_1.ndb_trig_08
funcs_1.ndb_storedproc_07
funcs_1.ndb_storedproc_08
funcs_1.ndb_func_view
funcs_1.ndb_trig_09
funcs_1.ndb_cursors
funcs_2.ndb_charset
ndb.n* # Consider all NDB tests experimental.
rpl_ndb.r* # Consider all NDB tests experimental.
parts.partition_engine_ndb
parts.ndb_dd_backuprestore
parts.partition_value_ndb
parts.partition_mgm_lc2_ndb
parts.partition_alter1_2_ndb
parts.partition_alter1_1_ndb
parts.part_supported_sql_func_ndb
parts.partition_int_ndb
parts.partition_mgm_lc1_ndb
parts.partition_auto_increment_ndb
parts.partition_syntax_ndb
parts.partition_alter1_1_2_ndb
parts.partition_basic_ndb
parts.partition_mgm_lc0_ndb
mysql-test/collections/mysql-trunk.push
0 → 100644
View file @
bc1f79fb
perl mysql-test-run.pl --timer --force --parallel=auto --experimental=collections/default.experimental --comment=n_mix --mysqld=--binlog-format=mixed --suite=main,binlog,innodb,federated,rpl
perl mysql-test-run.pl --timer --force --parallel=auto --experimental=collections/default.experimental --comment=ps_row --ps-protocol --mysqld=--binlog-format=row --suite=main,binlog,innodb,federated,rpl
perl mysql-test-run.pl --timer --force --parallel=auto --experimental=collections/default.experimental --comment=embedded --embedded --suite=main,binlog,innodb,federated,rpl
perl mysql-test-run.pl --timer --force --parallel=auto --experimental=collections/default.experimental --comment=rpl_binlog_row --mysqld=--binlog-format=row --suite=rpl,binlog
perl mysql-test-run.pl --timer --force --parallel=auto --experimental=collections/default.experimental --comment=funcs_1 --suite=funcs_1
mysql-test/r/index_merge_innodb.result
View file @
bc1f79fb
#---------------- Index merge test 2 -------------------------------------------
SET SESSION STORAGE_ENGINE = InnoDB;
drop table if exists t1,t2;
create table t1
(
key1 int not null,
key2 int not null,
INDEX i1(key1),
INDEX i2(key2)
);
explain select * from t1 where key1 < 5 or key2 > 197;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index_merge i1,i2 i1,i2 4,4 NULL 8 Using sort_union(i1,i2); Using where
select * from t1 where key1 < 5 or key2 > 197;
key1 key2
0 200
1 199
2 198
3 197
4 196
explain select * from t1 where key1 < 3 or key2 > 195;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index_merge i1,i2 i1,i2 4,4 NULL 8 Using sort_union(i1,i2); Using where
select * from t1 where key1 < 3 or key2 > 195;
key1 key2
0 200
1 199
2 198
3 197
4 196
alter table t1 add str1 char (255) not null,
add zeroval int not null default 0,
add str2 char (255) not null,
add str3 char (255) not null;
update t1 set str1='aaa', str2='bbb', str3=concat(key2, '-', key1 div 2, '_' ,if(key1 mod 2 = 0, 'a', 'A'));
alter table t1 add primary key (str1, zeroval, str2, str3);
explain select * from t1 where key1 < 5 or key2 > 197;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index_merge i1,i2 i1,i2 4,4 NULL 8 Using sort_union(i1,i2); Using where
select * from t1 where key1 < 5 or key2 > 197;
key1 key2 str1 zeroval str2 str3
4 196 aaa 0 bbb 196-2_a
3 197 aaa 0 bbb 197-1_A
2 198 aaa 0 bbb 198-1_a
1 199 aaa 0 bbb 199-0_A
0 200 aaa 0 bbb 200-0_a
explain select * from t1 where key1 < 3 or key2 > 195;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index_merge i1,i2 i1,i2 4,4 NULL 8 Using sort_union(i1,i2); Using where
select * from t1 where key1 < 3 or key2 > 195;
key1 key2 str1 zeroval str2 str3
4 196 aaa 0 bbb 196-2_a
3 197 aaa 0 bbb 197-1_A
2 198 aaa 0 bbb 198-1_a
1 199 aaa 0 bbb 199-0_A
0 200 aaa 0 bbb 200-0_a
drop table t1;
create table t1 (
pk integer not null auto_increment primary key,
key1 integer,
key2 integer not null,
filler char (200),
index (key1),
index (key2)
);
show warnings;
Level Code Message
explain select pk from t1 where key1 = 1 and key2 = 1;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index_merge key1,key2 key1,key2 5,4 NULL 1 Using intersect(key1,key2); Using where; Using index
select pk from t1 where key2 = 1 and key1 = 1;
pk
26
27
select pk from t1 ignore index(key1,key2) where key2 = 1 and key1 = 1;
pk
26
27
drop table t1;
create table t1 (
pk int primary key auto_increment,
key1a int,
key2a int,
key1b int,
key2b int,
dummy1 int,
dummy2 int,
dummy3 int,
dummy4 int,
key3a int,
key3b int,
filler1 char (200),
index i1(key1a, key1b),
index i2(key2a, key2b),
index i3(key3a, key3b)
);
create table t2 (a int);
insert into t2 values (0),(1),(2),(3),(4),(NULL);
insert into t1 (key1a, key1b, key2a, key2b, key3a, key3b)
select A.a, B.a, C.a, D.a, C.a, D.a from t2 A,t2 B,t2 C, t2 D;
insert into t1 (key1a, key1b, key2a, key2b, key3a, key3b)
select key1a, key1b, key2a, key2b, key3a, key3b from t1;
insert into t1 (key1a, key1b, key2a, key2b, key3a, key3b)
select key1a, key1b, key2a, key2b, key3a, key3b from t1;
analyze table t1;
Table Op Msg_type Msg_text
test.t1 analyze status OK
select count(*) from t1;
count(*)
5184
explain select count(*) from t1 where
key1a = 2 and key1b is null and key2a = 2 and key2b is null;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index_merge i1,i2 i1,i2 10,10 NULL # Using intersect(i1,i2); Using where; Using index
select count(*) from t1 where
key1a = 2 and key1b is null and key2a = 2 and key2b is null;
count(*)
4
explain select count(*) from t1 where
key1a = 2 and key1b is null and key3a = 2 and key3b is null;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index_merge i1,i3 i1,i3 10,10 NULL # Using intersect(i1,i3); Using where; Using index
select count(*) from t1 where
key1a = 2 and key1b is null and key3a = 2 and key3b is null;
count(*)
4
drop table t1,t2;
create table t1 (
id1 int,
id2 date ,
index idx2 (id1,id2),
index idx1 (id2)
);
insert into t1 values(1,'20040101'), (2,'20040102');
select * from t1 where id1 = 1 and id2= '20040101';
id1 id2
1 2004-01-01
drop table t1;
drop view if exists v1;
CREATE TABLE t1 (
`oid` int(11) unsigned NOT NULL auto_increment,
`fk_bbk_niederlassung` int(11) unsigned NOT NULL,
`fk_wochentag` int(11) unsigned NOT NULL,
`uhrzeit_von` time NOT NULL COMMENT 'HH:MM',
`uhrzeit_bis` time NOT NULL COMMENT 'HH:MM',
`geloescht` tinyint(4) NOT NULL,
`version` int(5) NOT NULL,
PRIMARY KEY (`oid`),
KEY `fk_bbk_niederlassung` (`fk_bbk_niederlassung`),
KEY `fk_wochentag` (`fk_wochentag`),
KEY `ix_version` (`version`)
) DEFAULT CHARSET=latin1;
insert into t1 values
(1, 38, 1, '08:00:00', '13:00:00', 0, 1),
(2, 38, 2, '08:00:00', '13:00:00', 0, 1),
(3, 38, 3, '08:00:00', '13:00:00', 0, 1),
(4, 38, 4, '08:00:00', '13:00:00', 0, 1),
(5, 38, 5, '08:00:00', '13:00:00', 0, 1),
(6, 38, 5, '08:00:00', '13:00:00', 1, 2),
(7, 38, 3, '08:00:00', '13:00:00', 1, 2),
(8, 38, 1, '08:00:00', '13:00:00', 1, 2),
(9, 38, 2, '08:00:00', '13:00:00', 1, 2),
(10, 38, 4, '08:00:00', '13:00:00', 1, 2),
(11, 38, 1, '08:00:00', '13:00:00', 0, 3),
(12, 38, 2, '08:00:00', '13:00:00', 0, 3),
(13, 38, 3, '08:00:00', '13:00:00', 0, 3),
(14, 38, 4, '08:00:00', '13:00:00', 0, 3),
(15, 38, 5, '08:00:00', '13:00:00', 0, 3),
(16, 38, 4, '08:00:00', '13:00:00', 0, 4),
(17, 38, 5, '08:00:00', '13:00:00', 0, 4),
(18, 38, 1, '08:00:00', '13:00:00', 0, 4),
(19, 38, 2, '08:00:00', '13:00:00', 0, 4),
(20, 38, 3, '08:00:00', '13:00:00', 0, 4),
(21, 7, 1, '08:00:00', '13:00:00', 0, 1),
(22, 7, 2, '08:00:00', '13:00:00', 0, 1),
(23, 7, 3, '08:00:00', '13:00:00', 0, 1),
(24, 7, 4, '08:00:00', '13:00:00', 0, 1),
(25, 7, 5, '08:00:00', '13:00:00', 0, 1);
create view v1 as
select
zeit1.oid AS oid,
zeit1.fk_bbk_niederlassung AS fk_bbk_niederlassung,
zeit1.fk_wochentag AS fk_wochentag,
zeit1.uhrzeit_von AS uhrzeit_von,
zeit1.uhrzeit_bis AS uhrzeit_bis,
zeit1.geloescht AS geloescht,
zeit1.version AS version
from
t1 zeit1
where
(zeit1.version =
(select max(zeit2.version) AS `max(version)`
from t1 zeit2
where
((zeit1.fk_bbk_niederlassung = zeit2.fk_bbk_niederlassung) and
(zeit1.fk_wochentag = zeit2.fk_wochentag) and
(zeit1.uhrzeit_von = zeit2.uhrzeit_von) and
(zeit1.uhrzeit_bis = zeit2.uhrzeit_bis)
)
)
)
and (zeit1.geloescht = 0);
select * from v1 where oid = 21;
oid fk_bbk_niederlassung fk_wochentag uhrzeit_von uhrzeit_bis geloescht version
21 7 1 08:00:00 13:00:00 0 1
drop view v1;
drop table t1;
CREATE TABLE t1(
t_cpac varchar(2) NOT NULL,
t_vers varchar(4) NOT NULL,
t_rele varchar(2) NOT NULL,
t_cust varchar(4) NOT NULL,
filler1 char(250) default NULL,
filler2 char(250) default NULL,
PRIMARY KEY (t_cpac,t_vers,t_rele,t_cust),
UNIQUE KEY IX_4 (t_cust,t_cpac,t_vers,t_rele),
KEY IX_5 (t_vers,t_rele,t_cust)
);
insert into t1 values
('tm','2.5 ','a ',' ','',''), ('tm','2.5U','a ','stnd','',''),
('da','3.3 ','b ',' ','',''), ('da','3.3U','b ','stnd','',''),
('tl','7.6 ','a ',' ','',''), ('tt','7.6 ','a ',' ','',''),
('bc','B61 ','a ',' ','',''), ('bp','B61 ','a ',' ','',''),
('ca','B61 ','a ',' ','',''), ('ci','B61 ','a ',' ','',''),
('cp','B61 ','a ',' ','',''), ('dm','B61 ','a ',' ','',''),
('ec','B61 ','a ',' ','',''), ('ed','B61 ','a ',' ','',''),
('fm','B61 ','a ',' ','',''), ('nt','B61 ','a ',' ','',''),
('qm','B61 ','a ',' ','',''), ('tc','B61 ','a ',' ','',''),
('td','B61 ','a ',' ','',''), ('tf','B61 ','a ',' ','',''),
('tg','B61 ','a ',' ','',''), ('ti','B61 ','a ',' ','',''),
('tp','B61 ','a ',' ','',''), ('ts','B61 ','a ',' ','',''),
('wh','B61 ','a ',' ','',''), ('bc','B61U','a ','stnd','',''),
('bp','B61U','a ','stnd','',''), ('ca','B61U','a ','stnd','',''),
('ci','B61U','a ','stnd','',''), ('cp','B61U','a ','stnd','',''),
('dm','B61U','a ','stnd','',''), ('ec','B61U','a ','stnd','',''),
('fm','B61U','a ','stnd','',''), ('nt','B61U','a ','stnd','',''),
('qm','B61U','a ','stnd','',''), ('tc','B61U','a ','stnd','',''),
('td','B61U','a ','stnd','',''), ('tf','B61U','a ','stnd','',''),
('tg','B61U','a ','stnd','',''), ('ti','B61U','a ','stnd','',''),
('tp','B61U','a ','stnd','',''), ('ts','B61U','a ','stnd','',''),
('wh','B61U','a ','stnd','','');
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`t_cpac` varchar(2) NOT NULL,
`t_vers` varchar(4) NOT NULL,
`t_rele` varchar(2) NOT NULL,
`t_cust` varchar(4) NOT NULL,
`filler1` char(250) DEFAULT NULL,
`filler2` char(250) DEFAULT NULL,
PRIMARY KEY (`t_cpac`,`t_vers`,`t_rele`,`t_cust`),
UNIQUE KEY `IX_4` (`t_cust`,`t_cpac`,`t_vers`,`t_rele`),
KEY `IX_5` (`t_vers`,`t_rele`,`t_cust`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
select t_vers,t_rele,t_cust,filler1 from t1 where t_vers = '7.6';
t_vers t_rele t_cust filler1
7.6 a
7.6 a
select t_vers,t_rele,t_cust,filler1 from t1 where t_vers = '7.6'
and t_rele='a' and t_cust = ' ';
t_vers t_rele t_cust filler1
7.6 a
7.6 a
drop table t1;
create table t1 (
pk int(11) not null auto_increment,
a int(11) not null default '0',
b int(11) not null default '0',
c int(11) not null default '0',
filler1 datetime, filler2 varchar(15),
filler3 longtext,
kp1 varchar(4), kp2 varchar(7),
kp3 varchar(2), kp4 varchar(4),
kp5 varchar(7),
filler4 char(1),
primary key (pk),
key idx1(a,b,c),
key idx2(c),
key idx3(kp1,kp2,kp3,kp4,kp5)
) default charset=latin1;
set @fill=NULL;
SELECT COUNT(*) FROM t1 WHERE b = 0 AND a = 0 AND c = 13286427 AND
kp1='279' AND kp2='ELM0678' AND kp3='6' AND kp4='10' AND kp5 = 'R ';
COUNT(*)
1
drop table t1;
create table t1
(
key1 int not null,
key2 int not null default 0,
key3 int not null default 0
);
insert into t1(key1) values (1),(2),(3),(4),(5),(6),(7),(8);
set @d=8;
insert into t1 (key1) select key1+@d from t1;
set @d=@d*2;
insert into t1 (key1) select key1+@d from t1;
set @d=@d*2;
insert into t1 (key1) select key1+@d from t1;
set @d=@d*2;
insert into t1 (key1) select key1+@d from t1;
set @d=@d*2;
insert into t1 (key1) select key1+@d from t1;
set @d=@d*2;
insert into t1 (key1) select key1+@d from t1;
set @d=@d*2;
insert into t1 (key1) select key1+@d from t1;
set @d=@d*2;
alter table t1 add index i2(key2);
alter table t1 add index i3(key3);
update t1 set key2=key1,key3=key1;
explain select * from t1 where (key3 > 30 and key3<35) or (key2 >32 and key2 < 40);
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index_merge i2,i3 i3,i2 4,4 NULL 9 Using sort_union(i3,i2); Using where
select * from t1 where (key3 > 30 and key3<35) or (key2 >32 and key2 < 40);
key1 key2 key3
31 31 31
32 32 32
33 33 33
34 34 34
35 35 35
36 36 36
37 37 37
38 38 38
39 39 39
drop table t1;
#---------------- 2-sweeps read Index merge test 2 -------------------------------
SET SESSION STORAGE_ENGINE = InnoDB;
drop table if exists t1;
...
...
mysql-test/suite/funcs_1/t/disabled.def
View file @
bc1f79fb
...
...
@@ -10,4 +10,4 @@
#
##############################################################################
ndb_trig_1011ext: Bug#
32656 NDB: Duplicate key error aborts transaction in handler. Doesn't talk back to SQL
ndb_trig_1011ext: Bug#
47564
mysql-test/suite/innodb/t/disabled.def
View file @
bc1f79fb
innodb-index
:
InnoDB: Error: table `test`.`t1#1` already exists in InnoDB internal
innodb-index
: Bug#47563 2009-06-11 svoj
InnoDB: Error: table `test`.`t1#1` already exists in InnoDB internal
mysql-test/suite/parts/t/disabled.def
View file @
bc1f79fb
partition_basic_ndb : Bug#
19899 Crashing the server
partition_basic_ndb : Bug#
44919 parts-suite in mtr tries to use features not supported by ndb
# http://dev.mysql.com/doc/refman/5.1/en/mysql-cluster-limitations-syntax.html
partition_syntax_ndb : Bug#36735 Not supported
mysql-test/suite/rpl/t/disabled.def
View file @
bc1f79fb
...
...
@@ -10,4 +10,4 @@
#
##############################################################################
rpl_cross_version : Bug#4
2311 2009-03-27 joro rpl_cross_version fails on macosx
rpl_cross_version : Bug#4
3913 2009-03-27 joro rpl_cross_version can't pass on conflicts complainig clash with --slave-load-tm
mysql-test/t/index_merge_innodb.test
View file @
bc1f79fb
...
...
@@ -21,14 +21,10 @@ let $index_merge_random_rows_in_EXPLAIN = 1;
# InnoDB does not support Merge tables (affects include/index_merge1.inc)
let
$merge_table_support
=
0
;
# The first two tests are disabled because of non deterministic explain output.
# If include/index_merge1.inc can be enabled for InnoDB and all other
# storage engines, please remove the subtest for Bug#21277 from
# include/index_merge2.inc.
# This test exists already in include/index_merge1.inc.
# -- [DISABLED Bug#45727]
# --source include/index_merge1.inc
# --source include/index_merge_ror.inc
# --source include/index_merge2.inc
--
source
include
/
index_merge2
.
inc
--
source
include
/
index_merge_2sweeps
.
inc
--
source
include
/
index_merge_ror_cpk
.
inc
scripts/make_binary_distribution.sh
View file @
bc1f79fb
...
...
@@ -64,6 +64,7 @@ cflags="@CFLAGS@"
STRIP
=
1
# Option ignored
SILENT
=
0
MALLOC_LIB
=
PLATFORM
=
""
TMP
=
/tmp
NEW_NAME
=
""
# Final top directory and TAR package name
...
...
@@ -76,6 +77,7 @@ for arg do
--tmp
=
*
)
TMP
=
`
echo
"
$arg
"
|
sed
-e
"s;--tmp=;;"
`
;;
--suffix
=
*
)
SUFFIX
=
`
echo
"
$arg
"
|
sed
-e
"s;--suffix=;;"
`
;;
--short-product-tag
=
*
)
SHORT_PRODUCT_TAG
=
`
echo
"
$arg
"
|
sed
-e
"s;--short-product-tag=;;"
`
;;
--inject-malloc-lib
=
*
)
MALLOC_LIB
=
`
echo
"
$arg
"
|
sed
-e
's;^[^=]*=;;'
`
;;
--no-strip
)
STRIP
=
0
;;
--machine
=
*
)
machine
=
`
echo
"
$arg
"
|
sed
-e
"s;--machine=;;"
`
;;
--platform
=
*
)
PLATFORM
=
`
echo
"
$arg
"
|
sed
-e
"s;--platform=;;"
`
;;
...
...
@@ -293,6 +295,12 @@ if [ x"$BASE_SYSTEM" != x"netware" ] ; then
fi
fi
# If requested, add a malloc library .so into pkglibdir for use
# by mysqld_safe
if
[
-n
"
$MALLOC_LIB
"
]
;
then
cp
"
$MALLOC_LIB
"
"
$DEST
/lib/"
fi
# FIXME let this script be in "bin/", where it is in the RPMs?
# http://dev.mysql.com/doc/refman/5.1/en/mysql-install-db-problems.html
mkdir
$DEST
/scripts
...
...
scripts/mysql_config.sh
View file @
bc1f79fb
...
...
@@ -167,6 +167,10 @@ Options:
--port [
$port
]
--version [
$version
]
--libmysqld-libs [
$embedded_libs
]
--variable=VAR VAR is one of:
pkgincludedir [
$pkgincludedir
]
pkglibdir [
$pkglibdir
]
plugindir [
$plugindir
]
EOF
exit
1
}
...
...
@@ -184,6 +188,15 @@ while test $# -gt 0; do
--port
)
echo
"
$port
"
;;
--version
)
echo
"
$version
"
;;
--embedded-libs
|
--embedded
|
--libmysqld-libs
)
echo
"
$embedded_libs
"
;;
--variable
=
*
)
var
=
`
echo
"
$1
"
|
sed
's,^[^=]*=,,'
`
case
"
$var
"
in
pkgincludedir
)
echo
"
$pkgincludedir
"
;;
pkglibdir
)
echo
"
$pkglibdir
"
;;
plugindir
)
echo
"
$plugindir
"
;;
*
)
usage
;;
esac
;;
*
)
usage
;;
esac
...
...
scripts/mysqld_safe.sh
View file @
bc1f79fb
...
...
@@ -11,9 +11,13 @@
# mysql.server works by first doing a cd to the base directory and from there
# executing mysqld_safe
# Initialize script globals
KILL_MYSQLD
=
1
;
MYSQLD
=
niceness
=
0
mysqld_ld_preload
=
mysqld_ld_library_path
=
# Initial logging status: error log is not open, and not using syslog
logging
=
init
want_syslog
=
0
...
...
@@ -46,6 +50,7 @@ Usage: $0 [OPTIONS]
--open-files-limit=LIMIT Limit the number of open files
--core-file-size=LIMIT Limit core files to the specified size
--timezone=TZ Set the system timezone
--malloc-lib=LIB Preload shared library LIB if available
--mysqld=FILE Use the specified file as mysqld
--mysqld-version=VERSION Use "mysqld-VERSION" as mysqld
--nice=NICE Set the scheduling priority of mysqld
...
...
@@ -172,6 +177,7 @@ parse_arguments() {
# mysqld_safe-specific options - must be set in my.cnf ([mysqld_safe])!
--core-file-size
=
*
)
core_file_size
=
"
$val
"
;;
--ledir
=
*
)
ledir
=
"
$val
"
;;
--malloc-lib
=
*
)
set_malloc_lib
"
$val
"
;;
--mysqld
=
*
)
MYSQLD
=
"
$val
"
;;
--mysqld-version
=
*
)
if
test
-n
"
$val
"
...
...
@@ -202,6 +208,131 @@ parse_arguments() {
}
# Add a single shared library to the list of libraries which will be added to
# LD_PRELOAD for mysqld
#
# Since LD_PRELOAD is a space-separated value (for historical reasons), if a
# shared lib's path contains spaces, that path will be prepended to
# LD_LIBRARY_PATH and stripped from the lib value.
add_mysqld_ld_preload
()
{
lib_to_add
=
"
$1
"
log_notice
"Adding '
$lib_to_add
' to LD_PRELOAD for mysqld"
case
"
$lib_to_add
"
in
*
' '
*
)
# Must strip path from lib, and add it to LD_LIBRARY_PATH
lib_file
=
`
basename
"
$lib_to_add
"
`
case
"
$lib_file
"
in
*
' '
*
)
# The lib file itself has a space in its name, and can't
# be used in LD_PRELOAD
log_error
"library name '
$lib_to_add
' contains spaces and can not be used with LD_PRELOAD"
exit
1
;;
esac
lib_path
=
`
dirname
"
$lib_to_add
"
`
lib_to_add
=
"
$lib_file
"
[
-n
"
$mysqld_ld_library_path
"
]
&&
mysqld_ld_library_path
=
"
$mysqld_ld_library_path
:"
mysqld_ld_library_path
=
"
$mysqld_ld_library_path$lib_path
"
;;
esac
# LD_PRELOAD is a space-separated
[
-n
"
$mysqld_ld_preload
"
]
&&
mysqld_ld_preload
=
"
$mysqld_ld_preload
"
mysqld_ld_preload
=
"
${
mysqld_ld_preload
}
$lib_to_add
"
}
# Returns LD_PRELOAD (and LD_LIBRARY_PATH, if needed) text, quoted to be
# suitable for use in the eval that calls mysqld.
#
# All values in mysqld_ld_preload are prepended to LD_PRELOAD.
mysqld_ld_preload_text
()
{
text
=
if
[
-n
"
$mysqld_ld_preload
"
]
;
then
new_text
=
"
$mysqld_ld_preload
"
[
-n
"
$LD_PRELOAD
"
]
&&
new_text
=
"
$new_text
$LD_PRELOAD
"
text
=
"
${
text
}
LD_PRELOAD="
`
shell_quote_string
"
$new_text
"
`
' '
fi
if
[
-n
"
$mysqld_ld_library_path
"
]
;
then
new_text
=
"
$mysqld_ld_library_path
"
[
-n
"
$LD_LIBRARY_PATH
"
]
&&
new_text
=
"
$new_text
:
$LD_LIBRARY_PATH
"
text
=
"
${
text
}
LD_LIBRARY_PATH="
`
shell_quote_string
"
$new_text
"
`
' '
fi
echo
"
$text
"
}
mysql_config
=
get_mysql_config
()
{
if
[
-z
"
$mysql_config
"
]
;
then
mysql_config
=
`
echo
"
$0
"
|
sed
's,/[^/][^/]*$,/mysql_config,'
`
if
[
!
-x
"
$mysql_config
"
]
;
then
log_error
"Can not run mysql_config
$@
from '
$mysql_config
'"
exit
1
fi
fi
"
$mysql_config
"
"
$@
"
}
# set_malloc_lib LIB
# - If LIB is empty, do nothing and return
# - If LIB is 'tcmalloc', look for tcmalloc shared library in /usr/lib
# then pkglibdir. tcmalloc is part of the Google perftools project.
# - If LIB is an absolute path, assume it is a malloc shared library
#
# Put LIB in mysqld_ld_preload, which will be added to LD_PRELOAD when
# running mysqld. See ld.so for details.
set_malloc_lib
()
{
malloc_lib
=
"
$1
"
if
[
"
$malloc_lib
"
=
tcmalloc
]
;
then
pkglibdir
=
`
get_mysql_config
--variable
=
pkglibdir
`
malloc_lib
=
# This list is kept intentionally simple. Simply set --malloc-lib
# to a full path if another location is desired.
for
libdir
in
/usr/lib
"
$pkglibdir
"
;
do
for
flavor
in
_minimal
''
_and_profiler _debug
;
do
tmp
=
"
$libdir
/libtcmalloc
$flavor
.so"
#log_notice "DEBUG: Checking for malloc lib '$tmp'"
[
-r
"
$tmp
"
]
||
continue
malloc_lib
=
"
$tmp
"
break
2
done
done
if
[
-z
"
$malloc_lib
"
]
;
then
log_error
"no shared library for --malloc-lib=tcmalloc found in /usr/lib or
$pkglibdir
"
exit
1
fi
fi
# Allow --malloc-lib='' to override other settings
[
-z
"
$malloc_lib
"
]
&&
return
case
"
$malloc_lib
"
in
/
*
)
if
[
!
-r
"
$malloc_lib
"
]
;
then
log_error
"--malloc-lib '
$malloc_lib
' can not be read and will not be used"
exit
1
fi
;;
*
)
log_error
"--malloc-lib must be an absolute path or 'tcmalloc'; "
\
"ignoring value '
$malloc_lib
'"
exit
1
;;
esac
add_mysqld_ld_preload
"
$malloc_lib
"
}
#
# First, try to find BASEDIR and ledir (where mysqld is)
#
...
...
@@ -549,7 +680,7 @@ fi
# ulimit -n 256 > /dev/null 2>&1 # Fix for BSD and FreeBSD systems
#fi
cmd
=
"
$NOHUP_NICENESS
"
cmd
=
"
`
mysqld_ld_preload_text
`
$NOHUP_NICENESS
"
for
i
in
"
$ledir
/
$MYSQLD
"
"
$defaults
"
"--basedir=
$MY_BASEDIR_VERSION
"
\
"--datadir=
$DATADIR
"
"
$USER_OPTION
"
...
...
support-files/mysql.spec.sh
View file @
bc1f79fb
...
...
@@ -448,6 +448,13 @@ $MBD/libtool --mode=execute install -m 755 \
$RPM_BUILD_DIR
/mysql-%
{
mysql_version
}
/mysql-debug-%
{
mysql_version
}
/sql/mysqld
\
$RBR
%
{
_sbindir
}
/mysqld-debug
%if %
{
?malloc_lib_target:1
}
%
{!
?malloc_lib_target:0
}
# Even though this is a shared library, put it under /usr/lib/mysql, so it
# doesn't conflict with possible shared lib by the same name in /usr/lib. See
# `mysql_config --variable=pkglibdir` and mysqld_safe for how this is used.
install
-m
644
"%{malloc_lib_source}"
"
$RBR
%{_libdir}/mysql/%{malloc_lib_target}"
%endif
# install saved perror binary with NDB support (BUG#13740)
install
-m
755
$MBD
/extra/perror
$RBR
%
{
_bindir
}
/perror
...
...
@@ -707,6 +714,10 @@ fi
%attr
(
755, root, root
)
%
{
_libdir
}
/mysql/plugin/ha_innodb_plugin.so
*
%endif
%if %
{
?malloc_lib_target:1
}
%
{!
?malloc_lib_target:0
}
%attr
(
755, root, root
)
%
{
_libdir
}
/mysql/%
{
malloc_lib_target
}
%endif
%attr
(
755, root, root
)
%
{
_sbindir
}
/mysqld
%attr
(
755, root, root
)
%
{
_sbindir
}
/mysqld-debug
%attr
(
755, root, root
)
%
{
_sbindir
}
/rcmysql
...
...
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