mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Merge tulin@bk-internal.mysql.com:/home/bk/mysql-5.0
into dl145b.mysql.com:/home/ndbdev/tomas/mysql-5.1
This commit is contained in:
@ -3267,12 +3267,6 @@ drop procedure bug8762|
|
|||||||
#
|
#
|
||||||
# BUG#5240: Stored procedure crash if function has cursor declaration
|
# BUG#5240: Stored procedure crash if function has cursor declaration
|
||||||
#
|
#
|
||||||
# The following test case fails in --ps-protocol mode due to some bugs
|
|
||||||
# in algorithm which calculates list of tables to be locked for queries
|
|
||||||
# using Stored Functions. It is disabled until Dmitri fixes this.
|
|
||||||
#
|
|
||||||
--disable_ps_protocol
|
|
||||||
|
|
||||||
--disable_warnings
|
--disable_warnings
|
||||||
drop function if exists bug5240|
|
drop function if exists bug5240|
|
||||||
--enable_warnings
|
--enable_warnings
|
||||||
@ -3292,8 +3286,6 @@ insert into t1 values ("answer", 42)|
|
|||||||
select id, bug5240() from t1|
|
select id, bug5240() from t1|
|
||||||
drop function bug5240|
|
drop function bug5240|
|
||||||
|
|
||||||
--enable_ps_protocol
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# BUG#5278: Stored procedure packets out of order if SET PASSWORD.
|
# BUG#5278: Stored procedure packets out of order if SET PASSWORD.
|
||||||
#
|
#
|
||||||
|
@ -601,7 +601,7 @@ void Item_exists_subselect::fix_length_and_dec()
|
|||||||
max_length= 1;
|
max_length= 1;
|
||||||
max_columns= engine->cols();
|
max_columns= engine->cols();
|
||||||
/* We need only 1 row to determine existence */
|
/* We need only 1 row to determine existence */
|
||||||
unit->global_parameters->select_limit= new Item_int(1);
|
unit->global_parameters->select_limit= new Item_int((int32) 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
double Item_exists_subselect::val_real()
|
double Item_exists_subselect::val_real()
|
||||||
|
@ -340,6 +340,8 @@ extern CHARSET_INFO *national_charset_info, *table_alias_charset;
|
|||||||
#define UNCACHEABLE_SIDEEFFECT 4
|
#define UNCACHEABLE_SIDEEFFECT 4
|
||||||
// forcing to save JOIN for explain
|
// forcing to save JOIN for explain
|
||||||
#define UNCACHEABLE_EXPLAIN 8
|
#define UNCACHEABLE_EXPLAIN 8
|
||||||
|
/* Don't evaluate subqueries in prepare even if they're not correlated */
|
||||||
|
#define UNCACHEABLE_PREPARE 16
|
||||||
|
|
||||||
#ifdef EXTRA_DEBUG
|
#ifdef EXTRA_DEBUG
|
||||||
/*
|
/*
|
||||||
|
@ -1760,6 +1760,7 @@ void st_select_lex_unit::set_limit(SELECT_LEX *sl)
|
|||||||
{
|
{
|
||||||
ulonglong select_limit_val;
|
ulonglong select_limit_val;
|
||||||
|
|
||||||
|
DBUG_ASSERT(! thd->current_arena->is_stmt_prepare());
|
||||||
select_limit_val= sl->select_limit ? sl->select_limit->val_uint() :
|
select_limit_val= sl->select_limit ? sl->select_limit->val_uint() :
|
||||||
HA_POS_ERROR;
|
HA_POS_ERROR;
|
||||||
offset_limit_cnt= sl->offset_limit ? sl->offset_limit->val_uint() : ULL(0);
|
offset_limit_cnt= sl->offset_limit ? sl->offset_limit->val_uint() : ULL(0);
|
||||||
|
@ -304,6 +304,7 @@ public:
|
|||||||
UNCACHEABLE_RAND
|
UNCACHEABLE_RAND
|
||||||
UNCACHEABLE_SIDEEFFECT
|
UNCACHEABLE_SIDEEFFECT
|
||||||
UNCACHEABLE_EXPLAIN
|
UNCACHEABLE_EXPLAIN
|
||||||
|
UNCACHEABLE_PREPARE
|
||||||
*/
|
*/
|
||||||
uint8 uncacheable;
|
uint8 uncacheable;
|
||||||
enum sub_select_type linkage;
|
enum sub_select_type linkage;
|
||||||
|
@ -5173,26 +5173,28 @@ bool
|
|||||||
mysql_new_select(LEX *lex, bool move_down)
|
mysql_new_select(LEX *lex, bool move_down)
|
||||||
{
|
{
|
||||||
SELECT_LEX *select_lex;
|
SELECT_LEX *select_lex;
|
||||||
THD *thd;
|
THD *thd= lex->thd;
|
||||||
DBUG_ENTER("mysql_new_select");
|
DBUG_ENTER("mysql_new_select");
|
||||||
|
|
||||||
if (!(select_lex= new(lex->thd->mem_root) SELECT_LEX()))
|
if (!(select_lex= new (thd->mem_root) SELECT_LEX()))
|
||||||
DBUG_RETURN(1);
|
DBUG_RETURN(1);
|
||||||
select_lex->select_number= ++lex->thd->select_number;
|
select_lex->select_number= ++thd->select_number;
|
||||||
select_lex->init_query();
|
select_lex->init_query();
|
||||||
select_lex->init_select();
|
select_lex->init_select();
|
||||||
select_lex->parent_lex= lex;
|
select_lex->parent_lex= lex;
|
||||||
|
if (thd->current_arena->is_stmt_prepare())
|
||||||
|
select_lex->uncacheable|= UNCACHEABLE_PREPARE;
|
||||||
if (move_down)
|
if (move_down)
|
||||||
{
|
{
|
||||||
SELECT_LEX_UNIT *unit;
|
SELECT_LEX_UNIT *unit;
|
||||||
lex->subqueries= TRUE;
|
lex->subqueries= TRUE;
|
||||||
/* first select_lex of subselect or derived table */
|
/* first select_lex of subselect or derived table */
|
||||||
if (!(unit= new(lex->thd->mem_root) SELECT_LEX_UNIT()))
|
if (!(unit= new (thd->mem_root) SELECT_LEX_UNIT()))
|
||||||
DBUG_RETURN(1);
|
DBUG_RETURN(1);
|
||||||
|
|
||||||
unit->init_query();
|
unit->init_query();
|
||||||
unit->init_select();
|
unit->init_select();
|
||||||
unit->thd= lex->thd;
|
unit->thd= thd;
|
||||||
unit->include_down(lex->current_select);
|
unit->include_down(lex->current_select);
|
||||||
unit->link_next= 0;
|
unit->link_next= 0;
|
||||||
unit->link_prev= 0;
|
unit->link_prev= 0;
|
||||||
@ -5216,7 +5218,7 @@ mysql_new_select(LEX *lex, bool move_down)
|
|||||||
as far as we included SELECT_LEX for UNION unit should have
|
as far as we included SELECT_LEX for UNION unit should have
|
||||||
fake SELECT_LEX for UNION processing
|
fake SELECT_LEX for UNION processing
|
||||||
*/
|
*/
|
||||||
if (!(fake= unit->fake_select_lex= new(lex->thd->mem_root) SELECT_LEX()))
|
if (!(fake= unit->fake_select_lex= new (thd->mem_root) SELECT_LEX()))
|
||||||
DBUG_RETURN(1);
|
DBUG_RETURN(1);
|
||||||
fake->include_standalone(unit,
|
fake->include_standalone(unit,
|
||||||
(SELECT_LEX_NODE**)&unit->fake_select_lex);
|
(SELECT_LEX_NODE**)&unit->fake_select_lex);
|
||||||
|
@ -1838,7 +1838,10 @@ void init_stmt_after_parse(THD *thd, LEX *lex)
|
|||||||
optimisation.
|
optimisation.
|
||||||
*/
|
*/
|
||||||
for (; sl; sl= sl->next_select_in_list())
|
for (; sl; sl= sl->next_select_in_list())
|
||||||
|
{
|
||||||
sl->prep_where= sl->where;
|
sl->prep_where= sl->where;
|
||||||
|
sl->uncacheable&= ~UNCACHEABLE_PREPARE;
|
||||||
|
}
|
||||||
|
|
||||||
for (TABLE_LIST *table= lex->query_tables; table; table= table->next_global)
|
for (TABLE_LIST *table= lex->query_tables; table; table= table->next_global)
|
||||||
table->prep_on_expr= table->on_expr;
|
table->prep_on_expr= table->on_expr;
|
||||||
|
@ -7985,7 +7985,7 @@ handler:
|
|||||||
LEX *lex=Lex;
|
LEX *lex=Lex;
|
||||||
lex->sql_command = SQLCOM_HA_READ;
|
lex->sql_command = SQLCOM_HA_READ;
|
||||||
lex->ha_rkey_mode= HA_READ_KEY_EXACT; /* Avoid purify warnings */
|
lex->ha_rkey_mode= HA_READ_KEY_EXACT; /* Avoid purify warnings */
|
||||||
lex->current_select->select_limit= new Item_int(1);
|
lex->current_select->select_limit= new Item_int((int32) 1);
|
||||||
lex->current_select->offset_limit= 0;
|
lex->current_select->offset_limit= 0;
|
||||||
if (!lex->current_select->add_table_to_list(lex->thd, $2, 0, 0))
|
if (!lex->current_select->add_table_to_list(lex->thd, $2, 0, 0))
|
||||||
YYABORT;
|
YYABORT;
|
||||||
|
@ -188,7 +188,7 @@ IPCConfig::configureTransporters(Uint32 nodeId,
|
|||||||
if(iter.get(CFG_NODE_HOST, &hostname)) continue;
|
if(iter.get(CFG_NODE_HOST, &hostname)) continue;
|
||||||
if( strlen(hostname) == 0 ) continue;
|
if( strlen(hostname) == 0 ) continue;
|
||||||
if(iter.get(CFG_MGM_PORT, &port)) continue;
|
if(iter.get(CFG_MGM_PORT, &port)) continue;
|
||||||
connect_string.appfmt("%s%s:port",separator,hostname,port);
|
connect_string.appfmt("%s%s:%u",separator,hostname,port);
|
||||||
separator= ",";
|
separator= ",";
|
||||||
}
|
}
|
||||||
NdbMgmHandle h= ndb_mgm_create_handle();
|
NdbMgmHandle h= ndb_mgm_create_handle();
|
||||||
|
Reference in New Issue
Block a user