~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_lex.cc

Merged build changes from Antony.

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
#define MYSQL_LEX 1
20
20
#include "mysql_priv.h"
21
21
#include "item_create.h"
22
 
#include <m_ctype.h>
23
 
#include <hash.h>
 
22
#include <mysys/hash.h>
24
23
 
25
24
static int lex_one_token(void *arg, void *yythd);
26
25
 
342
341
  lex->in_sum_func= NULL;
343
342
  /*
344
343
    ok, there must be a better solution for this, long-term
345
 
    I tried "bzero" in the sql_yacc.yy code, but that for
 
344
    I tried "memset" in the sql_yacc.yy code, but that for
346
345
    some reason made the values zero, even if they were set
347
346
  */
348
347
  lex->server_options.server_name= 0;
830
829
 
831
830
      return((int) c);
832
831
 
833
 
    case MY_LEX_IDENT_OR_NCHAR:
834
 
      if (lip->yyPeek() != '\'')
835
 
      {
836
 
        state= MY_LEX_IDENT;
837
 
        break;
838
 
      }
839
 
      /* Found N'string' */
840
 
      lip->yySkip();                         // Skip '
841
 
      if (!(yylval->lex_str.str = get_text(lip, 2, 1)))
842
 
      {
843
 
        state= MY_LEX_CHAR;             // Read char by char
844
 
        break;
845
 
      }
846
 
      yylval->lex_str.length= lip->yytoklen;
847
 
      lex->text_string_is_7bit= (lip->tok_bitmap & 0x80) ? 0 : 1;
848
 
      return(NCHAR_STRING);
849
 
 
850
832
    case MY_LEX_IDENT_OR_HEX:
851
833
      if (lip->yyPeek() == '\'')
852
834
      {                                 // Found x'hex-number'
1831
1813
  }
1832
1814
}
1833
1815
 
1834
 
bool st_select_lex_node::set_braces(bool value __attribute__((__unused__)))
 
1816
bool st_select_lex_node::set_braces(bool value __attribute__((unused)))
1835
1817
{ return 1; }
1836
1818
bool st_select_lex_node::inc_in_sum_expr()           { return 1; }
1837
1819
uint st_select_lex_node::get_in_sum_expr()           { return 0; }
1838
1820
TABLE_LIST* st_select_lex_node::get_table_list()     { return 0; }
1839
1821
List<Item>* st_select_lex_node::get_item_list()      { return 0; }
1840
 
TABLE_LIST *st_select_lex_node::add_table_to_list (THD *thd __attribute__((__unused__)),
1841
 
                                                   Table_ident *table __attribute__((__unused__)),
1842
 
                                                  LEX_STRING *alias __attribute__((__unused__)),
1843
 
                                                  ulong table_join_options __attribute__((__unused__)),
1844
 
                                                  thr_lock_type flags __attribute__((__unused__)),
1845
 
                                                  List<Index_hint> *hints __attribute__((__unused__)),
1846
 
                                                  LEX_STRING *option __attribute__((__unused__)))
 
1822
TABLE_LIST *st_select_lex_node::add_table_to_list (THD *thd __attribute__((unused)),
 
1823
                                                   Table_ident *table __attribute__((unused)),
 
1824
                                                  LEX_STRING *alias __attribute__((unused)),
 
1825
                                                  uint32_t table_join_options __attribute__((unused)),
 
1826
                                                  thr_lock_type flags __attribute__((unused)),
 
1827
                                                  List<Index_hint> *hints __attribute__((unused)),
 
1828
                                                  LEX_STRING *option __attribute__((unused)))
1847
1829
{
1848
1830
  return 0;
1849
1831
}
1850
 
ulong st_select_lex_node::get_table_join_options()
 
1832
uint32_t st_select_lex_node::get_table_join_options()
1851
1833
{
1852
1834
  return 0;
1853
1835
}
1885
1867
}
1886
1868
 
1887
1869
 
1888
 
bool st_select_lex::add_item_to_list(THD *thd __attribute__((__unused__)),
 
1870
bool st_select_lex::add_item_to_list(THD *thd __attribute__((unused)),
1889
1871
                                     Item *item)
1890
1872
{
1891
1873
  return(item_list.push_back(item));
1940
1922
  return &item_list;
1941
1923
}
1942
1924
 
1943
 
ulong st_select_lex::get_table_join_options()
 
1925
uint32_t st_select_lex::get_table_join_options()
1944
1926
{
1945
1927
  return table_join_options;
1946
1928
}
2021
2003
}
2022
2004
 
2023
2005
 
2024
 
void st_select_lex::print_limit(THD *thd __attribute__((__unused__)),
 
2006
void st_select_lex::print_limit(THD *thd __attribute__((unused)),
2025
2007
                                String *str,
2026
2008
                                enum_query_type query_type)
2027
2009
{
2073
2055
  to implement the clean up.
2074
2056
*/
2075
2057
 
2076
 
void st_lex::cleanup_lex_after_parse_error(THD *thd __attribute__((__unused__)))
 
2058
void st_lex::cleanup_lex_after_parse_error(THD *thd __attribute__((unused)))
2077
2059
{
2078
2060
}
2079
2061
 
2569
2551
      backup  Pointer to Query_tables_list instance to be used for backup
2570
2552
*/
2571
2553
 
2572
 
void st_lex::reset_n_backup_query_tables_list(Query_tables_list *backup __attribute__((__unused__)))
 
2554
void st_lex::reset_n_backup_query_tables_list(Query_tables_list *backup __attribute__((unused)))
2573
2555
{
2574
2556
}
2575
2557
 
2582
2564
      backup  Pointer to Query_tables_list instance used for backup
2583
2565
*/
2584
2566
 
2585
 
void st_lex::restore_backup_query_tables_list(Query_tables_list *backup __attribute__((__unused__)))
 
2567
void st_lex::restore_backup_query_tables_list(Query_tables_list *backup __attribute__((unused)))
2586
2568
{
2587
2569
}
2588
2570