~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/innobase/pars/pars0pars.cc

  • Committer: Monty Taylor
  • Date: 2010-12-26 05:00:19 UTC
  • mto: This revision was merged to the branch mainline in revision 2038.
  • Revision ID: mordred@inaugust.com-20101226050019-myxhnb0bn243jf7c
More.

Show diffs side-by-side

added added

removed removed

Lines of Context:
867
867
{
868
868
        col_assign_node_t*      node;
869
869
 
870
 
        node = static_cast<col_assign_mode_t *>(mem_heap_alloc(pars_sym_tab_global->heap,
 
870
        node = static_cast<col_assign_node_t *>(mem_heap_alloc(pars_sym_tab_global->heap,
871
871
                              sizeof(col_assign_node_t)));
872
872
        node->common.type = QUE_NODE_COL_ASSIGNMENT;
873
873
 
1217
1217
        while (common) {
1218
1218
                common->parent = parent;
1219
1219
 
1220
 
                common = static_cast<que_common_t>(que_node_get_next(common));
 
1220
                common = static_cast<que_common_t *>(que_node_get_next(common));
1221
1221
        }
1222
1222
}
1223
1223
 
1276
1276
                /* There is a list of elsif conditions */
1277
1277
 
1278
1278
                node->else_part = NULL;
1279
 
                node->elsif_list = static_cast<elsif_node_t>(else_part);
 
1279
                node->elsif_list = static_cast<elsif_node_t *>(else_part);
1280
1280
 
1281
1281
                elsif_node = static_cast<elsif_node_t *>(else_part);
1282
1282
 
1405
1405
{
1406
1406
        assign_node_t*  node;
1407
1407
 
1408
 
        node = mem_heap_alloc(pars_sym_tab_global->heap,
1409
 
                              sizeof(assign_node_t));
 
1408
        node = static_cast<assign_node_t *>(mem_heap_alloc(pars_sym_tab_global->heap,
 
1409
                              sizeof(assign_node_t)));
1410
1410
        node->common.type = QUE_NODE_ASSIGNMENT;
1411
1411
 
1412
1412
        node->var = var;
1458
1458
        /* Logical XOR. */
1459
1459
        ut_a(!into_list != !user_func);
1460
1460
 
1461
 
        node = mem_heap_alloc(pars_sym_tab_global->heap, sizeof(fetch_node_t));
 
1461
        node = static_cast<fetch_node_t *>(mem_heap_alloc(pars_sym_tab_global->heap, sizeof(fetch_node_t)));
1462
1462
 
1463
1463
        node->common.type = QUE_NODE_FETCH;
1464
1464
 
1506
1506
        sym_node_t*     cursor_decl;
1507
1507
        open_node_t*    node;
1508
1508
 
1509
 
        node = mem_heap_alloc(pars_sym_tab_global->heap, sizeof(open_node_t));
 
1509
        node = static_cast<open_node_t *>(mem_heap_alloc(pars_sym_tab_global->heap, sizeof(open_node_t)));
1510
1510
 
1511
1511
        node->common.type = QUE_NODE_OPEN;
1512
1512
 
1516
1516
 
1517
1517
        ut_a(cursor_decl->token_type == SYM_CURSOR);
1518
1518
 
1519
 
        node->op_type = type;
 
1519
        node->op_type = static_cast<open_node_op>(type);
1520
1520
        node->cursor_def = cursor_decl->cursor_def;
1521
1521
 
1522
1522
        return(node);
1533
1533
{
1534
1534
        row_printf_node_t*      node;
1535
1535
 
1536
 
        node = mem_heap_alloc(pars_sym_tab_global->heap,
1537
 
                              sizeof(row_printf_node_t));
 
1536
        node = static_cast<row_printf_node_t *>(mem_heap_alloc(pars_sym_tab_global->heap,
 
1537
                              sizeof(row_printf_node_t)));
1538
1538
        node->common.type = QUE_NODE_ROW_PRINTF;
1539
1539
 
1540
1540
        node->sel_node = sel_node;
1648
1648
                column->resolved = TRUE;
1649
1649
                column->token_type = SYM_COLUMN;
1650
1650
 
1651
 
                column = que_node_get_next(column);
 
1651
                column = static_cast<sym_node_t *>(que_node_get_next(column));
1652
1652
        }
1653
1653
 
1654
1654
        node = tab_create_graph_create(table, pars_sym_tab_global->heap);
1702
1702
                column->resolved = TRUE;
1703
1703
                column->token_type = SYM_COLUMN;
1704
1704
 
1705
 
                column = que_node_get_next(column);
 
1705
                column = static_cast<sym_node_t *>(que_node_get_next(column));
1706
1706
        }
1707
1707
 
1708
1708
        node = ind_create_graph_create(index, pars_sym_tab_global->heap);
1740
1740
 
1741
1741
        thr = que_thr_create(fork, heap);
1742
1742
 
1743
 
        node = mem_heap_alloc(heap, sizeof(proc_node_t));
 
1743
        node = static_cast<proc_node_t *>(mem_heap_alloc(heap, sizeof(proc_node_t)));
1744
1744
 
1745
1745
        node->common.type = QUE_NODE_PROC;
1746
1746
        node->common.parent = thr;
1871
1871
        pars_sym_tab_global = sym_tab_create(heap);
1872
1872
 
1873
1873
        pars_sym_tab_global->string_len = strlen(str);
1874
 
        pars_sym_tab_global->sql_string = mem_heap_dup(
1875
 
                heap, str, pars_sym_tab_global->string_len + 1);
 
1874
        pars_sym_tab_global->sql_string = static_cast<const char *>(mem_heap_dup(
 
1875
                heap, str, pars_sym_tab_global->string_len + 1));
1876
1876
        pars_sym_tab_global->next_char_pos = 0;
1877
1877
        pars_sym_tab_global->info = info;
1878
1878
 
1940
1940
 
1941
1941
        heap = mem_heap_create(512);
1942
1942
 
1943
 
        info = mem_heap_alloc(heap, sizeof(*info));
 
1943
        info = static_cast<pars_info_t *>(mem_heap_alloc(heap, sizeof(*info)));
1944
1944
 
1945
1945
        info->heap = heap;
1946
1946
        info->funcs = NULL;
1980
1980
 
1981
1981
        ut_ad(!pars_info_get_bound_lit(info, name));
1982
1982
 
1983
 
        pbl = mem_heap_alloc(info->heap, sizeof(*pbl));
 
1983
        pbl = static_cast<pars_bound_lit_t *>(mem_heap_alloc(info->heap, sizeof(*pbl)));
1984
1984
 
1985
1985
        pbl->name = name;
1986
1986
        pbl->address = address;
2027
2027
        const char*     name,           /*!< in: name */
2028
2028
        lint            val)            /*!< in: value */
2029
2029
{
2030
 
        byte*   buf = mem_heap_alloc(info->heap, 4);
 
2030
        byte*   buf = static_cast<byte *>(mem_heap_alloc(info->heap, 4));
2031
2031
 
2032
2032
        mach_write_to_4(buf, val);
2033
2033
        pars_info_add_literal(info, name, buf, 4, DATA_INT, 0);
2050
2050
        const char*     name,           /*!< in: name */
2051
2051
        ib_uint64_t     val)            /*!< in: value */
2052
2052
{
2053
 
        byte*   buf = mem_heap_alloc(info->heap, 8);
 
2053
        byte*   buf = static_cast<byte *>(mem_heap_alloc(info->heap, 8));
2054
2054
 
2055
2055
        mach_write_to_8(buf, val);
2056
2056
 
2072
2072
 
2073
2073
        ut_ad(!pars_info_get_user_func(info, name));
2074
2074
 
2075
 
        puf = mem_heap_alloc(info->heap, sizeof(*puf));
 
2075
        puf = static_cast<pars_user_func_t *>(mem_heap_alloc(info->heap, sizeof(*puf)));
2076
2076
 
2077
2077
        puf->name = name;
2078
2078
        puf->func = func;
2099
2099
 
2100
2100
        ut_ad(!pars_info_get_bound_id(info, name));
2101
2101
 
2102
 
        bid = mem_heap_alloc(info->heap, sizeof(*bid));
 
2102
        bid = static_cast<pars_bound_id_t *>(mem_heap_alloc(info->heap, sizeof(*bid)));
2103
2103
 
2104
2104
        bid->name = name;
2105
2105
        bid->id = id;
2131
2131
        vec = info->funcs;
2132
2132
 
2133
2133
        for (i = 0; i < ib_vector_size(vec); i++) {
2134
 
                pars_user_func_t*       puf = ib_vector_get(vec, i);
 
2134
                pars_user_func_t*       puf = static_cast<pars_user_func_t *>(ib_vector_get(vec, i));
2135
2135
 
2136
2136
                if (strcmp(puf->name, name) == 0) {
2137
2137
                        return(puf);
2161
2161
        vec = info->bound_lits;
2162
2162
 
2163
2163
        for (i = 0; i < ib_vector_size(vec); i++) {
2164
 
                pars_bound_lit_t*       pbl = ib_vector_get(vec, i);
 
2164
                pars_bound_lit_t*       pbl = static_cast<pars_bound_lit_t *>(ib_vector_get(vec, i));
2165
2165
 
2166
2166
                if (strcmp(pbl->name, name) == 0) {
2167
2167
                        return(pbl);
2191
2191
        vec = info->bound_ids;
2192
2192
 
2193
2193
        for (i = 0; i < ib_vector_size(vec); i++) {
2194
 
                pars_bound_id_t*        bid = ib_vector_get(vec, i);
 
2194
                pars_bound_id_t*        bid = static_cast<pars_bound_id_t *>(ib_vector_get(vec, i));
2195
2195
 
2196
2196
                if (strcmp(bid->name, name) == 0) {
2197
2197
                        return(bid);