~vkolesnikov/pbxt/pbxt-drizzle-merge

« back to all changes in this revision

Viewing changes to src/datadic_xt.cc

  • Committer: Paul McCullagh
  • Date: 2009-03-26 10:36:38 UTC
  • mfrom: (598.1.1 pbxt)
  • Revision ID: paul.mccullagh@primebase.org-20090326103638-mie9ly04djrzsefr
Merged changes for RN232

Show diffs side-by-side

added added

removed removed

Lines of Context:
1487
1487
                if (lastColumn && ct_curr_column) {
1488
1488
                        /* This constraint has one column, the current column. */
1489
1489
                        XTDDColumnRef   *cref;
1490
 
                        char                    *name = xt_dup_string(self, ct_curr_column->dc_name);
 
1490
                        char                    *col_name = xt_dup_string(self, ct_curr_column->dc_name);
1491
1491
 
1492
1492
                        if (!(cref = new XTDDColumnRef())) {
1493
 
                                xt_free(self, name);
 
1493
                                xt_free(self, col_name);
1494
1494
                                xt_throw_errno(XT_CONTEXT, XT_ENOMEM);
1495
1495
                        }
1496
 
                        cref->cr_col_name = name;
 
1496
                        cref->cr_col_name = col_name;
1497
1497
                        ct_curr_constraint->co_cols.append(self, cref);
1498
1498
                }
1499
1499
        }
2645
2645
                        /* Check that all the columns can be set to NULL! */
2646
2646
                        XTDDColumn *col;
2647
2647
 
2648
 
                        for (u_int i=0; i<fk->co_cols.size(); i++) {
2649
 
                                if ((col = findColumn(fk->co_cols.itemAt(i)->cr_col_name))) {
 
2648
                        for (u_int j=0; j<fk->co_cols.size(); j++) {
 
2649
                                if ((col = findColumn(fk->co_cols.itemAt(j)->cr_col_name))) {
2650
2650
                                        if (!col->dc_null_ok)
2651
2651
                                                xt_throw_tabcolerr(XT_CONTEXT, XT_ERR_COLUMN_IS_NOT_NULL, fk->fk_ref_tab_name, col->dc_name);
2652
2652
                                }