summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mysql-test/include/windows.inc4
-rw-r--r--mysql-test/r/lowercase_table.result6
-rw-r--r--mysql-test/r/windows.result8
-rw-r--r--mysql-test/t/lowercase_table.test10
-rw-r--r--mysql-test/t/windows.test20
-rw-r--r--mysys/my_access.c2
6 files changed, 33 insertions, 17 deletions
diff --git a/mysql-test/include/windows.inc b/mysql-test/include/windows.inc
new file mode 100644
index 00000000000..05ec7b0e021
--- /dev/null
+++ b/mysql-test/include/windows.inc
@@ -0,0 +1,4 @@
+--require r/true.require
+disable_query_log;
+select convert(@@version_compile_os using latin1) IN ("Win32","Win64","Windows") as "TRUE";
+enable_query_log;
diff --git a/mysql-test/r/lowercase_table.result b/mysql-test/r/lowercase_table.result
index 499f46a237e..ef379cebaa9 100644
--- a/mysql-test/r/lowercase_table.result
+++ b/mysql-test/r/lowercase_table.result
@@ -83,9 +83,3 @@ 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/r/windows.result b/mysql-test/r/windows.result
new file mode 100644
index 00000000000..039c5b1476e
--- /dev/null
+++ b/mysql-test/r/windows.result
@@ -0,0 +1,8 @@
+use lpt1;
+ERROR 42000: Unknown database 'lpt1'
+use com1;
+ERROR 42000: Unknown database 'com1'
+use prn;
+ERROR 42000: Unknown database 'prn'
+create table nu (a int);
+drop table nu;
diff --git a/mysql-test/t/lowercase_table.test b/mysql-test/t/lowercase_table.test
index 4d33c8c1c48..709743ce687 100644
--- a/mysql-test/t/lowercase_table.test
+++ b/mysql-test/t/lowercase_table.test
@@ -83,14 +83,4 @@ drop table t1, t2;
show tables;
-#
-#Bug 9148: Denial of service
-#
---error 1049
-use lpt1;
---error 1049
-use com1;
---error 1049
-use prn;
-
# End of 4.1 tests
diff --git a/mysql-test/t/windows.test b/mysql-test/t/windows.test
new file mode 100644
index 00000000000..d6bcfeb8cb3
--- /dev/null
+++ b/mysql-test/t/windows.test
@@ -0,0 +1,20 @@
+# Windows-specific tests
+--source include/windows.inc
+
+#
+# Bug 9148: Denial of service
+#
+--error 1049
+use lpt1;
+--error 1049
+use com1;
+--error 1049
+use prn;
+
+#
+# Bug #12325: Can't create table named 'nu'
+#
+create table nu (a int);
+drop table nu;
+
+# End of 4.1 tests
diff --git a/mysys/my_access.c b/mysys/my_access.c
index 8fc83a020cf..237312b5c9b 100644
--- a/mysys/my_access.c
+++ b/mysys/my_access.c
@@ -105,7 +105,7 @@ int check_if_legal_filename(const char *path)
{
if (*reserved != my_toupper(&my_charset_latin1, *name))
break;
- if (++name == end)
+ if (++name == end && !reserved[1])
DBUG_RETURN(1); /* Found wrong path */
} while (*++reserved);
}