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
adb8c7e0
Commit
adb8c7e0
authored
May 30, 2003
by
bar@bar.mysql.r18.ru
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SET character_set_results=NULL is now working
parent
0cb3f348
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
5 deletions
+14
-5
sql/set_var.cc
sql/set_var.cc
+9
-3
sql/set_var.h
sql/set_var.h
+5
-2
No files found.
sql/set_var.cc
View file @
adb8c7e0
...
@@ -1280,9 +1280,15 @@ bool sys_var_character_set::check(THD *thd, set_var *var)
...
@@ -1280,9 +1280,15 @@ bool sys_var_character_set::check(THD *thd, set_var *var)
String
str
(
buff
,
sizeof
(
buff
),
system_charset_info
),
*
res
;
String
str
(
buff
,
sizeof
(
buff
),
system_charset_info
),
*
res
;
if
(
!
(
res
=
var
->
value
->
val_str
(
&
str
)))
if
(
!
(
res
=
var
->
value
->
val_str
(
&
str
)))
res
=
&
empty_string
;
{
if
(
!
nullable
)
if
(
!
(
tmp
=
get_charset_by_csname
(
res
->
c_ptr
(),
MY_CS_PRIMARY
,
MYF
(
0
)))
&&
{
my_error
(
ER_UNKNOWN_CHARACTER_SET
,
MYF
(
0
),
"NULL"
);
return
1
;
}
tmp
=
NULL
;
}
else
if
(
!
(
tmp
=
get_charset_by_csname
(
res
->
c_ptr
(),
MY_CS_PRIMARY
,
MYF
(
0
)))
&&
!
(
tmp
=
get_old_charset_by_name
(
res
->
c_ptr
())))
!
(
tmp
=
get_old_charset_by_name
(
res
->
c_ptr
())))
{
{
my_error
(
ER_UNKNOWN_CHARACTER_SET
,
MYF
(
0
),
res
->
c_ptr
());
my_error
(
ER_UNKNOWN_CHARACTER_SET
,
MYF
(
0
),
res
->
c_ptr
());
...
...
sql/set_var.h
View file @
adb8c7e0
...
@@ -433,7 +433,9 @@ SHOW_TYPE type() { return SHOW_CHAR; }
...
@@ -433,7 +433,9 @@ SHOW_TYPE type() { return SHOW_CHAR; }
class
sys_var_character_set
:
public
sys_var_thd
class
sys_var_character_set
:
public
sys_var_thd
{
{
public:
public:
sys_var_character_set
(
const
char
*
name_arg
)
:
sys_var_thd
(
name_arg
)
{}
bool
nullable
;
sys_var_character_set
(
const
char
*
name_arg
)
:
sys_var_thd
(
name_arg
)
{
nullable
=
0
;
}
bool
check
(
THD
*
thd
,
set_var
*
var
);
bool
check
(
THD
*
thd
,
set_var
*
var
);
SHOW_TYPE
type
()
{
return
SHOW_CHAR
;
}
SHOW_TYPE
type
()
{
return
SHOW_CHAR
;
}
bool
check_update_type
(
Item_result
type
)
bool
check_update_type
(
Item_result
type
)
...
@@ -460,7 +462,8 @@ class sys_var_character_set_results :public sys_var_character_set
...
@@ -460,7 +462,8 @@ class sys_var_character_set_results :public sys_var_character_set
{
{
public:
public:
sys_var_character_set_results
(
const
char
*
name_arg
)
:
sys_var_character_set_results
(
const
char
*
name_arg
)
:
sys_var_character_set
(
name_arg
)
{}
sys_var_character_set
(
name_arg
)
{
nullable
=
1
;
}
void
set_default
(
THD
*
thd
,
enum_var_type
type
);
void
set_default
(
THD
*
thd
,
enum_var_type
type
);
CHARSET_INFO
**
ci_ptr
(
THD
*
thd
,
enum_var_type
type
);
CHARSET_INFO
**
ci_ptr
(
THD
*
thd
,
enum_var_type
type
);
};
};
...
...
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