Commit 19809fab authored by unknown's avatar unknown
Browse files

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

into  asksasha.com:/reiser-data/mysql-dev/mysql-4.1-bug7947

parents 4b1cb988 69fae29c
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -188,8 +188,10 @@ byte ft_simple_get_word(CHARSET_INFO *cs, byte **start, byte *end,
    for (word->pos=doc; doc<end; length++, mbl=my_mbcharlen(cs, *(uchar *)doc), doc+=(mbl ? mbl : 1))
      if (true_word_char(cs,*doc))
        mwc= 0;
      else if (!misc_word_char(*doc) || mwc++)
      else if (!misc_word_char(*doc) || mwc)
        break;
      else
        mwc++;

    word->len= (uint)(doc-word->pos) - mwc;

+3 −0
Original line number Diff line number Diff line
@@ -217,7 +217,10 @@ uint _mi_pack_key(register MI_INFO *info, uint keynr, uchar *key, uchar *old,
      {
	k_length-=length;
        if (keyseg->flag & (HA_VAR_LENGTH | HA_BLOB_PART))
        {
          old+= 2;
          k_length-=2;                                  /* Skip length */
        }
	continue;					/* Found NULL */
      }
    }
+7 −0
Original line number Diff line number Diff line
@@ -30,3 +30,10 @@ check table t1;
Table	Op	Msg_type	Msg_text
test.t1	check	status	OK
drop table t1;
CREATE TABLE t1 (a int);
prepare stmt1 from "SELECT * FROM t1 PROCEDURE ANALYSE()";
execute stmt1;
Field_name	Min_value	Max_value	Min_length	Max_length	Empties_or_zeros	Nulls	Avg_value_or_avg_length	Std	Optimal_fieldtype
execute stmt1;
Field_name	Min_value	Max_value	Min_length	Max_length	Empties_or_zeros	Nulls	Avg_value_or_avg_length	Std	Optimal_fieldtype
deallocate prepare stmt1;
+78 −1
Original line number Diff line number Diff line
drop table if exists t1,t2,t3;
drop table if exists t1,t2,t3,t4,t5;
drop database if exists mysqltest;
create table t1 (b char(0));
insert into t1 values (""),(null);
@@ -632,3 +632,80 @@ t1 CREATE TABLE `t1` (
  PRIMARY KEY  (`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
CREATE TABLE t2 (
a int(11) default NULL
);
insert into t2 values(111);
create table t1 ( 
a varchar(12) charset utf8 collate utf8_bin not null, 
b int not null, primary key (a)
) select a, 1 as b from t2 ;
show create table t1;
Table	Create Table
t1	CREATE TABLE `t1` (
  `a` varchar(12) character set utf8 collate utf8_bin NOT NULL default '',
  `b` int(11) NOT NULL default '0',
  PRIMARY KEY  (`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
create table t1 ( 
a varchar(12) charset utf8 collate utf8_bin not null,
b int not null, primary key (a)
) select 'a' as a , 1 as b from t2 ;
show create table t1;
Table	Create Table
t1	CREATE TABLE `t1` (
  `a` varchar(12) character set utf8 collate utf8_bin NOT NULL default '',
  `b` int(11) NOT NULL default '0',
  PRIMARY KEY  (`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
create table t1 ( 
a varchar(12) charset utf8 collate utf8_bin,
b int not null, primary key (a)
) select 'a' as a , 1 as b from t2 ;
show create table t1;
Table	Create Table
t1	CREATE TABLE `t1` (
  `a` varchar(12) character set utf8 collate utf8_bin NOT NULL default '',
  `b` int(11) NOT NULL default '0',
  PRIMARY KEY  (`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1, t2;
create table t1 ( 
a1 int not null,
a2 int, a3 int, a4 int, a5 int, a6 int, a7 int, a8 int, a9 int
);
insert into t1 values (1,1,1, 1,1,1, 1,1,1);
create table t2 ( 
a1 varchar(12) charset utf8 collate utf8_bin not null,
a2 int, a3 int, a4 int, a5 int, a6 int, a7 int, a8 int, a9 int,
primary key (a1)
) select a1,a2,a3,a4,a5,a6,a7,a8,a9 from t1 ;
drop table t2;
create table t2 ( 
a1 varchar(12) charset utf8 collate utf8_bin,
a2 int, a3 int, a4 int, a5 int, a6 int, a7 int, a8 int, a9 int
) select a1,a2,a3,a4,a5,a6,a7,a8,a9 from t1;
drop table t1, t2;
create table t1 ( 
a1 int, a2 int, a3 int, a4 int, a5 int, a6 int, a7 int, a8 int, a9 int
);
insert into t1 values (1,1,1, 1,1,1, 1,1,1);
create table t2 ( 
a1 varchar(12) charset utf8 collate utf8_bin not null,
a2 int, a3 int, a4 int, a5 int, a6 int, a7 int, a8 int, a9 int,
primary key (a1)
) select a1,a2,a3,a4,a5,a6,a7,a8,a9 from t1 ;
drop table t2;
create table t2 ( a int default 3, b int default 3)
select a1,a2 from t1;
show create table t2;
Table	Create Table
t2	CREATE TABLE `t2` (
  `a` int(11) default '3',
  `b` int(11) default '3',
  `a1` int(11) default NULL,
  `a2` int(11) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1, t2;
+4 −0
Original line number Diff line number Diff line
@@ -428,4 +428,8 @@ REPAIR TABLE t1;
Table	Op	Msg_type	Msg_text
test.t1	repair	status	OK
SET myisam_repair_threads=@@global.myisam_repair_threads;
INSERT INTO t1 VALUES('testword\'\'');
SELECT a FROM t1 WHERE MATCH a AGAINST('testword' IN BOOLEAN MODE);
a
testword''
DROP TABLE t1;
Loading