diff options
Diffstat (limited to 'sql/item_create.cc')
-rw-r--r-- | sql/item_create.cc | 35 |
1 files changed, 19 insertions, 16 deletions
diff --git a/sql/item_create.cc b/sql/item_create.cc index 6799fbddd3f..2e72ab24fb0 100644 --- a/sql/item_create.cc +++ b/sql/item_create.cc @@ -1,4 +1,4 @@ -/* Copyright (C) 2000-2003 MySQL AB +/* Copyright (c) 2000, 2010 Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -42,7 +42,7 @@ class Create_native_func : public Create_func { public: - virtual Item *create(THD *thd, LEX_STRING name, List<Item> *item_list); + virtual Item *create_func(THD *thd, LEX_STRING name, List<Item> *item_list); /** Builder method, with no arguments. @@ -69,7 +69,7 @@ protected: class Create_func_arg0 : public Create_func { public: - virtual Item *create(THD *thd, LEX_STRING name, List<Item> *item_list); + virtual Item *create_func(THD *thd, LEX_STRING name, List<Item> *item_list); /** Builder method, with no arguments. @@ -93,7 +93,7 @@ protected: class Create_func_arg1 : public Create_func { public: - virtual Item *create(THD *thd, LEX_STRING name, List<Item> *item_list); + virtual Item *create_func(THD *thd, LEX_STRING name, List<Item> *item_list); /** Builder method, with one argument. @@ -118,7 +118,7 @@ protected: class Create_func_arg2 : public Create_func { public: - virtual Item *create(THD *thd, LEX_STRING name, List<Item> *item_list); + virtual Item *create_func(THD *thd, LEX_STRING name, List<Item> *item_list); /** Builder method, with two arguments. @@ -144,7 +144,7 @@ protected: class Create_func_arg3 : public Create_func { public: - virtual Item *create(THD *thd, LEX_STRING name, List<Item> *item_list); + virtual Item *create_func(THD *thd, LEX_STRING name, List<Item> *item_list); /** Builder method, with three arguments. @@ -194,7 +194,7 @@ protected: class Create_func_no_geom : public Create_func { public: - virtual Item *create(THD *thd, LEX_STRING name, List<Item> *item_list); + virtual Item *create_func(THD *thd, LEX_STRING name, List<Item> *item_list); /** Singleton. */ static Create_func_no_geom s_singleton; @@ -2315,7 +2315,7 @@ static bool has_named_parameters(List<Item> *params) Create_func_no_geom Create_func_no_geom::s_singleton; Item* -Create_func_no_geom::create(THD * /* unused */, +Create_func_no_geom::create_func(THD * /* unused */, LEX_STRING /* unused */, List<Item> * /* unused */) { @@ -2328,7 +2328,7 @@ Create_func_no_geom::create(THD * /* unused */, Item* -Create_qfunc::create(THD *thd, LEX_STRING name, List<Item> *item_list) +Create_qfunc::create_func(THD *thd, LEX_STRING name, List<Item> *item_list) { LEX_STRING db; @@ -2361,7 +2361,7 @@ Create_qfunc::create(THD *thd, LEX_STRING name, List<Item> *item_list) Create_udf_func Create_udf_func::s_singleton; Item* -Create_udf_func::create(THD *thd, LEX_STRING name, List<Item> *item_list) +Create_udf_func::create_func(THD *thd, LEX_STRING name, List<Item> *item_list) { udf_func *udf= find_udf(name.str, name.length); DBUG_ASSERT(udf); @@ -2512,7 +2512,7 @@ Create_sp_func::create_with_db(THD *thd, LEX_STRING db, LEX_STRING name, Item* -Create_native_func::create(THD *thd, LEX_STRING name, List<Item> *item_list) +Create_native_func::create_func(THD *thd, LEX_STRING name, List<Item> *item_list) { if (has_named_parameters(item_list)) { @@ -2525,7 +2525,7 @@ Create_native_func::create(THD *thd, LEX_STRING name, List<Item> *item_list) Item* -Create_func_arg0::create(THD *thd, LEX_STRING name, List<Item> *item_list) +Create_func_arg0::create_func(THD *thd, LEX_STRING name, List<Item> *item_list) { int arg_count= 0; @@ -2543,7 +2543,7 @@ Create_func_arg0::create(THD *thd, LEX_STRING name, List<Item> *item_list) Item* -Create_func_arg1::create(THD *thd, LEX_STRING name, List<Item> *item_list) +Create_func_arg1::create_func(THD *thd, LEX_STRING name, List<Item> *item_list) { int arg_count= 0; @@ -2569,7 +2569,7 @@ Create_func_arg1::create(THD *thd, LEX_STRING name, List<Item> *item_list) Item* -Create_func_arg2::create(THD *thd, LEX_STRING name, List<Item> *item_list) +Create_func_arg2::create_func(THD *thd, LEX_STRING name, List<Item> *item_list) { int arg_count= 0; @@ -2597,7 +2597,7 @@ Create_func_arg2::create(THD *thd, LEX_STRING name, List<Item> *item_list) Item* -Create_func_arg3::create(THD *thd, LEX_STRING name, List<Item> *item_list) +Create_func_arg3::create_func(THD *thd, LEX_STRING name, List<Item> *item_list) { int arg_count= 0; @@ -4185,8 +4185,11 @@ Create_func_rand::create_native(THD *thd, LEX_STRING name, into a table, the order in which the rows are modified may differ between master and slave, because the order is undefined. Hence, the statement is unsafe to log in statement format. + + For normal INSERT's this is howevever safe */ - thd->lex->set_stmt_unsafe(); + if (thd->lex->sql_command != SQLCOM_INSERT) + thd->lex->set_stmt_unsafe(); switch (arg_count) { case 0: |