Post-merge fixes (merge from the main).
mysql-test/r/innodb_mysql.result: Update test results (merge from the main tree). mysql-test/r/query_cache.result: Update test results (merge from the main tree). mysql-test/r/sp.result: Update test results (merge from the main tree). mysql-test/t/query_cache.test: Use --echo End of to simplify future merges. sql/handler.h: st_table_list -> TABLE_LIST sql/item_create.cc: A post-merge fix (this code is in sql_yacc.yy in 5.0) sql/rpl_utility.h: st_table_list -> TABLE_LIST sql/sp.cc: A post-merge fix. sql/sp_head.cc: In 5.1 memdup_root returns void*. sql/sql_show.cc: st_table_list -> TABLE_LIST sql/sql_show.h: st_table_list -> TABLE_LIST sql/sql_yacc.yy: A post-merge fix. sql/table.cc: st_table_list -> TABLE_LIST sql/table.h: st_table_list -> TABLE_LIST
This commit is contained in:
parent
d3c6816362
commit
bc642e1132
@ -166,7 +166,6 @@ t1.a4='UNcT5pIde4I6c2SheTo4gt92OV1jgJCVkXmzyf325R1DwLURkbYHwhydANIZMbKTgdcR5xS';
|
|||||||
id select_type table type possible_keys key key_len ref rows Extra
|
id select_type table type possible_keys key key_len ref rows Extra
|
||||||
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
|
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
End of 4.1 tests
|
|
||||||
create table t1m (a int) engine = MEMORY;
|
create table t1m (a int) engine = MEMORY;
|
||||||
create table t1i (a int);
|
create table t1i (a int);
|
||||||
create table t2m (a int) engine = MEMORY;
|
create table t2m (a int) engine = MEMORY;
|
||||||
@ -362,22 +361,6 @@ id select_type table type possible_keys key key_len ref rows Extra
|
|||||||
1 SIMPLE t2 index NULL fkey 5 NULL 5 Using index
|
1 SIMPLE t2 index NULL fkey 5 NULL 5 Using index
|
||||||
1 SIMPLE t1 eq_ref PRIMARY PRIMARY 4 test.t2.fkey 1 Using where
|
1 SIMPLE t1 eq_ref PRIMARY PRIMARY 4 test.t2.fkey 1 Using where
|
||||||
DROP TABLE t1,t2;
|
DROP TABLE t1,t2;
|
||||||
CREATE TABLE t1 (a INT PRIMARY KEY, b INT, c FLOAT, KEY b(b)) ENGINE = INNODB;
|
|
||||||
INSERT INTO t1 VALUES ( 1 , 1 , 1);
|
|
||||||
INSERT INTO t1 SELECT a + 1 , MOD(a + 1 , 20), 1 FROM t1;
|
|
||||||
INSERT INTO t1 SELECT a + 2 , MOD(a + 2 , 20), 1 FROM t1;
|
|
||||||
INSERT INTO t1 SELECT a + 4 , MOD(a + 4 , 20), 1 FROM t1;
|
|
||||||
INSERT INTO t1 SELECT a + 8 , MOD(a + 8 , 20), 1 FROM t1;
|
|
||||||
INSERT INTO t1 SELECT a + 16, MOD(a + 16, 20), 1 FROM t1;
|
|
||||||
INSERT INTO t1 SELECT a + 32, MOD(a + 32, 20), 1 FROM t1;
|
|
||||||
INSERT INTO t1 SELECT a + 64, MOD(a + 64, 20), 1 FROM t1;
|
|
||||||
EXPLAIN SELECT b, SUM(c) FROM t1 GROUP BY b;
|
|
||||||
id select_type table type possible_keys key key_len ref rows Extra
|
|
||||||
1 SIMPLE t1 index NULL b 5 NULL 128
|
|
||||||
EXPLAIN SELECT SQL_BIG_RESULT b, SUM(c) FROM t1 GROUP BY b;
|
|
||||||
id select_type table type possible_keys key key_len ref rows Extra
|
|
||||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 128 Using filesort
|
|
||||||
DROP TABLE t1;
|
|
||||||
CREATE TABLE t1 (
|
CREATE TABLE t1 (
|
||||||
id int NOT NULL,
|
id int NOT NULL,
|
||||||
name varchar(20) NOT NULL,
|
name varchar(20) NOT NULL,
|
||||||
@ -503,37 +486,6 @@ a
|
|||||||
2
|
2
|
||||||
5
|
5
|
||||||
drop table t1;
|
drop table t1;
|
||||||
set @save_qcache_size=@@global.query_cache_size;
|
|
||||||
set @save_qcache_type=@@global.query_cache_type;
|
|
||||||
set global query_cache_size=10*1024*1024;
|
|
||||||
set global query_cache_type=1;
|
|
||||||
drop table if exists `test`;
|
|
||||||
Warnings:
|
|
||||||
Note 1051 Unknown table 'test'
|
|
||||||
CREATE TABLE `test` (`test1` varchar(3) NOT NULL,
|
|
||||||
`test2` varchar(4) NOT NULL,PRIMARY KEY (`test1`))
|
|
||||||
ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
|
||||||
INSERT INTO `test` (`test1`, `test2`) VALUES ('tes', '5678');
|
|
||||||
select * from test;
|
|
||||||
test1 test2
|
|
||||||
tes 5678
|
|
||||||
INSERT INTO `test` (`test1`, `test2`) VALUES ('tes', '1234')
|
|
||||||
ON DUPLICATE KEY UPDATE `test2` = '1234';
|
|
||||||
select * from test;
|
|
||||||
test1 test2
|
|
||||||
tes 1234
|
|
||||||
flush tables;
|
|
||||||
select * from test;
|
|
||||||
test1 test2
|
|
||||||
tes 1234
|
|
||||||
drop table test;
|
|
||||||
set global query_cache_type=@save_qcache_type;
|
|
||||||
set global query_cache_size=@save_qcache_size;
|
|
||||||
drop table if exists t1;
|
|
||||||
create table t1 (a int) engine=innodb;
|
|
||||||
alter table t1 alter a set default 1;
|
|
||||||
drop table t1;
|
|
||||||
End of 5.0 tests
|
|
||||||
create table t1(
|
create table t1(
|
||||||
id int auto_increment,
|
id int auto_increment,
|
||||||
c char(1) not null,
|
c char(1) not null,
|
||||||
@ -858,6 +810,10 @@ a
|
|||||||
2
|
2
|
||||||
5
|
5
|
||||||
drop table t1;
|
drop table t1;
|
||||||
|
drop table if exists t1;
|
||||||
|
create table t1 (a int) engine=innodb;
|
||||||
|
alter table t1 alter a set default 1;
|
||||||
|
drop table t1;
|
||||||
End of 5.0 tests
|
End of 5.0 tests
|
||||||
CREATE TABLE `t2` (
|
CREATE TABLE `t2` (
|
||||||
`k` int(11) NOT NULL auto_increment,
|
`k` int(11) NOT NULL auto_increment,
|
||||||
|
@ -1301,6 +1301,7 @@ drop procedure f3;
|
|||||||
drop procedure f4;
|
drop procedure f4;
|
||||||
drop table t1;
|
drop table t1;
|
||||||
set GLOBAL query_cache_size=0;
|
set GLOBAL query_cache_size=0;
|
||||||
|
End of 4.1 tests
|
||||||
SET GLOBAL query_cache_size=102400;
|
SET GLOBAL query_cache_size=102400;
|
||||||
create table t1(a int);
|
create table t1(a int);
|
||||||
insert into t1 values(0), (1), (4), (5);
|
insert into t1 values(0), (1), (4), (5);
|
||||||
|
@ -5659,31 +5659,6 @@ t3_id_1 t3_id_2 t4_id
|
|||||||
DROP PROCEDURE p1|
|
DROP PROCEDURE p1|
|
||||||
DROP VIEW v1, v2|
|
DROP VIEW v1, v2|
|
||||||
DROP TABLE t3, t4|
|
DROP TABLE t3, t4|
|
||||||
drop database if exists mysqltest_db1;
|
|
||||||
create database mysqltest_db1;
|
|
||||||
create procedure mysqltest_db1.sp_bug28551() begin end;
|
|
||||||
call mysqltest_db1.sp_bug28551();
|
|
||||||
show warnings;
|
|
||||||
Level Code Message
|
|
||||||
drop database mysqltest_db1;
|
|
||||||
drop database if exists mysqltest_db1;
|
|
||||||
drop table if exists test.t1;
|
|
||||||
create database mysqltest_db1;
|
|
||||||
use mysqltest_db1;
|
|
||||||
drop database mysqltest_db1;
|
|
||||||
create table test.t1 (id int);
|
|
||||||
insert into test.t1 (id) values (1);
|
|
||||||
create procedure test.sp_bug29050() begin select * from t1; end//
|
|
||||||
show warnings;
|
|
||||||
Level Code Message
|
|
||||||
call test.sp_bug29050();
|
|
||||||
id
|
|
||||||
1
|
|
||||||
show warnings;
|
|
||||||
Level Code Message
|
|
||||||
use test;
|
|
||||||
drop procedure sp_bug29050;
|
|
||||||
drop table t1;
|
|
||||||
End of 5.0 tests
|
End of 5.0 tests
|
||||||
Begin of 5.1 tests
|
Begin of 5.1 tests
|
||||||
drop function if exists pi;
|
drop function if exists pi;
|
||||||
@ -6306,6 +6281,31 @@ v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VI
|
|||||||
DROP VIEW v1;
|
DROP VIEW v1;
|
||||||
DROP FUNCTION metered;
|
DROP FUNCTION metered;
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
|
drop database if exists mysqltest_db1;
|
||||||
|
create database mysqltest_db1;
|
||||||
|
create procedure mysqltest_db1.sp_bug28551() begin end;
|
||||||
|
call mysqltest_db1.sp_bug28551();
|
||||||
|
show warnings;
|
||||||
|
Level Code Message
|
||||||
|
drop database mysqltest_db1;
|
||||||
|
drop database if exists mysqltest_db1;
|
||||||
|
drop table if exists test.t1;
|
||||||
|
create database mysqltest_db1;
|
||||||
|
use mysqltest_db1;
|
||||||
|
drop database mysqltest_db1;
|
||||||
|
create table test.t1 (id int);
|
||||||
|
insert into test.t1 (id) values (1);
|
||||||
|
create procedure test.sp_bug29050() begin select * from t1; end//
|
||||||
|
show warnings;
|
||||||
|
Level Code Message
|
||||||
|
call test.sp_bug29050();
|
||||||
|
id
|
||||||
|
1
|
||||||
|
show warnings;
|
||||||
|
Level Code Message
|
||||||
|
use test;
|
||||||
|
drop procedure sp_bug29050;
|
||||||
|
drop table t1;
|
||||||
drop procedure if exists proc_25411_a;
|
drop procedure if exists proc_25411_a;
|
||||||
drop procedure if exists proc_25411_b;
|
drop procedure if exists proc_25411_b;
|
||||||
drop procedure if exists proc_25411_c;
|
drop procedure if exists proc_25411_c;
|
||||||
|
@ -878,7 +878,7 @@ drop procedure f4;
|
|||||||
drop table t1;
|
drop table t1;
|
||||||
set GLOBAL query_cache_size=0;
|
set GLOBAL query_cache_size=0;
|
||||||
|
|
||||||
# End of 4.1 tests
|
--echo End of 4.1 tests
|
||||||
|
|
||||||
#
|
#
|
||||||
# Bug #10303: problem with last_query_cost
|
# Bug #10303: problem with last_query_cost
|
||||||
@ -1129,7 +1129,7 @@ set GLOBAL query_cache_type=default;
|
|||||||
set GLOBAL query_cache_limit=default;
|
set GLOBAL query_cache_limit=default;
|
||||||
set GLOBAL query_cache_min_res_unit=default;
|
set GLOBAL query_cache_min_res_unit=default;
|
||||||
set GLOBAL query_cache_size=default;
|
set GLOBAL query_cache_size=default;
|
||||||
# End of 5.0 tests
|
--echo End of 5.0 tests
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
@ -1174,4 +1174,4 @@ show status like 'Qcache_queries_in_cache';
|
|||||||
drop database db2;
|
drop database db2;
|
||||||
drop database db3;
|
drop database db3;
|
||||||
|
|
||||||
# End of 5.1 tests
|
--echo End of 5.1 tests
|
||||||
|
@ -663,7 +663,7 @@ struct handlerton
|
|||||||
uint (*alter_table_flags)(uint flags);
|
uint (*alter_table_flags)(uint flags);
|
||||||
int (*alter_tablespace)(handlerton *hton, THD *thd, st_alter_tablespace *ts_info);
|
int (*alter_tablespace)(handlerton *hton, THD *thd, st_alter_tablespace *ts_info);
|
||||||
int (*fill_files_table)(handlerton *hton, THD *thd,
|
int (*fill_files_table)(handlerton *hton, THD *thd,
|
||||||
struct st_table_list *tables,
|
TABLE_LIST *tables,
|
||||||
class Item *cond);
|
class Item *cond);
|
||||||
uint32 flags; /* global handler flags */
|
uint32 flags; /* global handler flags */
|
||||||
/*
|
/*
|
||||||
|
@ -2326,7 +2326,7 @@ Item*
|
|||||||
Create_qfunc::create(THD *thd, LEX_STRING name, List<Item> *item_list)
|
Create_qfunc::create(THD *thd, LEX_STRING name, List<Item> *item_list)
|
||||||
{
|
{
|
||||||
LEX_STRING db;
|
LEX_STRING db;
|
||||||
if (thd->copy_db_to(&db.str, &db.length))
|
if (thd->lex->copy_db_to(&db.str, &db.length))
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
return create(thd, db, name, false, item_list);
|
return create(thd, db, name, false, item_list);
|
||||||
|
@ -128,7 +128,7 @@ private:
|
|||||||
slave thread, but nowhere else.
|
slave thread, but nowhere else.
|
||||||
*/
|
*/
|
||||||
struct RPL_TABLE_LIST
|
struct RPL_TABLE_LIST
|
||||||
: public st_table_list
|
: public TABLE_LIST
|
||||||
{
|
{
|
||||||
bool m_tabledef_valid;
|
bool m_tabledef_valid;
|
||||||
table_def m_tabledef;
|
table_def m_tabledef;
|
||||||
|
@ -1954,7 +1954,7 @@ sp_cache_routines_and_add_tables_for_triggers(THD *thd, LEX *lex,
|
|||||||
}
|
}
|
||||||
ret= sp_cache_routines_and_add_tables_aux(thd, lex,
|
ret= sp_cache_routines_and_add_tables_aux(thd, lex,
|
||||||
*last_cached_routine_ptr,
|
*last_cached_routine_ptr,
|
||||||
FALSE, NULL);
|
FALSE);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -567,7 +567,7 @@ sp_head::init_sp_name(THD *thd, sp_name *spname)
|
|||||||
spname->init_qname(thd);
|
spname->init_qname(thd);
|
||||||
|
|
||||||
m_sroutines_key.length= spname->m_sroutines_key.length;
|
m_sroutines_key.length= spname->m_sroutines_key.length;
|
||||||
m_sroutines_key.str= memdup_root(thd->mem_root,
|
m_sroutines_key.str= (char*) memdup_root(thd->mem_root,
|
||||||
spname->m_sroutines_key.str,
|
spname->m_sroutines_key.str,
|
||||||
spname->m_sroutines_key.length + 1);
|
spname->m_sroutines_key.length + 1);
|
||||||
m_sroutines_key.str[0]= static_cast<char>(m_type);
|
m_sroutines_key.str[0]= static_cast<char>(m_type);
|
||||||
|
@ -4094,7 +4094,7 @@ static void store_schema_partitions_record(THD *thd, TABLE *schema_table,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static int get_schema_partitions_record(THD *thd, struct st_table_list *tables,
|
static int get_schema_partitions_record(THD *thd, TABLE_LIST *tables,
|
||||||
TABLE *table, bool res,
|
TABLE *table, bool res,
|
||||||
const char *base_name,
|
const char *base_name,
|
||||||
const char *file_name)
|
const char *file_name)
|
||||||
@ -4640,7 +4640,7 @@ int fill_status(THD *thd, TABLE_LIST *tables, COND *cond)
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
static int
|
static int
|
||||||
get_referential_constraints_record(THD *thd, struct st_table_list *tables,
|
get_referential_constraints_record(THD *thd, TABLE_LIST *tables,
|
||||||
TABLE *table, bool res,
|
TABLE *table, bool res,
|
||||||
const char *base_name, const char *file_name)
|
const char *base_name, const char *file_name)
|
||||||
{
|
{
|
||||||
|
@ -20,9 +20,8 @@
|
|||||||
class String;
|
class String;
|
||||||
class THD;
|
class THD;
|
||||||
struct st_ha_create_information;
|
struct st_ha_create_information;
|
||||||
struct st_table_list;
|
|
||||||
typedef st_ha_create_information HA_CREATE_INFO;
|
typedef st_ha_create_information HA_CREATE_INFO;
|
||||||
typedef st_table_list TABLE_LIST;
|
struct TABLE_LIST;
|
||||||
|
|
||||||
enum find_files_result {
|
enum find_files_result {
|
||||||
FIND_FILES_OK,
|
FIND_FILES_OK,
|
||||||
|
@ -1940,7 +1940,8 @@ sp_name:
|
|||||||
}
|
}
|
||||||
| ident
|
| ident
|
||||||
{
|
{
|
||||||
LEX *lex= Lex;
|
THD *thd= YYTHD;
|
||||||
|
LEX *lex= thd->lex;
|
||||||
LEX_STRING db;
|
LEX_STRING db;
|
||||||
if (check_routine_name(&$1))
|
if (check_routine_name(&$1))
|
||||||
{
|
{
|
||||||
|
@ -98,7 +98,7 @@ View_creation_ctx *View_creation_ctx::create(THD *thd)
|
|||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
|
|
||||||
View_creation_ctx * View_creation_ctx::create(THD *thd,
|
View_creation_ctx * View_creation_ctx::create(THD *thd,
|
||||||
st_table_list *view)
|
TABLE_LIST *view)
|
||||||
{
|
{
|
||||||
View_creation_ctx *ctx= new (thd->mem_root) View_creation_ctx(thd);
|
View_creation_ctx *ctx= new (thd->mem_root) View_creation_ctx(thd);
|
||||||
|
|
||||||
@ -4588,7 +4588,7 @@ Item_subselect *TABLE_LIST::containing_subselect()
|
|||||||
|
|
||||||
DESCRIPTION
|
DESCRIPTION
|
||||||
The parser collects the index hints for each table in a "tagged list"
|
The parser collects the index hints for each table in a "tagged list"
|
||||||
(st_table_list::index_hints). Using the information in this tagged list
|
(TABLE_LIST::index_hints). Using the information in this tagged list
|
||||||
this function sets the members st_table::keys_in_use_for_query,
|
this function sets the members st_table::keys_in_use_for_query,
|
||||||
st_table::keys_in_use_for_group_by, st_table::keys_in_use_for_order_by,
|
st_table::keys_in_use_for_group_by, st_table::keys_in_use_for_order_by,
|
||||||
st_table::force_index and st_table::covering_keys.
|
st_table::force_index and st_table::covering_keys.
|
||||||
@ -4630,7 +4630,7 @@ Item_subselect *TABLE_LIST::containing_subselect()
|
|||||||
FALSE no errors found
|
FALSE no errors found
|
||||||
TRUE found and reported an error.
|
TRUE found and reported an error.
|
||||||
*/
|
*/
|
||||||
bool st_table_list::process_index_hints(TABLE *table)
|
bool TABLE_LIST::process_index_hints(TABLE *table)
|
||||||
{
|
{
|
||||||
/* initialize the result variables */
|
/* initialize the result variables */
|
||||||
table->keys_in_use_for_query= table->keys_in_use_for_group_by=
|
table->keys_in_use_for_query= table->keys_in_use_for_group_by=
|
||||||
|
@ -38,7 +38,7 @@ public:
|
|||||||
static View_creation_ctx *create(THD *thd);
|
static View_creation_ctx *create(THD *thd);
|
||||||
|
|
||||||
static View_creation_ctx *create(THD *thd,
|
static View_creation_ctx *create(THD *thd,
|
||||||
struct st_table_list *view);
|
TABLE_LIST *view);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
View_creation_ctx(THD *thd)
|
View_creation_ctx(THD *thd)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user