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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
ccc3404f
Commit
ccc3404f
authored
Nov 28, 2008
by
Georgi Kodinov
Browse files
Options
Browse Files
Download
Plain Diff
merged bug 37339 to 5.0-bugteam
parents
68066aa5
0708ad5f
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
116 additions
and
28 deletions
+116
-28
mysql-test/r/ctype_filesystem.result
mysql-test/r/ctype_filesystem.result
+11
-0
mysql-test/t/ctype_filesystem-master.opt
mysql-test/t/ctype_filesystem-master.opt
+2
-0
mysql-test/t/ctype_filesystem.test
mysql-test/t/ctype_filesystem.test
+5
-0
sql/mysqld.cc
sql/mysqld.cc
+2
-0
sql/set_var.cc
sql/set_var.cc
+44
-23
sql/set_var.h
sql/set_var.h
+46
-1
sql/sql_show.cc
sql/sql_show.cc
+6
-4
No files found.
mysql-test/r/ctype_filesystem.result
0 → 100644
View file @
ccc3404f
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;
mysql-test/t/ctype_filesystem-master.opt
0 → 100644
View file @
ccc3404f
--character-sets-dir=/ß
--character-set-filesystem=latin1
mysql-test/t/ctype_filesystem.test
0 → 100644
View file @
ccc3404f
SET
CHARACTER
SET
utf8
;
SHOW
VARIABLES
like
'character_sets_dir'
;
SHOW
VARIABLES
like
'character_set_filesystem'
;
SHOW
VARIABLES
like
'character_set_client'
;
SET
CHARACTER
SET
default
;
sql/mysqld.cc
View file @
ccc3404f
...
...
@@ -3035,12 +3035,14 @@ static int init_common_variables(const char *conf_file_name, int argc,
sys_init_connect
.
value_length
=
strlen
(
opt_init_connect
);
else
sys_init_connect
.
value
=
my_strdup
(
""
,
MYF
(
0
));
sys_init_connect
.
is_os_charset
=
TRUE
;
sys_init_slave
.
value_length
=
0
;
if
((
sys_init_slave
.
value
=
opt_init_slave
))
sys_init_slave
.
value_length
=
strlen
(
opt_init_slave
);
else
sys_init_slave
.
value
=
my_strdup
(
""
,
MYF
(
0
));
sys_init_slave
.
is_os_charset
=
TRUE
;
if
(
use_temp_pool
&&
bitmap_init
(
&
temp_pool
,
0
,
1024
,
1
))
return
1
;
...
...
sql/set_var.cc
View file @
ccc3404f
This diff is collapsed.
Click to expand it.
sql/set_var.h
View file @
ccc3404f
...
...
@@ -46,9 +46,17 @@ class sys_var
sys_after_update_func
after_update
;
bool
no_support_one_shot
;
/*
true if the value is in character_set_filesystem,
false otherwise.
Note that we can't use a pointer to the charset as the system var is
instantiated in global scope and the charset pointers are initialized
later.
*/
bool
is_os_charset
;
sys_var
(
const
char
*
name_arg
,
sys_after_update_func
func
=
NULL
)
:
name
(
name_arg
),
after_update
(
func
)
,
no_support_one_shot
(
1
)
,
no_support_one_shot
(
1
)
,
is_os_charset
(
FALSE
)
{}
virtual
~
sys_var
()
{}
virtual
bool
check
(
THD
*
thd
,
set_var
*
var
);
...
...
@@ -68,6 +76,7 @@ class sys_var
Item
*
item
(
THD
*
thd
,
enum_var_type
type
,
LEX_STRING
*
base
);
virtual
bool
is_struct
()
{
return
0
;
}
virtual
bool
is_readonly
()
const
{
return
0
;
}
CHARSET_INFO
*
charset
(
THD
*
thd
);
};
...
...
@@ -247,6 +256,17 @@ class sys_var_const_str :public sys_var
};
class
sys_var_const_os_str
:
public
sys_var_const_str
{
public:
sys_var_const_os_str
(
const
char
*
name_arg
,
const
char
*
value_arg
)
:
sys_var_const_str
(
name_arg
,
value_arg
)
{
is_os_charset
=
TRUE
;
}
};
class
sys_var_const_str_ptr
:
public
sys_var
{
public:
...
...
@@ -276,6 +296,17 @@ class sys_var_const_str_ptr :public sys_var
};
class
sys_var_const_os_str_ptr
:
public
sys_var_const_str_ptr
{
public:
sys_var_const_os_str_ptr
(
const
char
*
name_arg
,
char
**
value_arg
)
:
sys_var_const_str_ptr
(
name_arg
,
value_arg
)
{
is_os_charset
=
TRUE
;
}
};
class
sys_var_enum
:
public
sys_var
{
uint
*
value
;
...
...
@@ -791,6 +822,20 @@ class sys_var_readonly: public sys_var
bool
is_readonly
()
const
{
return
1
;
}
};
class
sys_var_readonly_os
:
public
sys_var_readonly
{
public:
sys_var_readonly_os
(
const
char
*
name_arg
,
enum_var_type
type
,
SHOW_TYPE
show_type_arg
,
sys_value_ptr_func
value_ptr_func_arg
)
:
sys_var_readonly
(
name_arg
,
type
,
show_type_arg
,
value_ptr_func_arg
)
{
is_os_charset
=
TRUE
;
}
};
class
sys_var_thd_time_zone
:
public
sys_var_thd
{
public:
...
...
sql/sql_show.cc
View file @
ccc3404f
...
...
@@ -1441,6 +1441,7 @@ static bool show_status_array(THD *thd, const char *wild,
char
name_buffer
[
80
];
int
len
;
LEX_STRING
null_lex_str
;
CHARSET_INFO
*
charset
=
system_charset_info
;
DBUG_ENTER
(
"show_status_array"
);
null_lex_str
.
str
=
0
;
// For sys_var->value_ptr()
...
...
@@ -1469,9 +1470,10 @@ static bool show_status_array(THD *thd, const char *wild,
long
nr
;
if
(
show_type
==
SHOW_SYS
)
{
show_type
=
((
sys_var
*
)
value
)
->
show_type
();
value
=
(
char
*
)
((
sys_var
*
)
value
)
->
value_ptr
(
thd
,
value_type
,
&
null_lex_str
);
sys_var
*
var
=
((
sys_var
*
)
value
);
show_type
=
var
->
show_type
();
value
=
(
char
*
)
var
->
value_ptr
(
thd
,
value_type
,
&
null_lex_str
);
charset
=
var
->
charset
(
thd
);
}
pos
=
end
=
buff
;
...
...
@@ -1794,7 +1796,7 @@ static bool show_status_array(THD *thd, const char *wild,
restore_record
(
table
,
s
->
default_values
);
table
->
field
[
0
]
->
store
(
name_buffer
,
strlen
(
name_buffer
),
system_charset_info
);
table
->
field
[
1
]
->
store
(
pos
,
(
uint32
)
(
end
-
pos
),
system_charset_info
);
table
->
field
[
1
]
->
store
(
pos
,
(
uint32
)
(
end
-
pos
),
charset
);
if
(
schema_table_store_record
(
thd
,
table
))
DBUG_RETURN
(
TRUE
);
}
...
...
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