~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/r/join.result

  • Committer: Stewart Smith
  • Author(s): Marko Mäkelä, Stewart Smith
  • Date: 2010-11-17 05:52:09 UTC
  • mto: (2021.1.2 build)
  • mto: This revision was merged to the branch mainline in revision 1971.
  • Revision ID: stewart@flamingspork.com-20101117055209-69m035q6h7e1txrc
Merge Revision revid:marko.makela@oracle.com-20100629113248-fvl48lnzr44z94gg from MySQL InnoDB

Original revid:marko.makela@oracle.com-20100629113248-fvl48lnzr44z94gg

Original Authors: Marko Mkel <marko.makela@oracle.com>
Original commit message:
Bug#52199 utf32: mbminlen=4, mbmaxlen=4, type->mbminlen=0, type->mbmaxlen=4

Merge and adjust a forgotten change to fix this bug.
rb://393 approved by Jimmy Yang
  ------------------------------------------------------------------------
  r3794 | marko | 2009-01-07 14:14:53 +0000 (Wed, 07 Jan 2009) | 18 lines

  branches/6.0: Allow the minimum length of a multi-byte character to be
  up to 4 bytes. (Bug #35391)

  dtype_t, dict_col_t: Replace mbminlen:2, mbmaxlen:3 with mbminmaxlen:5.
  In this way, the 5 bits can hold two values of 0..4, and the storage size
  of the fields will not cross the 64-bit boundary.  Encode the values as
  DATA_MBMAX * mbmaxlen + mbminlen.  Define the auxiliary macros
  DB_MBMINLEN(mbminmaxlen), DB_MBMAXLEN(mbminmaxlen), and
  DB_MINMAXLEN(mbminlen, mbmaxlen).

  Try to trim and pad UTF-16 and UTF-32 with spaces as appropriate.

  Alexander Barkov suggested the use of cs->cset->fill(cs, buff, len, 0x20).
  ha_innobase::store_key_val_for_row() now does that, but the added function
  row_mysql_pad_col() does not, because it doesn't have the MySQL TABLE object.

  rb://49 approved by Heikki Tuuri
  ------------------------------------------------------------------------

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
INSERT INTO t1 VALUES (1);
5
5
INSERT INTO t2 VALUES (2);
6
6
SELECT * FROM t1 JOIN t2;
7
 
ERROR HY000: Implicit cartesian join attempted.
 
7
S1      S1
 
8
1       2
8
9
SELECT * FROM t1 INNER JOIN t2;
9
 
ERROR HY000: Implicit cartesian join attempted.
 
10
S1      S1
 
11
1       2
10
12
SELECT * from t1 JOIN t2 USING (S1);
11
13
S1
12
14
SELECT * FROM t1 INNER JOIN t2 USING (S1);
72
74
count int DEFAULT '0' NOT NULL,
73
75
qty int,
74
76
phone char(1) DEFAULT '' NOT NULL,
75
 
timestamp_arg datetime,
 
77
timestamp datetime,
76
78
PRIMARY KEY (id),
77
79
KEY token (token(15)),
78
 
KEY timestamp_arg (timestamp_arg),
 
80
KEY timestamp (timestamp),
79
81
UNIQUE token_2 (token(75),count,phone)
80
82
);
81
83
INSERT INTO t1 VALUES (21,'e45703b64de71482360de8fec94c3ade',3,7800,'n','1999-12-23 17:22:21');
297
299
CREATE TABLE t2 (b int);
298
300
CREATE TABLE t3 (c int);
299
301
SELECT * FROM t1 NATURAL JOIN t2 NATURAL JOIN t3;
300
 
ERROR HY000: Implicit cartesian join attempted.
 
302
a       b       c
301
303
DROP TABLE t1, t2, t3;
302
304
create table t1 (i int);
303
305
create table t2 (i int);
772
774
create table t2 (a int, b int, filler char(100), key(a), key(b));
773
775
create table t3 (a int, b int, filler char(100), key(a), key(b));
774
776
insert into t2 
775
 
select @a:= A.a + 10*(B.a + 10*C.a), @a, 'filler' from t1 A, t1 B, t1 C where B.a >= 0;
 
777
select @a:= A.a + 10*(B.a + 10*C.a), @a, 'filler' from t1 A, t1 B, t1 C;
776
778
insert into t3 select * from t2 where a < 800;
777
779
drop table t1, t2, t3;
778
780
create table t1 (a int);
779
781
insert into t1 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
780
782
create table t2 (a int, b int, primary key(a));
781
 
insert into t2 select @v:=A.a+10*B.a, @v  from t1 A, t1 B where B.a >= 0;
 
783
insert into t2 select @v:=A.a+10*B.a, @v  from t1 A, t1 B;
782
784
explain select * from t1;
783
785
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
784
786
1       SIMPLE  t1      ALL     NULL    NULL    NULL    NULL    10