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
3e27677b
Commit
3e27677b
authored
Aug 08, 2019
by
Alexander Barkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cleanup: moving the definition of Lex_cstring from vers_string.h to lex_string.h
parent
e98f3bcf
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
40 additions
and
35 deletions
+40
-35
sql/lex_string.h
sql/lex_string.h
+38
-0
sql/vers_string.h
sql/vers_string.h
+2
-35
No files found.
sql/lex_string.h
View file @
3e27677b
...
...
@@ -18,8 +18,46 @@
#ifndef LEX_STRING_INCLUDED
#define LEX_STRING_INCLUDED
typedef
struct
st_mysql_const_lex_string
LEX_CSTRING
;
class
Lex_cstring
:
public
LEX_CSTRING
{
public:
Lex_cstring
()
{
str
=
NULL
;
length
=
0
;
}
Lex_cstring
(
const
char
*
_str
,
size_t
_len
)
{
str
=
_str
;
length
=
_len
;
}
Lex_cstring
(
const
char
*
start
,
const
char
*
end
)
{
DBUG_ASSERT
(
start
<=
end
);
str
=
start
;
length
=
end
-
start
;
}
void
set
(
const
char
*
_str
,
size_t
_len
)
{
str
=
_str
;
length
=
_len
;
}
};
class
Lex_cstring_strlen
:
public
Lex_cstring
{
public:
Lex_cstring_strlen
(
const
char
*
from
)
:
Lex_cstring
(
from
,
from
?
strlen
(
from
)
:
0
)
{
}
};
/* Functions to compare if two lex strings are equal */
static
inline
bool
lex_string_cmp
(
CHARSET_INFO
*
charset
,
const
LEX_CSTRING
*
a
,
...
...
sql/vers_string.h
View file @
3e27677b
...
...
@@ -17,6 +17,8 @@
#ifndef VERS_STRING_INCLUDED
#define VERS_STRING_INCLUDED
#include "lex_string.h"
/*
LEX_CSTRING with comparison semantics.
*/
...
...
@@ -45,41 +47,6 @@ struct Compare_identifiers
}
};
class
Lex_cstring
:
public
LEX_CSTRING
{
public:
Lex_cstring
()
{
str
=
NULL
;
length
=
0
;
}
Lex_cstring
(
const
char
*
_str
,
size_t
_len
)
{
str
=
_str
;
length
=
_len
;
}
Lex_cstring
(
const
char
*
start
,
const
char
*
end
)
{
DBUG_ASSERT
(
start
<=
end
);
str
=
start
;
length
=
end
-
start
;
}
void
set
(
const
char
*
_str
,
size_t
_len
)
{
str
=
_str
;
length
=
_len
;
}
};
class
Lex_cstring_strlen
:
public
Lex_cstring
{
public:
Lex_cstring_strlen
(
const
char
*
from
)
:
Lex_cstring
(
from
,
from
?
strlen
(
from
)
:
0
)
{
}
};
template
<
class
Compare
>
struct
Lex_cstring_with_compare
:
public
Lex_cstring
...
...
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