summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mysql-test/r/lowercase_table.result6
-rw-r--r--mysql-test/t/lowercase_table.test11
-rw-r--r--mysql-test/t/reserved_win_names-master.opt1
-rw-r--r--mysys/my_fopen.c5
-rw-r--r--mysys/my_open.c7
5 files changed, 24 insertions, 6 deletions
diff --git a/mysql-test/r/lowercase_table.result b/mysql-test/r/lowercase_table.result
index ef379cebaa9..499f46a237e 100644
--- a/mysql-test/r/lowercase_table.result
+++ b/mysql-test/r/lowercase_table.result
@@ -83,3 +83,9 @@ create table t2 like T1;
drop table t1, t2;
show tables;
Tables_in_test
+use lpt1;
+ERROR 42000: Unknown database 'lpt1'
+use com1;
+ERROR 42000: Unknown database 'com1'
+use prn;
+ERROR 42000: Unknown database 'prn'
diff --git a/mysql-test/t/lowercase_table.test b/mysql-test/t/lowercase_table.test
index ee8dc403981..ca81c7c66bc 100644
--- a/mysql-test/t/lowercase_table.test
+++ b/mysql-test/t/lowercase_table.test
@@ -82,3 +82,14 @@ create table t2 like T1;
drop table t1, t2;
show tables;
+
+#
+#Bug 9148: Denial of service
+#
+--error 1049
+use lpt1;
+--error 1049
+use com1;
+--error 1049
+use prn;
+
diff --git a/mysql-test/t/reserved_win_names-master.opt b/mysql-test/t/reserved_win_names-master.opt
deleted file mode 100644
index 62ab6dad1e0..00000000000
--- a/mysql-test/t/reserved_win_names-master.opt
+++ /dev/null
@@ -1 +0,0 @@
---lower_case_table_names=1
diff --git a/mysys/my_fopen.c b/mysys/my_fopen.c
index 208e7e80fd8..4310250bd0d 100644
--- a/mysys/my_fopen.c
+++ b/mysys/my_fopen.c
@@ -34,8 +34,9 @@ FILE *my_fopen(const char *FileName, int Flags, myf MyFlags)
DBUG_PRINT("my",("Name: '%s' Flags: %d MyFlags: %d",
FileName, Flags, MyFlags));
/*
- * if we are not creating, then we need to use my_access to make sure
- * the file exists since Windows doesn't handle files like "com1.sym" very well
+ if we are not creating, then we need to use my_access to make sure
+ the file exists since Windows doesn't handle files like "com1.sym"
+ very well
*/
#ifdef __WIN__
if (! (Flags & O_CREAT) && my_access(FileName, F_OK))
diff --git a/mysys/my_open.c b/mysys/my_open.c
index 1f3bb95b5a2..ea4d99c3e8c 100644
--- a/mysys/my_open.c
+++ b/mysys/my_open.c
@@ -46,9 +46,10 @@ File my_open(const char *FileName, int Flags, myf MyFlags)
DBUG_PRINT("my",("Name: '%s' Flags: %d MyFlags: %d",
FileName, Flags, MyFlags));
#if defined(MSDOS) || defined(__WIN__) || defined(__EMX__) || defined(OS2)
- /* if we are not creating, then we need to use my_access to make
- * sure the file exists since Windows doesn't handle files like
- * "com1.sym" very well
+ /*
+ if we are not creating, then we need to use my_access to make
+ sure the file exists since Windows doesn't handle files like
+ "com1.sym" very well
*/
if (! (Flags & O_CREAT) && my_access(FileName, F_OK))
return -1;