summaryrefslogtreecommitdiff
path: root/sql/table.cc
diff options
context:
space:
mode:
authorunknown <tsmith/tim@siva.hindu.god>2006-10-24 14:42:08 -0600
committerunknown <tsmith/tim@siva.hindu.god>2006-10-24 14:42:08 -0600
commitd4bfae38ac685d1f277fcc1b42ac003f98d8c940 (patch)
treef6b3ce247f0c1b8d045348dca4533d282d470935 /sql/table.cc
parent752e5f1ec77f79009804a6ed316843b184b46394 (diff)
parent69c7200219dd2010de7ca33d89432aff4fbd9e3a (diff)
downloadmariadb-git-d4bfae38ac685d1f277fcc1b42ac003f98d8c940.tar.gz
Merge siva.hindu.god:/usr/home/tim/m/bk/g50
into siva.hindu.god:/usr/home/tim/m/bk/50 configure.in: Auto merged mysql-test/r/rename.result: Auto merged mysql-test/r/subselect.result: Auto merged mysql-test/r/view.result: Auto merged mysql-test/t/subselect.test: Auto merged mysql-test/t/view.test: Auto merged mysys/mf_iocache.c: Auto merged sql/item_func.cc: Auto merged sql/opt_range.cc: Auto merged sql/opt_range.h: Auto merged sql/sql_lex.cc: Auto merged sql/sql_lex.h: Auto merged sql/sql_select.cc: Auto merged sql/sql_table.cc: Auto merged sql/table.cc: Auto merged myisam/sort.c: Manual merge mysql-test/r/innodb_mysql.result: Manual merge mysql-test/t/innodb_mysql.test: Manual merge
Diffstat (limited to 'sql/table.cc')
-rw-r--r--sql/table.cc21
1 files changed, 18 insertions, 3 deletions
diff --git a/sql/table.cc b/sql/table.cc
index cd8e12ca852..d72379efb32 100644
--- a/sql/table.cc
+++ b/sql/table.cc
@@ -468,7 +468,21 @@ int openfrm(THD *thd, const char *name, const char *alias, uint db_stat,
count)))
goto err;
for (count= 0; count < interval->count; count++)
- interval->type_lengths[count]= strlen(interval->type_names[count]);
+ {
+ char *val= (char*) interval->type_names[count];
+ interval->type_lengths[count]= strlen(val);
+ /*
+ Replace all ',' symbols with NAMES_SEP_CHAR.
+ See the comment in unireg.cc, pack_fields() function
+ for details.
+ */
+ for (uint cnt= 0 ; cnt < interval->type_lengths[count] ; cnt++)
+ {
+ char c= val[cnt];
+ if (c == ',')
+ val[cnt]= NAMES_SEP_CHAR;
+ }
+ }
interval->type_lengths[count]= 0;
}
}
@@ -1963,12 +1977,13 @@ bool st_table_list::prep_where(THD *thd, Item **conds,
this expression will not be moved to WHERE condition (i.e. will
be clean correctly for PS/SP)
*/
- tbl->on_expr= and_conds(tbl->on_expr, where);
+ tbl->on_expr= and_conds(tbl->on_expr,
+ where->copy_andor_structure(thd));
break;
}
}
if (tbl == 0)
- *conds= and_conds(*conds, where);
+ *conds= and_conds(*conds, where->copy_andor_structure(thd));
if (arena)
thd->restore_active_arena(arena, &backup);
where_processed= TRUE;