summaryrefslogtreecommitdiff
path: root/sql/sql_base.cc
diff options
context:
space:
mode:
authorunknown <monty@work.mysql.com>2001-05-31 12:56:05 +0200
committerunknown <monty@work.mysql.com>2001-05-31 12:56:05 +0200
commite6ecbfd629bf92c84f270119405f4796464e7f4e (patch)
tree7fc3c8f38fbab4a3cef1388c3bc2e53b0455c75c /sql/sql_base.cc
parenta14542a61fbaabf30a2735a74401e4cd2734314d (diff)
parent8c8244918fc37bb25656a5f8b451a362e4b16577 (diff)
downloadmariadb-git-e6ecbfd629bf92c84f270119405f4796464e7f4e.tar.gz
merge
BitKeeper/triggers/post-commit: Auto merged acinclude.m4: Auto merged configure.in: Auto merged Docs/manual.texi: Auto merged include/my_sys.h: Auto merged mysql-test/mysql-test-run.sh: Auto merged sql/mysqld.cc: Auto merged sql/sql_base.cc: Auto merged sql/share/estonian/errmsg.txt: Auto merged sql/sql_repl.cc: Auto merged sql/sql_select.h: Auto merged sql/sql_table.cc: Auto merged BitKeeper/etc/logging_ok: Logging to logging@openlogging.org accepted
Diffstat (limited to 'sql/sql_base.cc')
-rw-r--r--sql/sql_base.cc18
1 files changed, 13 insertions, 5 deletions
diff --git a/sql/sql_base.cc b/sql/sql_base.cc
index 077de271e04..83fd02c7ffe 100644
--- a/sql/sql_base.cc
+++ b/sql/sql_base.cc
@@ -1375,11 +1375,6 @@ TABLE *open_ltable(THD *thd, TABLE_LIST *table_list, thr_lock_type lock_type)
bool refresh;
DBUG_ENTER("open_ltable");
-#ifdef __WIN__
- /* Win32 can't drop a file that is open */
- if (lock_type == TL_WRITE_ALLOW_READ)
- lock_type= TL_WRITE;
-#endif
thd->proc_info="Opening table";
while (!(table=open_table(thd,table_list->db ? table_list->db : thd->db,
table_list->real_name,table_list->name,
@@ -1387,6 +1382,19 @@ TABLE *open_ltable(THD *thd, TABLE_LIST *table_list, thr_lock_type lock_type)
if (table)
{
int error;
+
+#ifdef __WIN__
+ /* Win32 can't drop a file that is open */
+ if (lock_type == TL_WRITE_ALLOW_READ
+#ifdef HAVE_GEMINI_DB
+ && table->db_type != DB_TYPE_GEMINI
+#endif /* HAVE_GEMINI_DB */
+ )
+ {
+ lock_type= TL_WRITE;
+ }
+#endif /* __WIN__ */
+
table_list->table=table;
table->grant= table_list->grant;
if (thd->locked_tables)