summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mysql-test/r/innodb_mysql.result52
-rw-r--r--mysql-test/r/query_cache.result1
-rw-r--r--mysql-test/r/sp.result50
-rw-r--r--mysql-test/t/query_cache.test6
-rw-r--r--sql/handler.h2
-rw-r--r--sql/item_create.cc2
-rw-r--r--sql/rpl_utility.h2
-rw-r--r--sql/sp.cc2
-rw-r--r--sql/sp_head.cc6
-rw-r--r--sql/sql_show.cc4
-rw-r--r--sql/sql_show.h3
-rw-r--r--sql/sql_yacc.yy3
-rw-r--r--sql/table.cc6
-rw-r--r--sql/table.h2
14 files changed, 49 insertions, 92 deletions
diff --git a/mysql-test/r/innodb_mysql.result b/mysql-test/r/innodb_mysql.result
index 3e4e10780d2..8a4749a478d 100644
--- a/mysql-test/r/innodb_mysql.result
+++ b/mysql-test/r/innodb_mysql.result
@@ -166,7 +166,6 @@ t1.a4='UNcT5pIde4I6c2SheTo4gt92OV1jgJCVkXmzyf325R1DwLURkbYHwhydANIZMbKTgdcR5xS';
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
DROP TABLE t1;
-End of 4.1 tests
create table t1m (a int) engine = MEMORY;
create table t1i (a int);
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 t1 eq_ref PRIMARY PRIMARY 4 test.t2.fkey 1 Using where
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 (
id int NOT NULL,
name varchar(20) NOT NULL,
@@ -503,37 +486,6 @@ a
2
5
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(
id int auto_increment,
c char(1) not null,
@@ -858,6 +810,10 @@ a
2
5
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
CREATE TABLE `t2` (
`k` int(11) NOT NULL auto_increment,
diff --git a/mysql-test/r/query_cache.result b/mysql-test/r/query_cache.result
index db513902b2c..7a3cbf26a21 100644
--- a/mysql-test/r/query_cache.result
+++ b/mysql-test/r/query_cache.result
@@ -1301,6 +1301,7 @@ drop procedure f3;
drop procedure f4;
drop table t1;
set GLOBAL query_cache_size=0;
+End of 4.1 tests
SET GLOBAL query_cache_size=102400;
create table t1(a int);
insert into t1 values(0), (1), (4), (5);
diff --git a/mysql-test/r/sp.result b/mysql-test/r/sp.result
index 9c98dc8d027..273c60110b3 100644
--- a/mysql-test/r/sp.result
+++ b/mysql-test/r/sp.result
@@ -5659,31 +5659,6 @@ t3_id_1 t3_id_2 t4_id
DROP PROCEDURE p1|
DROP VIEW v1, v2|
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
Begin of 5.1 tests
drop function if exists pi;
@@ -6306,6 +6281,31 @@ v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VI
DROP VIEW v1;
DROP FUNCTION metered;
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_b;
drop procedure if exists proc_25411_c;
diff --git a/mysql-test/t/query_cache.test b/mysql-test/t/query_cache.test
index 3a2434892c5..e0db99cf42b 100644
--- a/mysql-test/t/query_cache.test
+++ b/mysql-test/t/query_cache.test
@@ -878,7 +878,7 @@ drop procedure f4;
drop table t1;
set GLOBAL query_cache_size=0;
-# End of 4.1 tests
+--echo End of 4.1 tests
#
# 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_min_res_unit=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 db3;
-# End of 5.1 tests
+--echo End of 5.1 tests
diff --git a/sql/handler.h b/sql/handler.h
index c4e45e5b8f1..f45b28c55f5 100644
--- a/sql/handler.h
+++ b/sql/handler.h
@@ -663,7 +663,7 @@ struct handlerton
uint (*alter_table_flags)(uint flags);
int (*alter_tablespace)(handlerton *hton, THD *thd, st_alter_tablespace *ts_info);
int (*fill_files_table)(handlerton *hton, THD *thd,
- struct st_table_list *tables,
+ TABLE_LIST *tables,
class Item *cond);
uint32 flags; /* global handler flags */
/*
diff --git a/sql/item_create.cc b/sql/item_create.cc
index e20926c564f..fa15b992e5c 100644
--- a/sql/item_create.cc
+++ b/sql/item_create.cc
@@ -2326,7 +2326,7 @@ Item*
Create_qfunc::create(THD *thd, LEX_STRING name, List<Item> *item_list)
{
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 create(thd, db, name, false, item_list);
diff --git a/sql/rpl_utility.h b/sql/rpl_utility.h
index 2ce8def4577..79e69aecaeb 100644
--- a/sql/rpl_utility.h
+++ b/sql/rpl_utility.h
@@ -128,7 +128,7 @@ private:
slave thread, but nowhere else.
*/
struct RPL_TABLE_LIST
- : public st_table_list
+ : public TABLE_LIST
{
bool m_tabledef_valid;
table_def m_tabledef;
diff --git a/sql/sp.cc b/sql/sp.cc
index d806673c6f3..aed4976f839 100644
--- a/sql/sp.cc
+++ b/sql/sp.cc
@@ -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,
*last_cached_routine_ptr,
- FALSE, NULL);
+ FALSE);
return ret;
}
diff --git a/sql/sp_head.cc b/sql/sp_head.cc
index a11c3c666c8..9b67a89bed2 100644
--- a/sql/sp_head.cc
+++ b/sql/sp_head.cc
@@ -567,9 +567,9 @@ sp_head::init_sp_name(THD *thd, sp_name *spname)
spname->init_qname(thd);
m_sroutines_key.length= spname->m_sroutines_key.length;
- m_sroutines_key.str= memdup_root(thd->mem_root,
- spname->m_sroutines_key.str,
- spname->m_sroutines_key.length + 1);
+ m_sroutines_key.str= (char*) memdup_root(thd->mem_root,
+ spname->m_sroutines_key.str,
+ spname->m_sroutines_key.length + 1);
m_sroutines_key.str[0]= static_cast<char>(m_type);
m_qname.length= m_sroutines_key.length - 1;
diff --git a/sql/sql_show.cc b/sql/sql_show.cc
index e503d0acd84..c6bf816b290 100644
--- a/sql/sql_show.cc
+++ b/sql/sql_show.cc
@@ -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,
const char *base_name,
const char *file_name)
@@ -4640,7 +4640,7 @@ int fill_status(THD *thd, TABLE_LIST *tables, COND *cond)
*/
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,
const char *base_name, const char *file_name)
{
diff --git a/sql/sql_show.h b/sql/sql_show.h
index d5c3f3bf675..57004323ca9 100644
--- a/sql/sql_show.h
+++ b/sql/sql_show.h
@@ -20,9 +20,8 @@
class String;
class THD;
struct st_ha_create_information;
-struct st_table_list;
typedef st_ha_create_information HA_CREATE_INFO;
-typedef st_table_list TABLE_LIST;
+struct TABLE_LIST;
enum find_files_result {
FIND_FILES_OK,
diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy
index 08ce421ef86..d9a808bf8f7 100644
--- a/sql/sql_yacc.yy
+++ b/sql/sql_yacc.yy
@@ -1940,7 +1940,8 @@ sp_name:
}
| ident
{
- LEX *lex= Lex;
+ THD *thd= YYTHD;
+ LEX *lex= thd->lex;
LEX_STRING db;
if (check_routine_name(&$1))
{
diff --git a/sql/table.cc b/sql/table.cc
index 6678073e145..5ac43343934 100644
--- a/sql/table.cc
+++ b/sql/table.cc
@@ -98,7 +98,7 @@ 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);
@@ -4588,7 +4588,7 @@ Item_subselect *TABLE_LIST::containing_subselect()
DESCRIPTION
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,
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.
@@ -4630,7 +4630,7 @@ Item_subselect *TABLE_LIST::containing_subselect()
FALSE no errors found
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 */
table->keys_in_use_for_query= table->keys_in_use_for_group_by=
diff --git a/sql/table.h b/sql/table.h
index b70517d5067..494b74d564c 100644
--- a/sql/table.h
+++ b/sql/table.h
@@ -38,7 +38,7 @@ public:
static View_creation_ctx *create(THD *thd);
static View_creation_ctx *create(THD *thd,
- struct st_table_list *view);
+ TABLE_LIST *view);
private:
View_creation_ctx(THD *thd)