Commit dbf59fd4 authored by unknown's avatar unknown

Manual merge


mysql-test/r/sp.result:
  Manual merge.
  - lowercase 'default' changes to uppercase 'DEFAULT'
sql/item_func.cc:
  Manual merge
  - shared tables is handled differently in 5.1.
  - Use of LEX_STRING instead of char*.
  - Dummy table allocated differently.
parent c01a4f9b
...@@ -5899,16 +5899,16 @@ insert into examplebug20777 values (1, 9223372036854775806, 9223372036854775807, ...@@ -5899,16 +5899,16 @@ insert into examplebug20777 values (1, 9223372036854775806, 9223372036854775807,
show create table examplebug20777; show create table examplebug20777;
Table Create Table Table Create Table
examplebug20777 CREATE TABLE `examplebug20777` ( examplebug20777 CREATE TABLE `examplebug20777` (
`i` int(1) NOT NULL default '0', `i` int(1) NOT NULL DEFAULT '0',
`2**63-2` bigint(20) unsigned default NULL, `2**63-2` bigint(20) unsigned DEFAULT NULL,
`2**63-1` bigint(20) unsigned default NULL, `2**63-1` bigint(20) unsigned DEFAULT NULL,
`2**63` bigint(20) unsigned default NULL, `2**63` bigint(20) unsigned DEFAULT NULL,
`2**63+1` bigint(20) unsigned default NULL, `2**63+1` bigint(20) unsigned DEFAULT NULL,
`2**64-2` bigint(20) unsigned default NULL, `2**64-2` bigint(20) unsigned DEFAULT NULL,
`2**64-1` bigint(20) unsigned default NULL, `2**64-1` bigint(20) unsigned DEFAULT NULL,
`2**64` bigint(20) unsigned default NULL, `2**64` bigint(20) unsigned DEFAULT NULL,
`0` bigint(20) unsigned default NULL, `0` bigint(20) unsigned DEFAULT NULL,
`-1` bigint(20) unsigned default NULL `-1` bigint(20) unsigned DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 ) ENGINE=MyISAM DEFAULT CHARSET=latin1
select * from examplebug20777 order by i; select * from examplebug20777 order by i;
i 2**63-2 2**63-1 2**63 2**63+1 2**64-2 2**64-1 2**64 0 -1 i 2**63-2 2**63-1 2**63 2**63+1 2**64-2 2**64-1 2**64 0 -1
......
...@@ -5009,7 +5009,7 @@ Item_func_sp::cleanup() ...@@ -5009,7 +5009,7 @@ Item_func_sp::cleanup()
sp_result_field= NULL; sp_result_field= NULL;
} }
m_sp= NULL; m_sp= NULL;
dummy_table->s= NULL; dummy_table->alias= NULL;
Item_func::cleanup(); Item_func::cleanup();
} }
...@@ -5057,13 +5057,13 @@ bool ...@@ -5057,13 +5057,13 @@ bool
Item_func_sp::init_result_field(THD *thd) Item_func_sp::init_result_field(THD *thd)
{ {
DBUG_ENTER("Item_func_sp::init_result_field"); DBUG_ENTER("Item_func_sp::init_result_field");
LEX_STRING empty_name= { STRING_WITH_LEN("") };
char *empty_name= (char *) "";
TABLE_SHARE *share; TABLE_SHARE *share;
DBUG_ASSERT(m_sp == NULL); DBUG_ASSERT(m_sp == NULL);
DBUG_ASSERT(sp_result_field == NULL); DBUG_ASSERT(sp_result_field == NULL);
DBUG_ASSERT(dummy_table->s == NULL);
if (!(m_sp= sp_find_routine(thd, TYPE_ENUM_FUNCTION, m_name, if (!(m_sp= sp_find_routine(thd, TYPE_ENUM_FUNCTION, m_name,
&thd->sp_func_cache, TRUE))) &thd->sp_func_cache, TRUE)))
...@@ -5078,8 +5078,9 @@ Item_func_sp::init_result_field(THD *thd) ...@@ -5078,8 +5078,9 @@ Item_func_sp::init_result_field(THD *thd)
Below we "create" a dummy table by initializing Below we "create" a dummy table by initializing
the needed pointers. the needed pointers.
*/ */
dummy_table->s= share= &dummy_table->share_not_to_be_used;
dummy_table->alias = empty_name; share= dummy_table->s;
dummy_table->alias = "";
dummy_table->maybe_null = maybe_null; dummy_table->maybe_null = maybe_null;
dummy_table->in_use= thd; dummy_table->in_use= thd;
dummy_table->copy_blobs= TRUE; dummy_table->copy_blobs= TRUE;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment