Commit b9f919e1 authored by Matthias Leich's avatar Matthias Leich
Browse files

Merge of last pushes into GCA tree, no conflicts

Diff to actual 5.0-bugteam is revno: 2725 only
parents febf4255 228c913e
Loading
Loading
Loading
Loading
+38 −2
Original line number Diff line number Diff line
@@ -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))
@@ -286,8 +311,15 @@ int main(int argc,char *argv[])
        /* Error message still not found, look in handler error codes */
        if (!(msg=get_ha_error_msg(code)))
        {
#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
        }
        else
        {
@@ -298,6 +330,10 @@ int main(int argc,char *argv[])
            puts(msg);
        }
      }
#if defined(__WIN__)
      if (!skip_win_message)
        print_win_error_msg((DWORD)code, verbose);
#endif
    }
  }

+11 −0
Original line number Diff line number Diff line
SET CHARACTER SET utf8;
SHOW VARIABLES like 'character_sets_dir';
Variable_name	Value
character_sets_dir	/ß/
SHOW VARIABLES like 'character_set_filesystem';
Variable_name	Value
character_set_filesystem	latin1
SHOW VARIABLES like 'character_set_client';
Variable_name	Value
character_set_client	utf8
SET CHARACTER SET default;
+12 −0
Original line number Diff line number Diff line
@@ -256,3 +256,15 @@ a
select str_to_date("2003-01-02 10:11:12.0012", "%Y-%m-%d %H:%i:%S.%f");
str_to_date("2003-01-02 10:11:12.0012", "%Y-%m-%d %H:%i:%S.%f")
2003-01-02 10:11:12.001200
select timediff('2008-09-29 20:10:10','2008-09-30 20:10:10'),time('00:00:00');
timediff('2008-09-29 20:10:10','2008-09-30 20:10:10')	time('00:00:00')
-24:00:00	00:00:00
select timediff('2008-09-29 20:10:10','2008-09-30 20:10:10')>time('00:00:00');
timediff('2008-09-29 20:10:10','2008-09-30 20:10:10')>time('00:00:00')
0
select timediff('2008-09-29 20:10:10','2008-09-30 20:10:10')<time('00:00:00');
timediff('2008-09-29 20:10:10','2008-09-30 20:10:10')<time('00:00:00')
1
SELECT CAST(time('-73:42:12') AS DECIMAL);
CAST(time('-73:42:12') AS DECIMAL)
-734212
+6 −0
Original line number Diff line number Diff line
@@ -1261,4 +1261,10 @@ a b c
5	1	1
4	1	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;
End of 5.0 tests
+6 −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 1062: The service has not been started.
Illegal error code: 30000
Loading