Database name and national characters fixes.
This commit is contained in:
parent
180b101f56
commit
4ee94d21f3
@ -42,3 +42,17 @@ Field Type Null Key Default Extra
|
|||||||
SET CHARACTER SET koi8r;
|
SET CHARACTER SET koi8r;
|
||||||
DROP TABLE ÔÁÂÌÉÃÁ;
|
DROP TABLE ÔÁÂÌÉÃÁ;
|
||||||
SET CHARACTER SET default;
|
SET CHARACTER SET default;
|
||||||
|
SET CHARACTER SET koi8r;
|
||||||
|
CREATE DATABASE ÔÅÓÔ;
|
||||||
|
USE ÔÅÓÔ;
|
||||||
|
SHOW TABLES;
|
||||||
|
Tables_in_ÔÅÓÔ
|
||||||
|
SHOW TABLES IN ÔÅÓÔ;
|
||||||
|
Tables_in_ÔÅÓÔ
|
||||||
|
SET CHARACTER SET cp1251;
|
||||||
|
SHOW TABLES;
|
||||||
|
Tables_in_òåñò
|
||||||
|
SHOW TABLES IN òåñò;
|
||||||
|
Tables_in_òåñò
|
||||||
|
SET CHARACTER SET koi8r;
|
||||||
|
DROP DATABASE ÔÅÓÔ;
|
||||||
|
@ -27,3 +27,14 @@ SHOW FIELDS FROM таблица;
|
|||||||
SET CHARACTER SET koi8r;
|
SET CHARACTER SET koi8r;
|
||||||
DROP TABLE ÔÁÂÌÉÃÁ;
|
DROP TABLE ÔÁÂÌÉÃÁ;
|
||||||
SET CHARACTER SET default;
|
SET CHARACTER SET default;
|
||||||
|
|
||||||
|
SET CHARACTER SET koi8r;
|
||||||
|
CREATE DATABASE ÔÅÓÔ;
|
||||||
|
USE ÔÅÓÔ;
|
||||||
|
SHOW TABLES;
|
||||||
|
SHOW TABLES IN ÔÅÓÔ;
|
||||||
|
SET CHARACTER SET cp1251;
|
||||||
|
SHOW TABLES;
|
||||||
|
SHOW TABLES IN òåñò;
|
||||||
|
SET CHARACTER SET koi8r;
|
||||||
|
DROP DATABASE ÔÅÓÔ;
|
||||||
|
@ -549,6 +549,7 @@ check_connections(THD *thd)
|
|||||||
char *end, *user, *passwd, *db;
|
char *end, *user, *passwd, *db;
|
||||||
char prepared_scramble[SCRAMBLE41_LENGTH+4]; /* Buffer for scramble&hash */
|
char prepared_scramble[SCRAMBLE41_LENGTH+4]; /* Buffer for scramble&hash */
|
||||||
ACL_USER* cached_user=NULL; /* Initialise to NULL for first stage */
|
ACL_USER* cached_user=NULL; /* Initialise to NULL for first stage */
|
||||||
|
String convdb;
|
||||||
DBUG_PRINT("info",("New connection received on %s",
|
DBUG_PRINT("info",("New connection received on %s",
|
||||||
vio_description(net->vio)));
|
vio_description(net->vio)));
|
||||||
|
|
||||||
@ -724,7 +725,12 @@ check_connections(THD *thd)
|
|||||||
db=0;
|
db=0;
|
||||||
using_password= test(passwd[0]);
|
using_password= test(passwd[0]);
|
||||||
if (thd->client_capabilities & CLIENT_CONNECT_WITH_DB)
|
if (thd->client_capabilities & CLIENT_CONNECT_WITH_DB)
|
||||||
|
{
|
||||||
db=strend(passwd)+1;
|
db=strend(passwd)+1;
|
||||||
|
convdb.copy(db, strlen(db),
|
||||||
|
thd->variables.character_set_client, system_charset_info);
|
||||||
|
db= convdb.c_ptr();
|
||||||
|
}
|
||||||
|
|
||||||
/* We can get only old hash at this point */
|
/* We can get only old hash at this point */
|
||||||
if (using_password && strlen(passwd) != SCRAMBLE_LENGTH)
|
if (using_password && strlen(passwd) != SCRAMBLE_LENGTH)
|
||||||
@ -1125,10 +1131,15 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
|
|||||||
thd->lex.select_lex.options=0; // We store status here
|
thd->lex.select_lex.options=0; // We store status here
|
||||||
switch (command) {
|
switch (command) {
|
||||||
case COM_INIT_DB:
|
case COM_INIT_DB:
|
||||||
statistic_increment(com_stat[SQLCOM_CHANGE_DB],&LOCK_status);
|
{
|
||||||
if (!mysql_change_db(thd,packet))
|
String convname;
|
||||||
mysql_log.write(thd,command,"%s",thd->db);
|
statistic_increment(com_stat[SQLCOM_CHANGE_DB],&LOCK_status);
|
||||||
break;
|
convname.copy(packet, strlen(packet),
|
||||||
|
thd->variables.character_set_client, system_charset_info);
|
||||||
|
if (!mysql_change_db(thd,convname.c_ptr()))
|
||||||
|
mysql_log.write(thd,command,"%s",thd->db);
|
||||||
|
break;
|
||||||
|
}
|
||||||
#ifndef EMBEDDED_LIBRARY
|
#ifndef EMBEDDED_LIBRARY
|
||||||
case COM_REGISTER_SLAVE:
|
case COM_REGISTER_SLAVE:
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user