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
d0f198ff
Commit
d0f198ff
authored
Feb 17, 2003
by
bar@bar.mysql.r18.ru
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sql_table.cc, field.cc:
Bug fix opt_range.cc: Buf fix
parent
893d7e5f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
10 deletions
+15
-10
sql/field.cc
sql/field.cc
+0
-1
sql/opt_range.cc
sql/opt_range.cc
+1
-1
sql/sql_table.cc
sql/sql_table.cc
+14
-8
No files found.
sql/field.cc
View file @
d0f198ff
...
...
@@ -4530,7 +4530,6 @@ void Field_geom::get_key_image(char *buff,uint length,CHARSET_INFO *cs,
ulong
blob_length
=
get_length
(
ptr
);
char
*
blob
;
get_ptr
(
&
blob
);
memcpy
(
buff
+
2
,
blob
,
length
);
MBR
mbr
;
Geometry
gobj
;
...
...
sql/opt_range.cc
View file @
d0f198ff
...
...
@@ -2153,7 +2153,7 @@ check_quick_keys(PARAM *param,uint idx,SEL_ARG *key_tree,
if
(
tmp_min_flag
&
GEOM_FLAG
)
{
tmp
=
param
->
table
->
file
->
records_in_range
((
int
)
keynr
,
(
byte
*
)(
param
->
min_key
+
1
),
records_in_range
((
int
)
keynr
,
(
byte
*
)(
param
->
min_key
),
min_key_length
,
(
ha_rkey_function
)(
tmp_min_flag
^
GEOM_FLAG
),
(
byte
*
)
NullS
,
0
,
HA_READ_KEY_EXACT
);
...
...
sql/sql_table.cc
View file @
d0f198ff
...
...
@@ -705,14 +705,6 @@ int mysql_create_table(THD *thd,const char *db, const char *table_name,
{
if
(
key
->
type
==
Key
::
FULLTEXT
)
column
->
length
=
1
;
/* ft-code ignores it anyway :-) */
else
if
(
key
->
type
==
Key
::
SPATIAL
)
{
/*
BAR: 4 is: (Xmin,Xmax,Ymin,Ymax), this is for 2D case
Lately we'll extend this code to support more dimensions
*/
column
->
length
=
4
*
sizeof
(
double
);
}
else
{
my_printf_error
(
ER_BLOB_KEY_WITHOUT_LENGTH
,
...
...
@@ -722,6 +714,17 @@ int mysql_create_table(THD *thd,const char *db, const char *table_name,
}
}
}
if
(
key
->
type
==
Key
::
SPATIAL
)
{
if
(
!
column
->
length
)
{
/*
BAR: 4 is: (Xmin,Xmax,Ymin,Ymax), this is for 2D case
Lately we'll extend this code to support more dimensions
*/
column
->
length
=
4
*
sizeof
(
double
);
}
}
if
(
!
(
sql_field
->
flags
&
NOT_NULL_FLAG
))
{
if
(
key
->
type
==
Key
::
PRIMARY
)
...
...
@@ -757,6 +760,9 @@ int mysql_create_table(THD *thd,const char *db, const char *table_name,
DBUG_RETURN
(
-
1
);
}
}
else
if
(
f_is_geom
(
sql_field
->
pack_flag
))
{
}
else
if
(
column
->
length
>
length
||
((
f_is_packed
(
sql_field
->
pack_flag
)
||
((
file
->
table_flags
()
&
HA_NO_PREFIX_CHAR_KEYS
)
&&
...
...
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