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
59df1009
Commit
59df1009
authored
Mar 30, 2015
by
Alexander Barkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removing Item_string::m_cs_specified and
making Item_string::is_cs_specified() virtual instead.
parent
49220f76
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
28 deletions
+6
-28
sql/item.h
sql/item.h
+6
-28
No files found.
sql/item.h
View file @
59df1009
...
@@ -2688,22 +2688,7 @@ class Item_static_float_func :public Item_float
...
@@ -2688,22 +2688,7 @@ class Item_static_float_func :public Item_float
class
Item_string
:
public
Item_basic_constant
class
Item_string
:
public
Item_basic_constant
{
{
bool
m_cs_specified
;
protected:
protected:
/**
Set the value of m_cs_specified attribute.
m_cs_specified attribute shows whether character-set-introducer was
explicitly specified in the original query for this text literal or
not. The attribute makes sense (is used) only for views.
This operation is to be called from the parser during parsing an input
query.
*/
inline
void
set_cs_specified
(
bool
cs_specified
)
{
m_cs_specified
=
cs_specified
;
}
void
fix_from_value
(
Derivation
dv
,
const
Metadata
metadata
)
void
fix_from_value
(
Derivation
dv
,
const
Metadata
metadata
)
{
{
fix_charset_and_length_from_str_value
(
dv
,
metadata
);
fix_charset_and_length_from_str_value
(
dv
,
metadata
);
...
@@ -2718,7 +2703,6 @@ class Item_string :public Item_basic_constant
...
@@ -2718,7 +2703,6 @@ class Item_string :public Item_basic_constant
protected:
protected:
/* Just create an item and do not fill string representation */
/* Just create an item and do not fill string representation */
Item_string
(
CHARSET_INFO
*
cs
,
Derivation
dv
=
DERIVATION_COERCIBLE
)
Item_string
(
CHARSET_INFO
*
cs
,
Derivation
dv
=
DERIVATION_COERCIBLE
)
:
m_cs_specified
(
FALSE
)
{
{
collation
.
set
(
cs
,
dv
);
collation
.
set
(
cs
,
dv
);
max_length
=
0
;
max_length
=
0
;
...
@@ -2728,7 +2712,6 @@ class Item_string :public Item_basic_constant
...
@@ -2728,7 +2712,6 @@ class Item_string :public Item_basic_constant
}
}
public:
public:
Item_string
(
CHARSET_INFO
*
csi
,
const
char
*
str_arg
,
uint
length_arg
)
Item_string
(
CHARSET_INFO
*
csi
,
const
char
*
str_arg
,
uint
length_arg
)
:
m_cs_specified
(
FALSE
)
{
{
collation
.
set
(
csi
,
DERIVATION_COERCIBLE
);
collation
.
set
(
csi
,
DERIVATION_COERCIBLE
);
set_name
(
NULL
,
0
,
system_charset_info
);
set_name
(
NULL
,
0
,
system_charset_info
);
...
@@ -2740,21 +2723,18 @@ class Item_string :public Item_basic_constant
...
@@ -2740,21 +2723,18 @@ class Item_string :public Item_basic_constant
// Constructors with the item name set from its value
// Constructors with the item name set from its value
Item_string
(
const
char
*
str
,
uint
length
,
CHARSET_INFO
*
cs
,
Item_string
(
const
char
*
str
,
uint
length
,
CHARSET_INFO
*
cs
,
Derivation
dv
,
uint
repertoire
)
Derivation
dv
,
uint
repertoire
)
:
m_cs_specified
(
FALSE
)
{
{
str_value
.
set_or_copy_aligned
(
str
,
length
,
cs
);
str_value
.
set_or_copy_aligned
(
str
,
length
,
cs
);
fix_and_set_name_from_value
(
dv
,
Metadata
(
&
str_value
,
repertoire
));
fix_and_set_name_from_value
(
dv
,
Metadata
(
&
str_value
,
repertoire
));
}
}
Item_string
(
const
char
*
str
,
uint
length
,
Item_string
(
const
char
*
str
,
uint
length
,
CHARSET_INFO
*
cs
,
Derivation
dv
=
DERIVATION_COERCIBLE
)
CHARSET_INFO
*
cs
,
Derivation
dv
=
DERIVATION_COERCIBLE
)
:
m_cs_specified
(
FALSE
)
{
{
str_value
.
set_or_copy_aligned
(
str
,
length
,
cs
);
str_value
.
set_or_copy_aligned
(
str
,
length
,
cs
);
fix_and_set_name_from_value
(
dv
,
Metadata
(
&
str_value
));
fix_and_set_name_from_value
(
dv
,
Metadata
(
&
str_value
));
}
}
Item_string
(
const
String
*
str
,
CHARSET_INFO
*
tocs
,
uint
*
conv_errors
,
Item_string
(
const
String
*
str
,
CHARSET_INFO
*
tocs
,
uint
*
conv_errors
,
Derivation
dv
,
uint
repertoire
)
Derivation
dv
,
uint
repertoire
)
:
m_cs_specified
(
false
)
{
{
if
(
str_value
.
copy
(
str
,
tocs
,
conv_errors
))
if
(
str_value
.
copy
(
str
,
tocs
,
conv_errors
))
str_value
.
set
(
""
,
0
,
tocs
);
// EOM ?
str_value
.
set
(
""
,
0
,
tocs
);
// EOM ?
...
@@ -2764,7 +2744,6 @@ class Item_string :public Item_basic_constant
...
@@ -2764,7 +2744,6 @@ class Item_string :public Item_basic_constant
// Constructors with an externally provided item name
// Constructors with an externally provided item name
Item_string
(
const
char
*
name_par
,
const
char
*
str
,
uint
length
,
Item_string
(
const
char
*
name_par
,
const
char
*
str
,
uint
length
,
CHARSET_INFO
*
cs
,
Derivation
dv
=
DERIVATION_COERCIBLE
)
CHARSET_INFO
*
cs
,
Derivation
dv
=
DERIVATION_COERCIBLE
)
:
m_cs_specified
(
false
)
{
{
str_value
.
set_or_copy_aligned
(
str
,
length
,
cs
);
str_value
.
set_or_copy_aligned
(
str
,
length
,
cs
);
fix_from_value
(
dv
,
Metadata
(
&
str_value
));
fix_from_value
(
dv
,
Metadata
(
&
str_value
));
...
@@ -2772,7 +2751,6 @@ class Item_string :public Item_basic_constant
...
@@ -2772,7 +2751,6 @@ class Item_string :public Item_basic_constant
}
}
Item_string
(
const
char
*
name_par
,
const
char
*
str
,
uint
length
,
Item_string
(
const
char
*
name_par
,
const
char
*
str
,
uint
length
,
CHARSET_INFO
*
cs
,
Derivation
dv
,
uint
repertoire
)
CHARSET_INFO
*
cs
,
Derivation
dv
,
uint
repertoire
)
:
m_cs_specified
(
false
)
{
{
str_value
.
set_or_copy_aligned
(
str
,
length
,
cs
);
str_value
.
set_or_copy_aligned
(
str
,
length
,
cs
);
fix_from_value
(
dv
,
Metadata
(
&
str_value
,
repertoire
));
fix_from_value
(
dv
,
Metadata
(
&
str_value
,
repertoire
));
...
@@ -2836,9 +2814,9 @@ class Item_string :public Item_basic_constant
...
@@ -2836,9 +2814,9 @@ class Item_string :public Item_basic_constant
the original query.
the original query.
@retval FALSE otherwise.
@retval FALSE otherwise.
*/
*/
inline
bool
is_cs_specified
()
const
virtual
bool
is_cs_specified
()
const
{
{
return
m_cs_specified
;
return
false
;
}
}
String
*
check_well_formed_result
(
bool
send_error
)
String
*
check_well_formed_result
(
bool
send_error
)
...
@@ -2881,14 +2859,14 @@ class Item_string_with_introducer :public Item_string
...
@@ -2881,14 +2859,14 @@ class Item_string_with_introducer :public Item_string
public:
public:
Item_string_with_introducer
(
const
char
*
str
,
uint
length
,
CHARSET_INFO
*
cs
)
Item_string_with_introducer
(
const
char
*
str
,
uint
length
,
CHARSET_INFO
*
cs
)
:
Item_string
(
str
,
length
,
cs
)
:
Item_string
(
str
,
length
,
cs
)
{
{
}
set_cs_specified
(
true
);
}
Item_string_with_introducer
(
const
char
*
name
,
Item_string_with_introducer
(
const
char
*
name
,
const
char
*
str
,
uint
length
,
CHARSET_INFO
*
tocs
)
const
char
*
str
,
uint
length
,
CHARSET_INFO
*
tocs
)
:
Item_string
(
name
,
str
,
length
,
tocs
)
:
Item_string
(
name
,
str
,
length
,
tocs
)
{
}
virtual
bool
is_cs_specified
()
const
{
{
set_cs_specified
(
true
)
;
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