1
0
mirror of https://github.com/MariaDB/server.git synced 2026-10-23 18:49:29 +03:00
Files
mariadb/sql
Alexander Barkov 5f55c23208 Bug#11765108 (Bug#58036) client utf32, utf16, ucs2 should be disallowed, they crash server
A separate fix for 5.1 (as 5.1 and 5.5 have seriously
differged in the related pieces of the code).
A patch for 5.5 was approved earlier.

Problem: ucs2 was correctly disallowed in "SET NAMES" only,
while mysql_real_connect() and mysql_change_user() still allowed
to use ucs2, which made server crash.

Fix: disallow ucs2 in mysql_real_connect() and mysql_change_user().

  @ sql/sql_priv.h
    - changing return type for thd_init_client_charset() to bool,
      to return errors to the caller

  @ sql/sql_var.cc
    - using new function

  @ sql/sql_connect.cc
    - thd_client_charset_init:
      in case of unsupported client character set send error and return true;
      in case of success return false
    - check_connection:
      Return error if character set initialization failed

  @ sql/sql_parse.cc
    - check charset in the very beginnig of the CMD_CHANGE_USER handling code

  @ tests/mysql_client_test.c
    - adding tests
2011-02-18 16:12:36 +03:00
..
2010-12-29 00:47:05 +01:00
…
…
2010-03-17 19:15:41 +01:00
2010-12-29 00:47:05 +01:00
…
2010-11-26 14:51:48 +02:00
2010-10-01 13:39:49 +02:00
2010-07-09 15:00:33 +02:00
2010-12-29 00:47:05 +01:00
2011-01-07 15:30:42 +02:00
2010-12-14 12:33:03 +03:00
2010-12-29 00:47:05 +01:00
2010-12-14 12:33:03 +03:00
2010-12-29 00:47:05 +01:00
2011-01-28 13:37:39 +01:00
2010-11-09 12:45:13 -02:00
2010-12-28 19:57:23 +01:00
…
2008-11-22 01:10:38 +01:00
2008-11-22 01:10:38 +01:00
2010-12-29 00:47:05 +01:00
2009-06-01 16:00:38 +04:00
2010-07-23 18:15:56 +07:00
2010-03-17 19:15:41 +01:00
2010-12-29 00:47:05 +01:00
2011-01-24 11:48:54 +08:00
2008-07-03 23:41:22 +04:00
2009-04-29 07:59:10 +05:00
2009-12-18 16:44:24 -02:00
2010-06-11 16:52:06 +04:00
2011-02-02 19:05:28 +02:00
2010-12-14 12:33:03 +03:00
…
2011-01-26 15:30:06 +08:00
2011-01-26 15:30:06 +08:00
2010-12-17 15:05:50 +02:00
…
2010-12-29 00:47:05 +01:00
2010-12-29 00:47:05 +01:00
2010-01-24 15:03:23 +08:00
2009-01-14 18:50:51 +04:00
…
2010-12-29 00:47:05 +01:00
2009-11-03 20:45:52 +03:00
2010-12-29 00:47:05 +01:00
…
2009-06-17 16:56:44 +02:00