mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
Main patch MDEV-27896 Wrong result upon COLLATE latin1_bin CHARACTER SET latin1
on the table or the database level
Also fixes MDEV-27782 Wrong columns when using table level `CHARACTER SET utf8mb4 COLLATE DEFAULT` MDEV-28644 Unexpected error on ALTER TABLE t1 CONVERT TO CHARACTER SET utf8mb3, DEFAULT CHARACTER SET utf8mb4
This commit is contained in:
@@ -56,6 +56,7 @@
|
||||
#include "sp_rcontext.h"
|
||||
#include "sp_cache.h"
|
||||
#include "sql_show.h" // append_identifier
|
||||
#include "sql_db.h" // get_default_db_collation
|
||||
#include "transaction.h"
|
||||
#include "sql_select.h" /* declares create_tmp_table() */
|
||||
#include "debug_sync.h"
|
||||
@@ -8296,3 +8297,27 @@ THD_list_iterator *THD_list_iterator::iterator()
|
||||
{
|
||||
return &server_threads;
|
||||
}
|
||||
|
||||
|
||||
Charset_collation_context
|
||||
THD::charset_collation_context_alter_db(const char *db)
|
||||
{
|
||||
return Charset_collation_context(variables.collation_server,
|
||||
get_default_db_collation(this, db));
|
||||
}
|
||||
|
||||
|
||||
Charset_collation_context
|
||||
THD::charset_collation_context_create_table_in_db(const char *db)
|
||||
{
|
||||
CHARSET_INFO *cs= get_default_db_collation(this, db);
|
||||
return Charset_collation_context(cs, cs);
|
||||
}
|
||||
|
||||
|
||||
Charset_collation_context
|
||||
THD::charset_collation_context_alter_table(const TABLE_SHARE *s)
|
||||
{
|
||||
return Charset_collation_context(get_default_db_collation(this, s->db.str),
|
||||
s->table_charset);
|
||||
}
|
||||
|
Reference in New Issue
Block a user