Commit d5996e18 authored by unknown's avatar unknown
Browse files

Merge bk-internal.mysql.com:/home/bk/mysql-4.1/

into serg.mylan:/usr/home/serg/Abk/mysql-4.1


BitKeeper/etc/ignore:
  added support-files/my-innodb-heavy-4G.cnf
sql/sql_select.cc:
  Auto merged
parents 6b20f46a ac9d0ce1
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -907,3 +907,4 @@ vio/test-ssl
vio/test-sslclient
vio/test-sslserver
vio/viotest-ssl
support-files/my-innodb-heavy-4G.cnf
+1 −1
Original line number Diff line number Diff line
@@ -204,7 +204,7 @@ sub trim_the_fat
                open(CONFIGURE,">configure.in") or die "Unable to open configure.in for write: $!\n";
                print CONFIGURE $configure;
                close(CONFIGURE);
                `autoconf`;
                `aclocal && autoheader && aclocal && automake && autoconf`;
                die "'./configure' was not produced!" unless (-f "configure");
                chdir("$cwd");
        }
+8 −5
Original line number Diff line number Diff line
@@ -25,9 +25,12 @@

#define CHECK_KEYS

#define FIX_LENGTH if (length > char_length) \
#define FIX_LENGTH                                                          \
            do {                                                            \
              if (length > char_length)                                     \
                char_length= my_charpos(cs, pos, pos+length, char_length);  \
              set_if_smaller(char_length,length);                           \
            } while(0)

static int _mi_put_key_in_record(MI_INFO *info,uint keynr,byte *record);

@@ -157,7 +160,7 @@ uint _mi_make_key(register MI_INFO *info, uint keynr, uchar *key,
    FIX_LENGTH;
    memcpy((byte*) key, pos, char_length);
    if (length > char_length)
      bfill(key+char_length, length-char_length, ' ');
      cs->cset->fill(cs, key+char_length, length-char_length, ' ');
    key+= length;
  }
  _mi_dpointer(info,key,filepos);
@@ -267,7 +270,7 @@ uint _mi_pack_key(register MI_INFO *info, uint keynr, uchar *key, uchar *old,
    FIX_LENGTH;
    memcpy((byte*) key, pos, char_length);
    if (length > char_length)
      bfill(key+char_length, length-char_length, ' ');
      cs->cset->fill(cs,key+char_length, length-char_length, ' ');
    key+= length;
    k_length-=length;
  }
+4 −2
Original line number Diff line number Diff line
@@ -367,10 +367,12 @@ while test $# -gt 0; do
      VALGRIND=`which valgrind` # this will print an error if not found
      # Give good warning to the user and stop
      if [ -z "$VALGRIND" ] ; then
        $ECHO "You need to have the 'valgrind' program in your PATH to run mysql-test-run with option --valgrind. Valgrind's home page is http://developer.kde.org/~sewardj ."
        $ECHO "You need to have the 'valgrind' program in your PATH to run mysql-test-run with option --valgrind. Valgrind's home page is http://valgrind.kde.org ."
        exit 1
      fi
      VALGRIND="$VALGRIND --tool=memcheck --alignment=8 --leak-check=yes --num-callers=16"
      # >=2.1.2 requires the --tool option, some versions write to stdout, some to stderr
      valgrind --help 2>&1 | grep "\-\-tool" > /dev/null && VALGRIND="$VALGRIND --tool=memcheck"
      VALGRIND="$VALGRIND --alignment=8 --leak-check=yes --num-callers=16"
      EXTRA_MASTER_MYSQLD_OPT="$EXTRA_MASTER_MYSQLD_OPT --skip-safemalloc --skip-bdb"
      EXTRA_SLAVE_MYSQLD_OPT="$EXTRA_SLAVE_MYSQLD_OPT --skip-safemalloc --skip-bdb"
      SLEEP_TIME_AFTER_RESTART=10
+70 −0
Original line number Diff line number Diff line
@@ -412,6 +412,36 @@ select c as c_a from t1 where c='б';
c_a
б
drop table t1;
create table t1 (
c char(10) character set utf8,
unique key a (c(1))
) engine=bdb;
insert into t1 values ('a'),('b'),('c'),('d'),('e'),('f');
insert into t1 values ('aa');
ERROR 23000: Duplicate entry 'aa' for key 1
insert into t1 values ('aaa');
ERROR 23000: Duplicate entry 'aaa' for key 1
insert into t1 values ('б');
insert into t1 values ('бб');
ERROR 23000: Duplicate entry 'б' for key 1
insert into t1 values ('ббб');
ERROR 23000: Duplicate entry 'б' for key 1
select c as c_all from t1 order by c;
c_all
a
b
c
d
e
f
б
select c as c_a from t1 where c='a';
c_a
a
select c as c_a from t1 where c='б';
c_a
б
drop table t1;
create table t1 (c varchar(30) character set utf8 collate utf8_bin, unique(c(10)));
insert into t1 values ('1'),('2'),('3'),('x'),('y'),('z');
insert into t1 values ('aaaaaaaaaa');
@@ -541,6 +571,36 @@ c_a
б
drop table t1;
create table t1 (
c char(10) character set utf8 collate utf8_bin,
unique key a (c(1))
) engine=bdb;
insert into t1 values ('a'),('b'),('c'),('d'),('e'),('f');
insert into t1 values ('aa');
ERROR 23000: Duplicate entry 'aa' for key 1
insert into t1 values ('aaa');
ERROR 23000: Duplicate entry 'aaa' for key 1
insert into t1 values ('б');
insert into t1 values ('бб');
ERROR 23000: Duplicate entry 'б' for key 1
insert into t1 values ('ббб');
ERROR 23000: Duplicate entry 'б' for key 1
select c as c_all from t1 order by c;
c_all
a
b
c
d
e
f
б
select c as c_a from t1 where c='a';
c_a
a
select c as c_a from t1 where c='б';
c_a
б
drop table t1;
create table t1 (
str varchar(255) character set utf8 not null,
key str  (str(2))
) engine=myisam;
@@ -570,3 +630,13 @@ select * from t1 where str='str';
str
str
drop table t1;
create table t1 (
str varchar(255) character set utf8 not null,
key str (str(2))
) engine=bdb;
INSERT INTO t1 VALUES ('str');
INSERT INTO t1 VALUES ('str2');
select * from t1 where str='str';
str
str
drop table t1;
Loading