1825
/***************************************************************************
1826
Dump of select to variables
1827
***************************************************************************/
1829
int select_dumpvar::prepare(List<Item> &list, Select_Lex_Unit *u)
1833
if (var_list.elements != list.elements)
1835
my_message(ER_WRONG_NUMBER_OF_COLUMNS_IN_SELECT,
1836
ER(ER_WRONG_NUMBER_OF_COLUMNS_IN_SELECT), MYF(0));
1843
void select_dumpvar::cleanup()
1849
void Query_arena::free_items()
1852
/* This works because items are allocated with sql_alloc() */
1853
for (; free_list; free_list= next)
1855
next= free_list->next;
1856
free_list->delete_self();
1858
/* Postcondition: free_list is 0 */
1864
1826
Statement functions
1904
bool select_dumpvar::send_data(List<Item> &items)
1906
List_iterator_fast<my_var> var_li(var_list);
1907
List_iterator<Item> it(items);
1911
if (unit->offset_limit_cnt)
1912
{ // using limit offset,count
1913
unit->offset_limit_cnt--;
1918
my_message(ER_TOO_MANY_ROWS, ER(ER_TOO_MANY_ROWS), MYF(0));
1921
while ((mv= var_li++) && (item= it++))
1925
Item_func_set_user_var *suv= new Item_func_set_user_var(mv->s, item);
1926
suv->fix_fields(session, 0);
1931
return(session->is_error());
1934
bool select_dumpvar::send_eof()
1937
push_warning(session, DRIZZLE_ERROR::WARN_LEVEL_WARN,
1938
ER_SP_FETCH_NO_DATA, ER(ER_SP_FETCH_NO_DATA));
1940
In order to remember the value of affected rows for ROW_COUNT()
1941
function, SELECT INTO has to have an own SQLCOM.
1942
TODO: split from SQLCOM_SELECT
1944
session->my_ok(row_count);
1948
1866
/****************************************************************************
1949
1867
Tmp_Table_Param
1950
1868
****************************************************************************/
2337
bool Discrete_intervals_list::append(uint64_t start, uint64_t val,
2340
/* first, see if this can be merged with previous */
2341
if ((head == NULL) || tail->merge_if_contiguous(start, val, incr))
2343
/* it cannot, so need to add a new interval */
2344
Discrete_interval *new_interval= new Discrete_interval(start, val, incr);
2345
return(append(new_interval));
2350
bool Discrete_intervals_list::append(Discrete_interval *new_interval)
2352
if (unlikely(new_interval == NULL))
2355
head= current= new_interval;
2357
tail->next= new_interval;
2364
2256
Close a connection.