Loading extra/perror.c +38 −2 Original line number Diff line number Diff line Loading @@ -185,11 +185,36 @@ static const char *get_ha_error_msg(int code) } #if defined(__WIN__) static my_bool print_win_error_msg(DWORD error, my_bool verbose) { LPTSTR s; if (FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM, NULL, error, 0, (LPTSTR)&s, 0, NULL)) { if (verbose) printf("Win32 error code %d: %s", error, s); else puts(s); LocalFree(s); return 0; } return 1; } #endif int main(int argc,char *argv[]) { int error,code,found; const char *msg; char *unknown_error = 0; #if defined(__WIN__) my_bool skip_win_message= 0; #endif MY_INIT(argv[0]); if (get_options(&argc,&argv)) Loading Loading @@ -293,9 +318,20 @@ int main(int argc,char *argv[]) } if (!found) { #if defined(__WIN__) if (!(skip_win_message= !print_win_error_msg((DWORD)code, verbose))) { #endif fprintf(stderr,"Illegal error code: %d\n",code); error=1; #if defined(__WIN__) } #endif } #if defined(__WIN__) if (!skip_win_message) print_win_error_msg((DWORD)code, verbose); #endif } } Loading mysql-test/r/innodb_mysql.result +6 −0 Original line number Diff line number Diff line Loading @@ -1677,3 +1677,9 @@ select @@session.sql_log_bin, @@session.binlog_format, @@session.tx_isolation; CREATE TABLE t1 ( a INT ) ENGINE=InnoDB; INSERT INTO t1 VALUES(1); DROP TABLE t1; DROP TABLE IF EXISTS t1; CREATE TABLE t1 (a char(50)) ENGINE=InnoDB; CREATE INDEX i1 on t1 (a(3)); SELECT * FROM t1 WHERE a = 'abcde'; a DROP TABLE t1; mysql-test/r/perror-win.result 0 → 100644 +5 −0 Original line number Diff line number Diff line MySQL error code 150: Foreign key constraint is incorrectly formed Win32 error code 150: System trace information was not specified in your CONFIG.SYS file, or tracing is disallowed. OS error code 23: Too many open files in system Win32 error code 23: Data error (cyclic redundancy check). Win32 error code 15000: The specified channel path is invalid. mysql-test/r/subselect.result +30 −0 Original line number Diff line number Diff line Loading @@ -4448,4 +4448,34 @@ SELECT t1.a, (SELECT 1 FROM t2 WHERE t2.b=t3.c AND t2.c=t1.a ORDER BY t2.d LIMIT a incorrect 1 1 DROP TABLE t1,t2,t3; CREATE TABLE t1 (id int); CREATE TABLE t2 (id int, c int); INSERT INTO t1 (id) VALUES (1); INSERT INTO t2 (id) VALUES (1); INSERT INTO t1 (id) VALUES (1); INSERT INTO t2 (id) VALUES (1); CREATE VIEW v1 AS SELECT t2.c AS c FROM t1, t2 WHERE t1.id=t2.id AND 1 IN (SELECT id FROM t1) WITH CHECK OPTION; UPDATE v1 SET c=1; CREATE VIEW v2 (a,b) AS SELECT t2.id, t2.c AS c FROM t1, t2 WHERE t1.id=t2.id AND 1 IN (SELECT id FROM t1) WITH CHECK OPTION; INSERT INTO v2(a,b) VALUES (2,2); ERROR HY000: CHECK OPTION failed 'test.v2' INSERT INTO v2(a,b) VALUES (1,2); SELECT * FROM v1; c 1 1 1 1 2 2 CREATE VIEW v3 AS SELECT t2.c AS c FROM t2 WHERE 1 IN (SELECT id FROM t1) WITH CHECK OPTION; DELETE FROM v3; DROP VIEW v1,v2,v3; DROP TABLE t1,t2; End of 5.1 tests. mysql-test/t/innodb_mysql.test +10 −0 Original line number Diff line number Diff line Loading @@ -43,3 +43,13 @@ CREATE TABLE t1 ( a INT ) ENGINE=InnoDB; INSERT INTO t1 VALUES(1); DROP TABLE t1; # # Bug#37284 Crash in Field_string::type() # --disable_warnings DROP TABLE IF EXISTS t1; --enable_warnings CREATE TABLE t1 (a char(50)) ENGINE=InnoDB; CREATE INDEX i1 on t1 (a(3)); SELECT * FROM t1 WHERE a = 'abcde'; DROP TABLE t1; Loading
extra/perror.c +38 −2 Original line number Diff line number Diff line Loading @@ -185,11 +185,36 @@ static const char *get_ha_error_msg(int code) } #if defined(__WIN__) static my_bool print_win_error_msg(DWORD error, my_bool verbose) { LPTSTR s; if (FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM, NULL, error, 0, (LPTSTR)&s, 0, NULL)) { if (verbose) printf("Win32 error code %d: %s", error, s); else puts(s); LocalFree(s); return 0; } return 1; } #endif int main(int argc,char *argv[]) { int error,code,found; const char *msg; char *unknown_error = 0; #if defined(__WIN__) my_bool skip_win_message= 0; #endif MY_INIT(argv[0]); if (get_options(&argc,&argv)) Loading Loading @@ -293,9 +318,20 @@ int main(int argc,char *argv[]) } if (!found) { #if defined(__WIN__) if (!(skip_win_message= !print_win_error_msg((DWORD)code, verbose))) { #endif fprintf(stderr,"Illegal error code: %d\n",code); error=1; #if defined(__WIN__) } #endif } #if defined(__WIN__) if (!skip_win_message) print_win_error_msg((DWORD)code, verbose); #endif } } Loading
mysql-test/r/innodb_mysql.result +6 −0 Original line number Diff line number Diff line Loading @@ -1677,3 +1677,9 @@ select @@session.sql_log_bin, @@session.binlog_format, @@session.tx_isolation; CREATE TABLE t1 ( a INT ) ENGINE=InnoDB; INSERT INTO t1 VALUES(1); DROP TABLE t1; DROP TABLE IF EXISTS t1; CREATE TABLE t1 (a char(50)) ENGINE=InnoDB; CREATE INDEX i1 on t1 (a(3)); SELECT * FROM t1 WHERE a = 'abcde'; a DROP TABLE t1;
mysql-test/r/perror-win.result 0 → 100644 +5 −0 Original line number Diff line number Diff line MySQL error code 150: Foreign key constraint is incorrectly formed Win32 error code 150: System trace information was not specified in your CONFIG.SYS file, or tracing is disallowed. OS error code 23: Too many open files in system Win32 error code 23: Data error (cyclic redundancy check). Win32 error code 15000: The specified channel path is invalid.
mysql-test/r/subselect.result +30 −0 Original line number Diff line number Diff line Loading @@ -4448,4 +4448,34 @@ SELECT t1.a, (SELECT 1 FROM t2 WHERE t2.b=t3.c AND t2.c=t1.a ORDER BY t2.d LIMIT a incorrect 1 1 DROP TABLE t1,t2,t3; CREATE TABLE t1 (id int); CREATE TABLE t2 (id int, c int); INSERT INTO t1 (id) VALUES (1); INSERT INTO t2 (id) VALUES (1); INSERT INTO t1 (id) VALUES (1); INSERT INTO t2 (id) VALUES (1); CREATE VIEW v1 AS SELECT t2.c AS c FROM t1, t2 WHERE t1.id=t2.id AND 1 IN (SELECT id FROM t1) WITH CHECK OPTION; UPDATE v1 SET c=1; CREATE VIEW v2 (a,b) AS SELECT t2.id, t2.c AS c FROM t1, t2 WHERE t1.id=t2.id AND 1 IN (SELECT id FROM t1) WITH CHECK OPTION; INSERT INTO v2(a,b) VALUES (2,2); ERROR HY000: CHECK OPTION failed 'test.v2' INSERT INTO v2(a,b) VALUES (1,2); SELECT * FROM v1; c 1 1 1 1 2 2 CREATE VIEW v3 AS SELECT t2.c AS c FROM t2 WHERE 1 IN (SELECT id FROM t1) WITH CHECK OPTION; DELETE FROM v3; DROP VIEW v1,v2,v3; DROP TABLE t1,t2; End of 5.1 tests.
mysql-test/t/innodb_mysql.test +10 −0 Original line number Diff line number Diff line Loading @@ -43,3 +43,13 @@ CREATE TABLE t1 ( a INT ) ENGINE=InnoDB; INSERT INTO t1 VALUES(1); DROP TABLE t1; # # Bug#37284 Crash in Field_string::type() # --disable_warnings DROP TABLE IF EXISTS t1; --enable_warnings CREATE TABLE t1 (a char(50)) ENGINE=InnoDB; CREATE INDEX i1 on t1 (a(3)); SELECT * FROM t1 WHERE a = 'abcde'; DROP TABLE t1;