Commit b98922b7 authored by gkodinov/kgeorge@magare.gmz's avatar gkodinov/kgeorge@magare.gmz
Browse files

Merge magare.gmz:/home/kgeorge/mysql/work/B36011-take2-5.0-bugteam

into  magare.gmz:/home/kgeorge/mysql/work/B36011-5.1-bugteam
parents 3b42cf90 df3341a7
Loading
Loading
Loading
Loading

.bzrignore

0 → 100644
+3031 −0

File added.

Preview size limit exceeded, changes collapsed.

+31 −0
Original line number Diff line number Diff line
###################################################
#Author:  Mats (based on file written by Jeb)
#Date:    2008-05-06
#Purpose: To wait for slave SQL thread to start
#Details:
#      1) Fill in and setup variables
#      2) loop through looking for both
#         io and sql threads to start
#      3) If loops too long die.
####################################################
connection slave;
let $row_number= 1;
let $run= 1;
let $counter= 300;

while ($run)
{
  let $sql_result= query_get_value("SHOW SLAVE STATUS",  Slave_SQL_Running, $row_number);
  if (`SELECT '$sql_result' = 'Yes'`){
    let $run= 0;
  }
  sleep 0.1;
  if (!$counter){
    --echo "Failed while waiting for slave SQL to start"
    query_vertical SHOW SLAVE STATUS;
    exit;
  }
  dec $counter;
}

+15 −0
Original line number Diff line number Diff line
@@ -4346,6 +4346,21 @@ t1.a= (select b from t2 limit 1) and not
t1.a= (select a from t2 limit 1) ;
a
drop table t1, t2;
CREATE TABLE t1 (a INT);
INSERT INTO t1 VALUES (1),(2);
EXPLAIN EXTENDED SELECT 1 FROM t1 WHERE 1 IN (SELECT 1 FROM t1 GROUP BY a);
id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
1	PRIMARY	t1	ALL	NULL	NULL	NULL	NULL	2	
2	DEPENDENT SUBQUERY	t1	ALL	NULL	NULL	NULL	NULL	2	Using temporary; Using filesort
Warnings:
Note	1003	select 1 AS `1` from `test`.`t1` where <in_optimizer>(1,<exists>(select 1 AS `1` from `test`.`t1` group by `test`.`t1`.`a` having (<cache>(1) = <ref_null_helper>(1))))
EXPLAIN EXTENDED SELECT 1 FROM t1 WHERE 1 IN (SELECT 1 FROM t1 WHERE a > 3 GROUP BY a);
id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
1	PRIMARY	NULL	NULL	NULL	NULL	NULL	NULL	NULL	Impossible WHERE noticed after reading const tables
2	DEPENDENT SUBQUERY	t1	ALL	NULL	NULL	NULL	NULL	2	Using where; Using temporary; Using filesort
Warnings:
Note	1003	select 1 AS `1` from `test`.`t1` where <in_optimizer>(1,<exists>(select 1 AS `1` from `test`.`t1` where (`test`.`t1`.`a` > 3) group by `test`.`t1`.`a` having (<cache>(1) = <ref_null_helper>(1))))
DROP TABLE t1;
End of 5.0 tests.
CREATE TABLE t1 (a int, b int);
INSERT INTO t1 VALUES (2,22),(1,11),(2,22);
+67 −0
Original line number Diff line number Diff line
################################################################################
# inc/partition_alter1_1.inc                                                     #
#                                                                              #
# Purpose:                                                                     #
#   ADD/DROP PRIMARY KEYs and/or UNIQUE INDEXes tests on partitioned tables    #
#   This routine is only useful for the partition_<feature>_<engine> tests.    #
#                                                                              #
#------------------------------------------------------------------------------#
# Original Author: mleich                                                      #
# Original Date: 2006-03-05                                                    #
# Change Author:                                                               #
# Change Date:                                                                 #
# Change:                                                                      #
################################################################################

--echo
--echo #========================================================================
--echo #  1.    ALTER TABLE ADD PRIMARY KEY and/or UNIQUE INDEX
--echo #========================================================================
#         Rule: The table does not have a PRIMARY KEY or UNIQUE INDEX.
#               ---> $unique must be empty
#               ---> The PRIMARY KEY or UNIQUE INDEX to be created must contain
#                     the columns used for partitioning.
--echo #------------------------------------------------------------------------
--echo #  1.1   ADD PRIMARY KEY or UNIQUE INDEX to table with one column (f_int1)
--echo #        within the partitioning function
--echo #------------------------------------------------------------------------
#         Rule: Only f_int1 is used within the partitioning function
#         ---> inc/partition_alter_11.inc
if ($do_pk_tests)
{
   # The value of the following test is maybe covered by 1.1.3.
   if ($more_pk_ui_tests)
   {
      --echo #  1.1.1 PRIMARY KEY consisting of one column
      let $alter= ALTER TABLE t1 ADD PRIMARY KEY(f_int1);
      --source suite/parts/inc/partition_alter_11.inc
   }
   # This must fail, because PRIMARY KEY does not contain f_int1
   let $alter= ALTER TABLE t1 ADD PRIMARY KEY(f_int2);
   --source suite/parts/inc/partition_alter_11.inc
}
# The value of the following test is maybe covered by 1.1.4.
if ($more_pk_ui_tests)
{
   --echo #  1.1.2 UNIQUE INDEX consisting of one column
   let $alter= ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int1);
   --source suite/parts/inc/partition_alter_11.inc
}
# This must fail, because UNIQUE INDEX does not contain f_int1
let $alter= ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int2);
--source suite/parts/inc/partition_alter_11.inc
if ($do_pk_tests)
{
   --echo #  1.1.3 PRIMARY KEY consisting of two columns
   let $alter= ALTER TABLE t1 ADD PRIMARY KEY(f_int1,f_int2);
   --source suite/parts/inc/partition_alter_11.inc
   let $alter= ALTER TABLE t1 ADD PRIMARY KEY(f_int2,f_int1);
   --source suite/parts/inc/partition_alter_11.inc
}
--echo #  1.1.4 UNIQUE INDEX consisting of two columns
let $alter= ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int1,f_int2);
--source suite/parts/inc/partition_alter_11.inc
let $alter= ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int2,f_int1);
--source suite/parts/inc/partition_alter_11.inc

+54 −0
Original line number Diff line number Diff line
################################################################################
# inc/partition_alter1_1_2.inc                                                     #
#                                                                              #
# Purpose:                                                                     #
#   ADD/DROP PRIMARY KEYs and/or UNIQUE INDEXes tests on partitioned tables    #
#   This routine is only useful for the partition_<feature>_<engine> tests.    #
#                                                                              #
#------------------------------------------------------------------------------#
# Original Author: mleich                                                      #
# Original Date: 2006-03-05                                                    #
# Change Author:                                                               #
# Change Date:                                                                 #
# Change:                                                                      #
################################################################################

--echo
--echo #========================================================================
--echo #  1.    ALTER TABLE ADD PRIMARY KEY and/or UNIQUE INDEX
--echo #========================================================================
#         Rule: The table does not have a PRIMARY KEY or UNIQUE INDEX.
#               ---> $unique must be empty
#               ---> The PRIMARY KEY or UNIQUE INDEX to be created must contain
#                     the columns used for partitioning.
#
--echo #------------------------------------------------------------------------
--echo #  1.2   ADD PRIMARY KEY or UNIQUE INDEX to table with two columns
--echo #        (f_int1 and f_int2) within the partitioning function
--echo #------------------------------------------------------------------------
#         Rule: f_int1 and f_int2 is used within the partitioning function
#         ---> inc/partition_alter_13.inc
if ($do_pk_tests)
{
   --echo #  1.2.1 PRIMARY KEY consisting of two columns
   let $alter= ALTER TABLE t1 ADD PRIMARY KEY(f_int1,f_int2);
   --source suite/parts/inc/partition_alter_13.inc
   let $alter= ALTER TABLE t1 ADD PRIMARY KEY(f_int2,f_int1);
   --source suite/parts/inc/partition_alter_13.inc
}
--echo #  1.2.2 UNIQUE INDEX consisting of two columns
let $alter= ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int1,f_int2);
--source suite/parts/inc/partition_alter_13.inc
let $alter= ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int2,f_int1);
--source suite/parts/inc/partition_alter_13.inc
if ($do_pk_tests)
{
   --echo #  1.2.3 PRIMARY KEY and UNIQUE INDEX consisting of two columns
   let $alter= ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int1,f_int2), ADD PRIMARY KEY(f_int2,f_int1);
   --source suite/parts/inc/partition_alter_13.inc
   let $alter= ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int2,f_int1), ADD PRIMARY KEY(f_int1,f_int2);
   --source suite/parts/inc/partition_alter_13.inc
   let $unique= ;
   --source suite/parts/inc/partition_alter_13.inc
}
Loading