Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
a3d08eaa
Commit
a3d08eaa
authored
Apr 22, 2003
by
bar@bar.mysql.r18.ru
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
I renamed system variable literal_collation into connection_collation
parent
292f7954
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
26 additions
and
26 deletions
+26
-26
sql/item.cc
sql/item.cc
+1
-1
sql/mysqld.cc
sql/mysqld.cc
+2
-2
sql/set_var.cc
sql/set_var.cc
+13
-13
sql/set_var.h
sql/set_var.h
+5
-5
sql/sql_class.h
sql/sql_class.h
+1
-1
sql/sql_yacc.yy
sql/sql_yacc.yy
+4
-4
No files found.
sql/item.cc
View file @
a3d08eaa
...
@@ -172,7 +172,7 @@ bool Item::get_time(TIME *ltime)
...
@@ -172,7 +172,7 @@ bool Item::get_time(TIME *ltime)
CHARSET_INFO
*
Item
::
default_charset
()
const
CHARSET_INFO
*
Item
::
default_charset
()
const
{
{
return
current_thd
->
db_charset
;
return
current_thd
->
variables
.
connection_collation
;
}
}
bool
Item
::
set_charset
(
CHARSET_INFO
*
cs1
,
enum
coercion
co1
,
bool
Item
::
set_charset
(
CHARSET_INFO
*
cs1
,
enum
coercion
co1
,
...
...
sql/mysqld.cc
View file @
a3d08eaa
...
@@ -2094,7 +2094,7 @@ static int init_common_variables(const char *conf_file_name, int argc,
...
@@ -2094,7 +2094,7 @@ static int init_common_variables(const char *conf_file_name, int argc,
return
1
;
return
1
;
global_system_variables
.
result_collation
=
default_charset_info
;
global_system_variables
.
result_collation
=
default_charset_info
;
global_system_variables
.
client_collation
=
default_charset_info
;
global_system_variables
.
client_collation
=
default_charset_info
;
global_system_variables
.
literal
_collation
=
default_charset_info
;
global_system_variables
.
connection
_collation
=
default_charset_info
;
charsets_list
=
list_charsets
(
MYF
(
MY_CS_COMPILED
|
MY_CS_CONFIG
));
charsets_list
=
list_charsets
(
MYF
(
MY_CS_COMPILED
|
MY_CS_CONFIG
));
...
@@ -4577,7 +4577,7 @@ static void set_options(void)
...
@@ -4577,7 +4577,7 @@ static void set_options(void)
/* Set default values for some variables */
/* Set default values for some variables */
global_system_variables
.
result_collation
=
default_charset_info
;
global_system_variables
.
result_collation
=
default_charset_info
;
global_system_variables
.
client_collation
=
default_charset_info
;
global_system_variables
.
client_collation
=
default_charset_info
;
global_system_variables
.
literal
_collation
=
default_charset_info
;
global_system_variables
.
connection
_collation
=
default_charset_info
;
global_system_variables
.
table_type
=
DB_TYPE_MYISAM
;
global_system_variables
.
table_type
=
DB_TYPE_MYISAM
;
global_system_variables
.
tx_isolation
=
ISO_REPEATABLE_READ
;
global_system_variables
.
tx_isolation
=
ISO_REPEATABLE_READ
;
global_system_variables
.
select_limit
=
(
ulonglong
)
HA_POS_ERROR
;
global_system_variables
.
select_limit
=
(
ulonglong
)
HA_POS_ERROR
;
...
...
sql/set_var.cc
View file @
a3d08eaa
...
@@ -110,6 +110,7 @@ sys_var_bool_ptr sys_concurrent_insert("concurrent_insert",
...
@@ -110,6 +110,7 @@ sys_var_bool_ptr sys_concurrent_insert("concurrent_insert",
&
myisam_concurrent_insert
);
&
myisam_concurrent_insert
);
sys_var_long_ptr
sys_connect_timeout
(
"connect_timeout"
,
sys_var_long_ptr
sys_connect_timeout
(
"connect_timeout"
,
&
connect_timeout
);
&
connect_timeout
);
sys_var_connection_collation
sys_connection_collation
(
"connection_collation"
);
sys_var_enum
sys_delay_key_write
(
"delay_key_write"
,
sys_var_enum
sys_delay_key_write
(
"delay_key_write"
,
&
delay_key_write_options
,
&
delay_key_write_options
,
&
delay_key_write_typelib
,
&
delay_key_write_typelib
,
...
@@ -131,7 +132,6 @@ sys_var_thd_ulong sys_join_buffer_size("join_buffer_size",
...
@@ -131,7 +132,6 @@ sys_var_thd_ulong sys_join_buffer_size("join_buffer_size",
sys_var_ulonglong_ptr
sys_key_buffer_size
(
"key_buffer_size"
,
sys_var_ulonglong_ptr
sys_key_buffer_size
(
"key_buffer_size"
,
&
keybuff_size
,
&
keybuff_size
,
fix_key_buffer_size
);
fix_key_buffer_size
);
sys_var_literal_collation
sys_literal_collation
(
"literal_collation"
);
sys_var_bool_ptr
sys_local_infile
(
"local_infile"
,
sys_var_bool_ptr
sys_local_infile
(
"local_infile"
,
&
opt_local_infile
);
&
opt_local_infile
);
sys_var_thd_bool
sys_log_warnings
(
"log_warnings"
,
&
SV
::
log_warnings
);
sys_var_thd_bool
sys_log_warnings
(
"log_warnings"
,
&
SV
::
log_warnings
);
...
@@ -346,6 +346,7 @@ sys_var *sys_variables[]=
...
@@ -346,6 +346,7 @@ sys_var *sys_variables[]=
&
sys_client_collation
,
&
sys_client_collation
,
&
sys_concurrent_insert
,
&
sys_concurrent_insert
,
&
sys_connect_timeout
,
&
sys_connect_timeout
,
&
sys_connection_collation
,
&
sys_default_week_format
,
&
sys_default_week_format
,
&
sys_delay_key_write
,
&
sys_delay_key_write
,
&
sys_delayed_insert_limit
,
&
sys_delayed_insert_limit
,
...
@@ -362,7 +363,6 @@ sys_var *sys_variables[]=
...
@@ -362,7 +363,6 @@ sys_var *sys_variables[]=
&
sys_interactive_timeout
,
&
sys_interactive_timeout
,
&
sys_join_buffer_size
,
&
sys_join_buffer_size
,
&
sys_key_buffer_size
,
&
sys_key_buffer_size
,
&
sys_literal_collation
,
&
sys_last_insert_id
,
&
sys_last_insert_id
,
&
sys_local_infile
,
&
sys_local_infile
,
&
sys_log_binlog
,
&
sys_log_binlog
,
...
@@ -458,6 +458,7 @@ struct show_var_st init_vars[]= {
...
@@ -458,6 +458,7 @@ struct show_var_st init_vars[]= {
{
sys_client_collation
.
name
,
(
char
*
)
&
sys_client_collation
,
SHOW_SYS
},
{
sys_client_collation
.
name
,
(
char
*
)
&
sys_client_collation
,
SHOW_SYS
},
{
sys_concurrent_insert
.
name
,(
char
*
)
&
sys_concurrent_insert
,
SHOW_SYS
},
{
sys_concurrent_insert
.
name
,(
char
*
)
&
sys_concurrent_insert
,
SHOW_SYS
},
{
sys_connect_timeout
.
name
,
(
char
*
)
&
sys_connect_timeout
,
SHOW_SYS
},
{
sys_connect_timeout
.
name
,
(
char
*
)
&
sys_connect_timeout
,
SHOW_SYS
},
{
sys_connection_collation
.
name
,(
char
*
)
&
sys_connection_collation
,
SHOW_SYS
},
{
"datadir"
,
mysql_real_data_home
,
SHOW_CHAR
},
{
"datadir"
,
mysql_real_data_home
,
SHOW_CHAR
},
{
"default_week_format"
,
(
char
*
)
&
sys_default_week_format
,
SHOW_SYS
},
{
"default_week_format"
,
(
char
*
)
&
sys_default_week_format
,
SHOW_SYS
},
{
sys_delay_key_write
.
name
,
(
char
*
)
&
sys_delay_key_write
,
SHOW_SYS
},
{
sys_delay_key_write
.
name
,
(
char
*
)
&
sys_delay_key_write
,
SHOW_SYS
},
...
@@ -508,7 +509,6 @@ struct show_var_st init_vars[]= {
...
@@ -508,7 +509,6 @@ struct show_var_st init_vars[]= {
{
sys_key_buffer_size
.
name
,
(
char
*
)
&
sys_key_buffer_size
,
SHOW_SYS
},
{
sys_key_buffer_size
.
name
,
(
char
*
)
&
sys_key_buffer_size
,
SHOW_SYS
},
{
"language"
,
language
,
SHOW_CHAR
},
{
"language"
,
language
,
SHOW_CHAR
},
{
"large_files_support"
,
(
char
*
)
&
opt_large_files
,
SHOW_BOOL
},
{
"large_files_support"
,
(
char
*
)
&
opt_large_files
,
SHOW_BOOL
},
{
sys_literal_collation
.
name
,(
char
*
)
&
sys_literal_collation
,
SHOW_SYS
},
{
sys_local_infile
.
name
,
(
char
*
)
&
sys_local_infile
,
SHOW_SYS
},
{
sys_local_infile
.
name
,
(
char
*
)
&
sys_local_infile
,
SHOW_SYS
},
#ifdef HAVE_MLOCKALL
#ifdef HAVE_MLOCKALL
{
"locked_in_memory"
,
(
char
*
)
&
locked_in_memory
,
SHOW_BOOL
},
{
"locked_in_memory"
,
(
char
*
)
&
locked_in_memory
,
SHOW_BOOL
},
...
@@ -1242,29 +1242,29 @@ void sys_var_client_collation::set_default(THD *thd, enum_var_type type)
...
@@ -1242,29 +1242,29 @@ void sys_var_client_collation::set_default(THD *thd, enum_var_type type)
}
}
bool
sys_var_
literal
_collation
::
update
(
THD
*
thd
,
set_var
*
var
)
bool
sys_var_
connection
_collation
::
update
(
THD
*
thd
,
set_var
*
var
)
{
{
if
(
var
->
type
==
OPT_GLOBAL
)
if
(
var
->
type
==
OPT_GLOBAL
)
global_system_variables
.
literal
_collation
=
var
->
save_result
.
charset
;
global_system_variables
.
connection
_collation
=
var
->
save_result
.
charset
;
else
else
thd
->
variables
.
literal
_collation
=
var
->
save_result
.
charset
;
thd
->
variables
.
connection
_collation
=
var
->
save_result
.
charset
;
return
0
;
return
0
;
}
}
byte
*
sys_var_
literal
_collation
::
value_ptr
(
THD
*
thd
,
enum_var_type
type
)
byte
*
sys_var_
connection
_collation
::
value_ptr
(
THD
*
thd
,
enum_var_type
type
)
{
{
CHARSET_INFO
*
cs
=
((
type
==
OPT_GLOBAL
)
?
CHARSET_INFO
*
cs
=
((
type
==
OPT_GLOBAL
)
?
global_system_variables
.
literal
_collation
:
global_system_variables
.
connection
_collation
:
thd
->
variables
.
literal
_collation
);
thd
->
variables
.
connection
_collation
);
return
cs
?
(
byte
*
)
cs
->
name
:
(
byte
*
)
""
;
return
cs
?
(
byte
*
)
cs
->
name
:
(
byte
*
)
""
;
}
}
void
sys_var_
literal
_collation
::
set_default
(
THD
*
thd
,
enum_var_type
type
)
void
sys_var_
connection
_collation
::
set_default
(
THD
*
thd
,
enum_var_type
type
)
{
{
if
(
type
==
OPT_GLOBAL
)
if
(
type
==
OPT_GLOBAL
)
global_system_variables
.
literal
_collation
=
default_charset_info
;
global_system_variables
.
connection
_collation
=
default_charset_info
;
else
else
thd
->
variables
.
literal_collation
=
global_system_variables
.
literal
_collation
;
thd
->
variables
.
connection_collation
=
global_system_variables
.
connection
_collation
;
}
}
bool
sys_var_result_collation
::
update
(
THD
*
thd
,
set_var
*
var
)
bool
sys_var_result_collation
::
update
(
THD
*
thd
,
set_var
*
var
)
...
@@ -1305,7 +1305,7 @@ int set_var_client_collation::check(THD *thd)
...
@@ -1305,7 +1305,7 @@ int set_var_client_collation::check(THD *thd)
int
set_var_client_collation
::
update
(
THD
*
thd
)
int
set_var_client_collation
::
update
(
THD
*
thd
)
{
{
thd
->
variables
.
client_collation
=
client_collation
;
thd
->
variables
.
client_collation
=
client_collation
;
thd
->
variables
.
literal_collation
=
literal
_collation
;
thd
->
variables
.
connection_collation
=
connection
_collation
;
thd
->
variables
.
result_collation
=
result_collation
;
thd
->
variables
.
result_collation
=
result_collation
;
thd
->
protocol_simple
.
init
(
thd
);
thd
->
protocol_simple
.
init
(
thd
);
thd
->
protocol_prep
.
init
(
thd
);
thd
->
protocol_prep
.
init
(
thd
);
...
...
sql/set_var.h
View file @
a3d08eaa
...
@@ -429,10 +429,10 @@ public:
...
@@ -429,10 +429,10 @@ public:
byte
*
value_ptr
(
THD
*
thd
,
enum_var_type
type
);
byte
*
value_ptr
(
THD
*
thd
,
enum_var_type
type
);
};
};
class
sys_var_
literal
_collation
:
public
sys_var_collation
class
sys_var_
connection
_collation
:
public
sys_var_collation
{
{
public:
public:
sys_var_
literal
_collation
(
const
char
*
name_arg
)
:
sys_var_collation
(
name_arg
)
{}
sys_var_
connection
_collation
(
const
char
*
name_arg
)
:
sys_var_collation
(
name_arg
)
{}
bool
update
(
THD
*
thd
,
set_var
*
var
);
bool
update
(
THD
*
thd
,
set_var
*
var
);
void
set_default
(
THD
*
thd
,
enum_var_type
type
);
void
set_default
(
THD
*
thd
,
enum_var_type
type
);
byte
*
value_ptr
(
THD
*
thd
,
enum_var_type
type
);
byte
*
value_ptr
(
THD
*
thd
,
enum_var_type
type
);
...
@@ -556,14 +556,14 @@ public:
...
@@ -556,14 +556,14 @@ public:
class
set_var_client_collation
:
public
set_var_base
class
set_var_client_collation
:
public
set_var_base
{
{
CHARSET_INFO
*
client_collation
;
CHARSET_INFO
*
client_collation
;
CHARSET_INFO
*
literal
_collation
;
CHARSET_INFO
*
connection
_collation
;
CHARSET_INFO
*
result_collation
;
CHARSET_INFO
*
result_collation
;
public:
public:
set_var_client_collation
(
CHARSET_INFO
*
client_coll_arg
,
set_var_client_collation
(
CHARSET_INFO
*
client_coll_arg
,
CHARSET_INFO
*
literal
_coll_arg
,
CHARSET_INFO
*
connection
_coll_arg
,
CHARSET_INFO
*
result_coll_arg
)
CHARSET_INFO
*
result_coll_arg
)
:
client_collation
(
client_coll_arg
),
:
client_collation
(
client_coll_arg
),
literal_collation
(
literal
_coll_arg
),
connection_collation
(
connection
_coll_arg
),
result_collation
(
result_coll_arg
)
result_collation
(
result_coll_arg
)
{}
{}
int
check
(
THD
*
thd
);
int
check
(
THD
*
thd
);
...
...
sql/sql_class.h
View file @
a3d08eaa
...
@@ -383,7 +383,7 @@ struct system_variables
...
@@ -383,7 +383,7 @@ struct system_variables
my_bool
new_mode
;
my_bool
new_mode
;
CHARSET_INFO
*
client_collation
;
CHARSET_INFO
*
client_collation
;
CHARSET_INFO
*
literal
_collation
;
CHARSET_INFO
*
connection
_collation
;
CHARSET_INFO
*
result_collation
;
CHARSET_INFO
*
result_collation
;
};
};
...
...
sql/sql_yacc.yy
View file @
a3d08eaa
...
@@ -3924,7 +3924,7 @@ text_literal:
...
@@ -3924,7 +3924,7 @@ text_literal:
TEXT_STRING_literal
TEXT_STRING_literal
{
{
THD *thd= YYTHD;
THD *thd= YYTHD;
$$ = new Item_string($1.str,$1.length,thd->variables.
literal
_collation);
$$ = new Item_string($1.str,$1.length,thd->variables.
connection
_collation);
}
}
| NCHAR_STRING
| NCHAR_STRING
{ $$= new Item_string($1.str,$1.length,national_charset_info); }
{ $$= new Item_string($1.str,$1.length,national_charset_info); }
...
@@ -3936,7 +3936,7 @@ text_literal:
...
@@ -3936,7 +3936,7 @@ text_literal:
text_string:
text_string:
TEXT_STRING_literal
TEXT_STRING_literal
{ $$= new String($1.str,$1.length,YYTHD->variables.
literal
_collation); }
{ $$= new String($1.str,$1.length,YYTHD->variables.
connection
_collation); }
| HEX_NUM
| HEX_NUM
{
{
Item *tmp = new Item_varbinary($1.str,$1.length);
Item *tmp = new Item_varbinary($1.str,$1.length);
...
@@ -4106,14 +4106,14 @@ TEXT_STRING_literal:
...
@@ -4106,14 +4106,14 @@ TEXT_STRING_literal:
TEXT_STRING
TEXT_STRING
{
{
THD *thd= YYTHD;
THD *thd= YYTHD;
if (my_charset_same(thd->charset(),thd->variables.
literal
_collation))
if (my_charset_same(thd->charset(),thd->variables.
connection
_collation))
{
{
$$=$1;
$$=$1;
}
}
else
else
{
{
String ident;
String ident;
ident.copy($1.str,$1.length,thd->charset(),thd->variables.
literal
_collation);
ident.copy($1.str,$1.length,thd->charset(),thd->variables.
connection
_collation);
$$.str= thd->strmake(ident.ptr(),ident.length());
$$.str= thd->strmake(ident.ptr(),ident.length());
$$.length= ident.length();
$$.length= ident.length();
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment