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
e494b724
Commit
e494b724
authored
May 22, 2002
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed key algorithm handling
sql/sql_string.cc: Portability fix
parent
a8652e99
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
7 deletions
+10
-7
sql/sql_class.h
sql/sql_class.h
+0
-3
sql/sql_parse.cc
sql/sql_parse.cc
+3
-2
sql/sql_string.cc
sql/sql_string.cc
+2
-2
sql/table.cc
sql/table.cc
+5
-0
No files found.
sql/sql_class.h
View file @
e494b724
...
...
@@ -221,9 +221,6 @@ class Key :public Sql_alloc {
List
<
key_part_spec
>
columns
;
const
char
*
Name
;
Key
(
enum
Keytype
type_par
,
const
char
*
name_arg
,
List
<
key_part_spec
>
&
cols
)
:
type
(
type_par
),
columns
(
cols
),
Name
(
name_arg
)
{}
Key
(
enum
Keytype
type_par
,
enum
ha_key_alg
alg_par
,
const
char
*
name_arg
,
List
<
key_part_spec
>
&
cols
)
:
type
(
type_par
),
algorithm
(
alg_par
),
columns
(
cols
),
Name
(
name_arg
)
{}
...
...
sql/sql_parse.cc
View file @
e494b724
...
...
@@ -2787,14 +2787,14 @@ bool add_field_to_list(char *field_name, enum_field_types type,
if
(
type_modifier
&
PRI_KEY_FLAG
)
{
lex
->
col_list
.
push_back
(
new
key_part_spec
(
field_name
,
0
));
lex
->
key_list
.
push_back
(
new
Key
(
Key
::
PRIMARY
,
NullS
,
lex
->
key_list
.
push_back
(
new
Key
(
Key
::
PRIMARY
,
HA_KEY_ALG_UNDEF
,
NullS
,
lex
->
col_list
));
lex
->
col_list
.
empty
();
}
if
(
type_modifier
&
(
UNIQUE_FLAG
|
UNIQUE_KEY_FLAG
))
{
lex
->
col_list
.
push_back
(
new
key_part_spec
(
field_name
,
0
));
lex
->
key_list
.
push_back
(
new
Key
(
Key
::
UNIQUE
,
NullS
,
lex
->
key_list
.
push_back
(
new
Key
(
Key
::
UNIQUE
,
HA_KEY_ALG_UNDEF
,
NullS
,
lex
->
col_list
));
lex
->
col_list
.
empty
();
}
...
...
@@ -2858,6 +2858,7 @@ bool add_field_to_list(char *field_name, enum_field_types type,
case
FIELD_TYPE_STRING
:
case
FIELD_TYPE_VAR_STRING
:
case
FIELD_TYPE_NULL
:
case
FIELD_TYPE_GEOMETRY
:
break
;
case
FIELD_TYPE_DECIMAL
:
if
(
!
length
)
...
...
sql/sql_string.cc
View file @
e494b724
...
...
@@ -123,7 +123,7 @@ bool String::set(double num,uint decimals)
char
*
pos
,
*
to
;
VOID
(
fconvert
(
num
,(
int
)
decimals
,
&
decpt
,
&
sign
,
buff
+
1
));
if
(
!
isdigit
(
buff
[
1
]))
if
(
!
my_isdigit
(
system_charset_info
,
buff
[
1
]))
{
// Nan or Inf
pos
=
buff
+
1
;
if
(
sign
)
...
...
@@ -490,7 +490,7 @@ void String::qs_append(double d)
void
String
::
qs_append
(
double
*
d
)
{
double
ld
;
float8get
(
ld
,
d
);
float8get
(
ld
,
(
char
*
)
d
);
qs_append
(
ld
);
}
...
...
sql/table.cc
View file @
e494b724
...
...
@@ -199,7 +199,12 @@ int openfrm(const char *name, const char *alias, uint db_stat, uint prgflag,
/* Read key types */
keyinfo
=
outparam
->
key_info
;
for
(
i
=
0
;
i
<
keys
;
i
++
,
keyinfo
++
)
{
keyinfo
->
algorithm
=
(
enum
ha_key_alg
)
*
(
strpos
++
);
/* Temporary fix to get spatial index to work */
if
(
keyinfo
->
algorithm
==
HA_KEY_ALG_RTREE
)
keyinfo
->
flags
|=
HA_SPATIAL
;
}
}
else
{
...
...
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