summaryrefslogtreecommitdiff
path: root/sql/sql_base.cc
diff options
context:
space:
mode:
authorunknown <monty@donna.mysql.fi>2001-05-17 00:46:50 +0300
committerunknown <monty@donna.mysql.fi>2001-05-17 00:46:50 +0300
commitebe9b6071a73d6953855fd0b2b5144b5b93194fb (patch)
treebfa83a61c2689e0f64e7be02d414bcf366c068a1 /sql/sql_base.cc
parentc23dbe674d9cba45aa3ce0b87e50f83f3d2e9d52 (diff)
downloadmariadb-git-ebe9b6071a73d6953855fd0b2b5144b5b93194fb.tar.gz
Fixed bug when using MERGE on files > 4G
Fixed bug in SELECT db1.table.* FROM db1.table,db2.table Fixed bug in INSERT DELAYED when doing shutdown and a table was locked Changed that tmp_table_size =4G-1 means unlimited. Docs/manual.texi: Added new section about crashed MyISAM tables. Cleaned up subsections for InnoDB client/mysql.cc: Cleanup myisam/mi_rkey.c: Cleanup myisam/mi_search.c: Fixed wrong casts in debug messages myisammrg/myrg_rrnd.c: Fixed bug when using files > 4G mysys/getvar.c: Changed to use longlong to support arguments up to 4G mysys/thr_lock.c: Fix for delay insert sql/mysqld.cc: Increased default size for temporary tables sql/sql_base.cc: Fixed bug in SELECT db1.table.* FROM db1.table,db2.table sql/sql_insert.cc: Fixed bug in INSERT DELAYED when doing shutdown and a table was locked sql/sql_select.cc: Changed that tmp_table_size =4G-1 means unlimited.
Diffstat (limited to 'sql/sql_base.cc')
-rw-r--r--sql/sql_base.cc15
1 files changed, 9 insertions, 6 deletions
diff --git a/sql/sql_base.cc b/sql/sql_base.cc
index 3c81723b61f..e7d63e1e5e4 100644
--- a/sql/sql_base.cc
+++ b/sql/sql_base.cc
@@ -34,8 +34,8 @@ HASH open_cache; /* Used by mysql_test */
static int open_unireg_entry(THD *thd,TABLE *entry,const char *db,
const char *name, const char *alias, bool locked);
-static bool insert_fields(THD *thd,TABLE_LIST *tables, const char *table_name,
- List_iterator<Item> *it);
+static bool insert_fields(THD *thd,TABLE_LIST *tables, const char *db_name,
+ const char *table_name, List_iterator<Item> *it);
static void free_cache_entry(TABLE *entry);
static void mysql_rm_tmp_tables(void);
static key_map get_key_map_from_key_list(TABLE *table,
@@ -1754,7 +1754,8 @@ int setup_fields(THD *thd, TABLE_LIST *tables, List<Item> &fields,
if (item->type() == Item::FIELD_ITEM &&
((Item_field*) item)->field_name[0] == '*')
{
- if (insert_fields(thd,tables,((Item_field*) item)->table_name,&it))
+ if (insert_fields(thd,tables,((Item_field*) item)->db_name,
+ ((Item_field*) item)->table_name,&it))
DBUG_RETURN(-1); /* purecov: inspected */
}
else
@@ -1838,8 +1839,8 @@ static key_map get_key_map_from_key_list(TABLE *table,
****************************************************************************/
static bool
-insert_fields(THD *thd,TABLE_LIST *tables, const char *table_name,
- List_iterator<Item> *it)
+insert_fields(THD *thd,TABLE_LIST *tables, const char *db_name,
+ const char *table_name, List_iterator<Item> *it)
{
uint found;
DBUG_ENTER("insert_fields");
@@ -1851,7 +1852,9 @@ insert_fields(THD *thd,TABLE_LIST *tables, const char *table_name,
if (grant_option && !thd->master_access &&
check_grant_all_columns(thd,SELECT_ACL,table) )
DBUG_RETURN(-1);
- if (!table_name || !strcmp(table_name,tables->name))
+ if (!table_name || (!strcmp(table_name,tables->name) &&
+ (!db_name || !tables->db ||
+ !strcmp(tables->db,db_name))))
{
Field **ptr=table->field,*field;
thd->used_tables|=table->map;