mirror of
https://github.com/MariaDB/server.git
synced 2025-01-29 10:14:19 +01:00
Merge bk-internal.mysql.com:/data0/bk/mysql-5.1
into bk-internal.mysql.com:/data0/bk/mysql-5.1-kt
This commit is contained in:
commit
1bfe766869
13 changed files with 138 additions and 11 deletions
|
@ -83,7 +83,14 @@ sub mtr_path_exists (@) {
|
|||
sub mtr_script_exists (@) {
|
||||
foreach my $path ( @_ )
|
||||
{
|
||||
return $path if -x $path;
|
||||
if($::glob_win32)
|
||||
{
|
||||
return $path if -f $path;
|
||||
}
|
||||
else
|
||||
{
|
||||
return $path if -x $path;
|
||||
}
|
||||
}
|
||||
if ( @_ == 1 )
|
||||
{
|
||||
|
|
|
@ -43,3 +43,11 @@ id str
|
|||
6 aaaaaa
|
||||
7 aaaaaaa
|
||||
drop table t1;
|
||||
set names cp1250;
|
||||
create table t1 (a varchar(15) collate cp1250_czech_cs NOT NULL, primary key(a));
|
||||
insert into t1 values("abcdefghá");
|
||||
insert into t1 values("ááèè");
|
||||
select a from t1 where a like "abcdefghá";
|
||||
a
|
||||
abcdefghá
|
||||
drop table t1;
|
||||
|
|
|
@ -1281,6 +1281,22 @@ id tid val
|
|||
42749 72 VOLNÝ ADSL
|
||||
44205 72 VOLNÝ ADSL
|
||||
DROP TABLE t1;
|
||||
create table t1(a char(200) collate utf8_unicode_ci NOT NULL default '')
|
||||
default charset=utf8 collate=utf8_unicode_ci;
|
||||
insert into t1 values (unhex('65')), (unhex('C3A9')), (unhex('65'));
|
||||
explain select distinct a from t1;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 3 Using temporary
|
||||
select distinct a from t1;
|
||||
a
|
||||
e
|
||||
explain select a from t1 group by a;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 3 Using temporary; Using filesort
|
||||
select a from t1 group by a;
|
||||
a
|
||||
e
|
||||
drop table t1;
|
||||
CREATE TABLE t1(id varchar(20) NOT NULL) DEFAULT CHARSET=utf8;
|
||||
INSERT INTO t1 VALUES ('xxx'), ('aa'), ('yyy'), ('aa');
|
||||
SELECT id FROM t1;
|
||||
|
|
|
@ -1788,7 +1788,33 @@ length(a)
|
|||
5000
|
||||
drop table t1;
|
||||
drop table t1;
|
||||
End of 5.0 tests
|
||||
DROP TABLE IF EXISTS federated.test;
|
||||
CREATE TABLE federated.test (
|
||||
`i` int(11) NOT NULL,
|
||||
`j` int(11) NOT NULL,
|
||||
`c` varchar(30) default NULL,
|
||||
PRIMARY KEY (`i`,`j`),
|
||||
UNIQUE KEY `i` (`i`,`c`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
||||
DROP TABLE IF EXISTS federated.test1;
|
||||
DROP TABLE IF EXISTS federated.test2;
|
||||
create table federated.test1 (
|
||||
i int not null,
|
||||
j int not null,
|
||||
c varchar(30),
|
||||
primary key (i,j),
|
||||
unique key (i, c))
|
||||
engine = federated
|
||||
connection='mysql://root@127.0.0.1:SLAVE_PORT/federated/test';
|
||||
create table federated.test2 (
|
||||
i int default null,
|
||||
j int not null,
|
||||
c varchar(30),
|
||||
key (i))
|
||||
engine = federated
|
||||
connection='mysql://root@127.0.0.1:SLAVE_PORT/federated/test';
|
||||
drop table federated.test1, federated.test2;
|
||||
drop table federated.test;
|
||||
DROP TABLE IF EXISTS federated.t1;
|
||||
DROP DATABASE IF EXISTS federated;
|
||||
DROP TABLE IF EXISTS federated.t1;
|
||||
|
|
|
@ -16,7 +16,7 @@ CREATE TABLE federated.t1 (
|
|||
`id` int(20) NOT NULL,
|
||||
`name` varchar(32) NOT NULL default ''
|
||||
)
|
||||
DEFAULT CHARSET=latin1 ENGINE=InnoDB;
|
||||
DEFAULT CHARSET=latin1 ENGINE=innodb;
|
||||
DROP TABLE IF EXISTS federated.t1;
|
||||
Warnings:
|
||||
Note 1051 Unknown table 't1'
|
||||
|
|
|
@ -47,4 +47,14 @@ INSERT INTO t1 VALUES (NULL, 'aaaaaaa');
|
|||
select * from t1 where str like 'aa%';
|
||||
drop table t1;
|
||||
|
||||
#
|
||||
# Bug#19741 segfault with cp1250 charset + like + primary key + 64bit os
|
||||
#
|
||||
set names cp1250;
|
||||
create table t1 (a varchar(15) collate cp1250_czech_cs NOT NULL, primary key(a));
|
||||
insert into t1 values("abcdefghá");
|
||||
insert into t1 values("ááèè");
|
||||
select a from t1 where a like "abcdefghá";
|
||||
drop table t1;
|
||||
|
||||
# End of 4.1 tests
|
||||
|
|
|
@ -1026,6 +1026,20 @@ ALTER TABLE t1 ADD KEY idx (tid,val(11));
|
|||
SELECT * FROM t1 WHERE tid=72 and val LIKE 'VOLNÝ ADSL';
|
||||
|
||||
DROP TABLE t1;
|
||||
|
||||
#
|
||||
# Bug 20709: problem with utf8 fields in temporary tables
|
||||
#
|
||||
|
||||
create table t1(a char(200) collate utf8_unicode_ci NOT NULL default '')
|
||||
default charset=utf8 collate=utf8_unicode_ci;
|
||||
insert into t1 values (unhex('65')), (unhex('C3A9')), (unhex('65'));
|
||||
explain select distinct a from t1;
|
||||
select distinct a from t1;
|
||||
explain select a from t1 group by a;
|
||||
select a from t1 group by a;
|
||||
drop table t1;
|
||||
|
||||
# End of 4.1 tests
|
||||
|
||||
#
|
||||
|
|
|
@ -21,6 +21,7 @@ ndb_autodiscover2 : BUG#18952 2006-02-16 jmiller Needs to be fixed w.r.t
|
|||
ndb_binlog_ignore_db : BUG#21279 2006-07-25 ingo Randomly throws a warning
|
||||
ndb_load : BUG#17233 2006-05-04 tomas failed load data from infile causes mysqld dbug_assert, binlog not flushed
|
||||
ndb_restore_compat : BUG#21283 2006-07-26 ingo Test fails randomly
|
||||
partition : BUG#21658 2006-08-16 Partition test fails, --ps-protocol
|
||||
partition_03ndb : BUG#16385 2006-03-24 mikael Partitions: crash when updating a range partitioned NDB table
|
||||
ps : BUG#21524 2006-08-08 pgalbraith 'ps' test fails in --ps-protocol test AMD64 bit
|
||||
ps_7ndb : BUG#18950 2006-02-16 jmiller create table like does not obtain LOCK_open
|
||||
|
@ -44,4 +45,3 @@ rpl_row_basic_7ndb : BUG#21298 2006-07-27 msvensson
|
|||
rpl_truncate_7ndb : BUG#21298 2006-07-27 msvensson
|
||||
crash_commit_before : 2006-08-02 msvensson
|
||||
rpl_ndb_dd_advance : BUG#18679 2006-07-28 jimw (Test fails randomly)
|
||||
federated_transactions : Need to be re-enabled once Patrick's merge is complete
|
||||
|
|
|
@ -1553,5 +1553,49 @@ drop table t1;
|
|||
connection master;
|
||||
drop table t1;
|
||||
|
||||
--echo End of 5.0 tests
|
||||
#
|
||||
# BUG #15133: unique index with nullable value not accepted in federated table
|
||||
#
|
||||
|
||||
connection slave;
|
||||
--disable_warnings
|
||||
DROP TABLE IF EXISTS federated.test;
|
||||
CREATE TABLE federated.test (
|
||||
`i` int(11) NOT NULL,
|
||||
`j` int(11) NOT NULL,
|
||||
`c` varchar(30) default NULL,
|
||||
PRIMARY KEY (`i`,`j`),
|
||||
UNIQUE KEY `i` (`i`,`c`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
||||
--enable_warnings
|
||||
|
||||
connection master;
|
||||
--disable_warnings
|
||||
DROP TABLE IF EXISTS federated.test1;
|
||||
DROP TABLE IF EXISTS federated.test2;
|
||||
--enable_warnings
|
||||
|
||||
--replace_result $SLAVE_MYPORT SLAVE_PORT
|
||||
eval create table federated.test1 (
|
||||
i int not null,
|
||||
j int not null,
|
||||
c varchar(30),
|
||||
primary key (i,j),
|
||||
unique key (i, c))
|
||||
engine = federated
|
||||
connection='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/test';
|
||||
|
||||
--replace_result $SLAVE_MYPORT SLAVE_PORT
|
||||
eval create table federated.test2 (
|
||||
i int default null,
|
||||
j int not null,
|
||||
c varchar(30),
|
||||
key (i))
|
||||
engine = federated
|
||||
connection='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/test';
|
||||
drop table federated.test1, federated.test2;
|
||||
|
||||
connection slave;
|
||||
drop table federated.test;
|
||||
|
||||
source include/federated_cleanup.inc;
|
||||
|
|
|
@ -332,6 +332,7 @@
|
|||
|
||||
*/
|
||||
|
||||
|
||||
#include "mysql_priv.h"
|
||||
#ifdef USE_PRAGMA_IMPLEMENTATION
|
||||
#pragma implementation // gcc: Class implementation
|
||||
|
|
|
@ -117,9 +117,10 @@ public:
|
|||
ulonglong table_flags() const
|
||||
{
|
||||
/* fix server to be able to get remote server table flags */
|
||||
return (HA_PRIMARY_KEY_IN_READ_INDEX | HA_FILE_BASED | HA_REC_NOT_IN_SEQ |
|
||||
HA_AUTO_PART_KEY | HA_CAN_INDEX_BLOBS| HA_NO_PREFIX_CHAR_KEYS |
|
||||
HA_PRIMARY_KEY_REQUIRED_FOR_DELETE | HA_PARTIAL_COLUMN_READ);
|
||||
return (HA_PRIMARY_KEY_IN_READ_INDEX | HA_FILE_BASED
|
||||
| HA_REC_NOT_IN_SEQ | HA_AUTO_PART_KEY | HA_CAN_INDEX_BLOBS |
|
||||
HA_NO_PREFIX_CHAR_KEYS | HA_PRIMARY_KEY_REQUIRED_FOR_DELETE |
|
||||
HA_PARTIAL_COLUMN_READ | HA_NULL_IN_KEY);
|
||||
}
|
||||
/*
|
||||
This is a bitmap of flags that says how the storage engine
|
||||
|
|
|
@ -180,7 +180,7 @@ static int tina_done_func()
|
|||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
Simple lock controls.
|
||||
|
|
|
@ -636,11 +636,11 @@ my_like_range_win1250ch(CHARSET_INFO *cs __attribute__((unused)),
|
|||
ptr++; /* Skip escape */
|
||||
else if (*ptr == w_one || *ptr == w_many) /* '_' or '%' in SQL */
|
||||
break;
|
||||
*min_str = like_range_prefix_min_win1250ch[(uint)(*ptr)];
|
||||
*min_str= like_range_prefix_min_win1250ch[(uint) (uchar) (*ptr)];
|
||||
if (*min_str != min_sort_char)
|
||||
only_min_found= 0;
|
||||
min_str++;
|
||||
*max_str++= like_range_prefix_max_win1250ch[(uint)(*ptr)];
|
||||
*max_str++= like_range_prefix_max_win1250ch[(uint) (uchar) (*ptr)];
|
||||
}
|
||||
|
||||
if (cs->state & MY_CS_BINSORT)
|
||||
|
|
Loading…
Add table
Reference in a new issue