Loading innobase/dict/dict0dict.c +11 −1 Original line number Diff line number Diff line Loading @@ -197,6 +197,16 @@ FILE* dict_foreign_err_file = NULL; mutex_t dict_foreign_err_mutex; /* mutex protecting the foreign and unique error buffers */ /********************************************************************** Makes all characters in a NUL-terminated UTF-8 string lower case. */ void dict_casedn_str( /*============*/ char* a) /* in/out: string to put in lower case */ { innobase_casedn_str(a); } /************************************************************************ Checks if the database name in two table names is the same. */ Loading innobase/fil/fil0fil.c +9 −0 Original line number Diff line number Diff line Loading @@ -25,6 +25,7 @@ Created 10/25/1995 Heikki Tuuri #include "srv0start.h" #include "mtr0mtr.h" #include "mtr0log.h" #include "dict0dict.h" /* Loading Loading @@ -2732,7 +2733,15 @@ fil_load_single_table_tablespace( sprintf(filepath, "%s/%s/%s", fil_path_to_mysql_datadir, dbname, filename); srv_normalize_path_for_win(filepath); #ifdef __WIN__ /* If lower_case_table_names is 0 or 2, then MySQL allows database directory names with upper case letters. On Windows, all table and database names in InnoDB are internally always in lower case. Put the file path to lower case, so that we are consistent with InnoDB's internal data dictionary. */ dict_casedn_str(filepath); #endif file = os_file_create_simple_no_error_handling(filepath, OS_FILE_OPEN, OS_FILE_READ_ONLY, &success); if (!success) { Loading innobase/include/dict0dict.h +7 −0 Original line number Diff line number Diff line Loading @@ -26,6 +26,13 @@ Created 1/8/1996 Heikki Tuuri #include "ut0byte.h" #include "trx0types.h" /********************************************************************** Makes all characters in a NUL-terminated UTF-8 string lower case. */ void dict_casedn_str( /*============*/ char* a); /* in/out: string to put in lower case */ /************************************************************************ Get the database name length in a table name. */ Loading mysql-test/r/func_math.result +11 −0 Original line number Diff line number Diff line drop table if exists t1; select floor(5.5),floor(-5.5); floor(5.5) floor(-5.5) 5 -6 Loading Loading @@ -126,3 +127,13 @@ Warnings: Note 1003 select degrees(pi()) AS `degrees(pi())`,radians(360) AS `radians(360)` select rand(rand); ERROR 42S22: Unknown column 'rand' in 'field list' create table t1 select round(1, 6); show create table t1; Table Create Table t1 CREATE TABLE `t1` ( `round(1, 6)` double(7,6) NOT NULL default '0.000000' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 select * from t1; round(1, 6) 1.000000 drop table t1; mysql-test/t/func_math.test +13 −0 Original line number Diff line number Diff line Loading @@ -2,6 +2,10 @@ # Test of math functions # --disable_warnings drop table if exists t1; --enable_warnings select floor(5.5),floor(-5.5); explain extended select floor(5.5),floor(-5.5); select ceiling(5.5),ceiling(-5.5); Loading Loading @@ -58,3 +62,12 @@ explain extended select degrees(pi()),radians(360); --error 1054 select rand(rand); # # Bug #9837: problem with round() # create table t1 select round(1, 6); show create table t1; select * from t1; drop table t1; Loading
innobase/dict/dict0dict.c +11 −1 Original line number Diff line number Diff line Loading @@ -197,6 +197,16 @@ FILE* dict_foreign_err_file = NULL; mutex_t dict_foreign_err_mutex; /* mutex protecting the foreign and unique error buffers */ /********************************************************************** Makes all characters in a NUL-terminated UTF-8 string lower case. */ void dict_casedn_str( /*============*/ char* a) /* in/out: string to put in lower case */ { innobase_casedn_str(a); } /************************************************************************ Checks if the database name in two table names is the same. */ Loading
innobase/fil/fil0fil.c +9 −0 Original line number Diff line number Diff line Loading @@ -25,6 +25,7 @@ Created 10/25/1995 Heikki Tuuri #include "srv0start.h" #include "mtr0mtr.h" #include "mtr0log.h" #include "dict0dict.h" /* Loading Loading @@ -2732,7 +2733,15 @@ fil_load_single_table_tablespace( sprintf(filepath, "%s/%s/%s", fil_path_to_mysql_datadir, dbname, filename); srv_normalize_path_for_win(filepath); #ifdef __WIN__ /* If lower_case_table_names is 0 or 2, then MySQL allows database directory names with upper case letters. On Windows, all table and database names in InnoDB are internally always in lower case. Put the file path to lower case, so that we are consistent with InnoDB's internal data dictionary. */ dict_casedn_str(filepath); #endif file = os_file_create_simple_no_error_handling(filepath, OS_FILE_OPEN, OS_FILE_READ_ONLY, &success); if (!success) { Loading
innobase/include/dict0dict.h +7 −0 Original line number Diff line number Diff line Loading @@ -26,6 +26,13 @@ Created 1/8/1996 Heikki Tuuri #include "ut0byte.h" #include "trx0types.h" /********************************************************************** Makes all characters in a NUL-terminated UTF-8 string lower case. */ void dict_casedn_str( /*============*/ char* a); /* in/out: string to put in lower case */ /************************************************************************ Get the database name length in a table name. */ Loading
mysql-test/r/func_math.result +11 −0 Original line number Diff line number Diff line drop table if exists t1; select floor(5.5),floor(-5.5); floor(5.5) floor(-5.5) 5 -6 Loading Loading @@ -126,3 +127,13 @@ Warnings: Note 1003 select degrees(pi()) AS `degrees(pi())`,radians(360) AS `radians(360)` select rand(rand); ERROR 42S22: Unknown column 'rand' in 'field list' create table t1 select round(1, 6); show create table t1; Table Create Table t1 CREATE TABLE `t1` ( `round(1, 6)` double(7,6) NOT NULL default '0.000000' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 select * from t1; round(1, 6) 1.000000 drop table t1;
mysql-test/t/func_math.test +13 −0 Original line number Diff line number Diff line Loading @@ -2,6 +2,10 @@ # Test of math functions # --disable_warnings drop table if exists t1; --enable_warnings select floor(5.5),floor(-5.5); explain extended select floor(5.5),floor(-5.5); select ceiling(5.5),ceiling(-5.5); Loading Loading @@ -58,3 +62,12 @@ explain extended select degrees(pi()),radians(360); --error 1054 select rand(rand); # # Bug #9837: problem with round() # create table t1 select round(1, 6); show create table t1; select * from t1; drop table t1;