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
4e50bb0e
Commit
4e50bb0e
authored
Dec 13, 2007
by
gluh@mysql.com/eagle.(none)
Browse files
Options
Browse Files
Download
Plain Diff
Merge mysql.com:/home/gluh/MySQL/Merge/4.1
into mysql.com:/home/gluh/MySQL/Merge/4.1-opt
parents
353cd330
d713527b
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
109 additions
and
17 deletions
+109
-17
include/mysql_com.h
include/mysql_com.h
+5
-5
myisam/mi_check.c
myisam/mi_check.c
+1
-1
mysql-test/r/gis.result
mysql-test/r/gis.result
+33
-1
mysql-test/t/gis.test
mysql-test/t/gis.test
+42
-0
sql/field.cc
sql/field.cc
+1
-1
sql/field.h
sql/field.h
+1
-0
sql/item_geofunc.cc
sql/item_geofunc.cc
+1
-1
sql/mysqld.cc
sql/mysqld.cc
+17
-3
sql/protocol.cc
sql/protocol.cc
+4
-1
sql/sql_table.cc
sql/sql_table.cc
+4
-4
No files found.
include/mysql_com.h
View file @
4e50bb0e
...
@@ -330,11 +330,11 @@ typedef struct st_udf_args
...
@@ -330,11 +330,11 @@ typedef struct st_udf_args
typedef
struct
st_udf_init
typedef
struct
st_udf_init
{
{
my_bool
maybe_null
;
/* 1 if function can return NULL */
my_bool
maybe_null
;
/* 1 if function can return NULL */
unsigned
int
decimals
;
/* for real functions */
unsigned
int
decimals
;
/* for real functions */
unsigned
long
max_length
;
/* For string functions */
unsigned
long
max_length
;
/* For string functions */
char
*
ptr
;
/* free pointer for function data */
char
*
ptr
;
/* free pointer for function data */
my_bool
const_item
;
/* 0 if result is independent of arguments
*/
my_bool
const_item
;
/* 1 if function always returns the same value
*/
}
UDF_INIT
;
}
UDF_INIT
;
/* Constants when using compression */
/* Constants when using compression */
...
...
myisam/mi_check.c
View file @
4e50bb0e
...
@@ -454,7 +454,7 @@ int chk_key(MI_CHECK *param, register MI_INFO *info)
...
@@ -454,7 +454,7 @@ int chk_key(MI_CHECK *param, register MI_INFO *info)
if
((
!
(
param
->
testflag
&
T_SILENT
)))
if
((
!
(
param
->
testflag
&
T_SILENT
)))
printf
(
"- check data record references index: %d
\n
"
,
key
+
1
);
printf
(
"- check data record references index: %d
\n
"
,
key
+
1
);
if
(
keyinfo
->
flag
&
HA_FULLTEXT
)
if
(
keyinfo
->
flag
&
(
HA_FULLTEXT
|
HA_SPATIAL
)
)
full_text_keys
++
;
full_text_keys
++
;
if
(
share
->
state
.
key_root
[
key
]
==
HA_OFFSET_ERROR
&&
if
(
share
->
state
.
key_root
[
key
]
==
HA_OFFSET_ERROR
&&
(
info
->
state
->
records
==
0
||
keyinfo
->
flag
&
HA_FULLTEXT
))
(
info
->
state
->
records
==
0
||
keyinfo
->
flag
&
HA_FULLTEXT
))
...
...
mysql-test/r/gis.result
View file @
4e50bb0e
...
@@ -668,7 +668,7 @@ def test t1 t1 g g 255 4294967295 0 Y 144 0 63
...
@@ -668,7 +668,7 @@ def test t1 t1 g g 255 4294967295 0 Y 144 0 63
g
g
select asbinary(g) from t1;
select asbinary(g) from t1;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
def asbinary(g) 252
8192
0 Y 128 0 63
def asbinary(g) 252
4294967295
0 Y 128 0 63
asbinary(g)
asbinary(g)
drop table t1;
drop table t1;
create table t1 (a TEXT, b GEOMETRY NOT NULL, SPATIAL KEY(b));
create table t1 (a TEXT, b GEOMETRY NOT NULL, SPATIAL KEY(b));
...
@@ -730,4 +730,36 @@ select geomfromtext(col9,col89) as a from t1;
...
@@ -730,4 +730,36 @@ select geomfromtext(col9,col89) as a from t1;
a
a
NULL
NULL
DROP TABLE t1;
DROP TABLE t1;
CREATE TABLE t1 (
geomdata polygon NOT NULL,
SPATIAL KEY index_geom (geomdata)
) ENGINE=MyISAM DEFAULT CHARSET=latin2 DELAY_KEY_WRITE=1 ROW_FORMAT=FIXED;
CREATE TABLE t2 (
geomdata polygon NOT NULL,
SPATIAL KEY index_geom (geomdata)
) ENGINE=MyISAM DEFAULT CHARSET=latin2 DELAY_KEY_WRITE=1 ROW_FORMAT=FIXED;
CREATE TABLE t3
select
aswkb(ws.geomdata) AS geomdatawkb
from
t1 ws
union
select
aswkb(ws.geomdata) AS geomdatawkb
from
t2 ws;
describe t3;
Field Type Null Key Default Extra
geomdatawkb longblob YES NULL
drop table t1;
drop table t2;
drop table t3;
create table t1(col1 geometry not null,col15 geometrycollection not
null,spatial index(col15),index(col1(15)))engine=myisam;
insert into t1 set col15 = GeomFromText('POINT(6 5)');
insert into t1 set col15 = GeomFromText('POINT(6 5)');
check table t1 extended;
Table Op Msg_type Msg_text
test.t1 check status OK
drop table t1;
End of 4.1 tests
End of 4.1 tests
mysql-test/t/gis.test
View file @
4e50bb0e
...
@@ -427,4 +427,46 @@ INSERT INTO `t1` VALUES ('','0000-00-00');
...
@@ -427,4 +427,46 @@ INSERT INTO `t1` VALUES ('','0000-00-00');
select
geomfromtext
(
col9
,
col89
)
as
a
from
t1
;
select
geomfromtext
(
col9
,
col89
)
as
a
from
t1
;
DROP
TABLE
t1
;
DROP
TABLE
t1
;
#
# Bug #31158 Spatial, Union, LONGBLOB vs BLOB bug (crops data)
#
CREATE
TABLE
t1
(
geomdata
polygon
NOT
NULL
,
SPATIAL
KEY
index_geom
(
geomdata
)
)
ENGINE
=
MyISAM
DEFAULT
CHARSET
=
latin2
DELAY_KEY_WRITE
=
1
ROW_FORMAT
=
FIXED
;
CREATE
TABLE
t2
(
geomdata
polygon
NOT
NULL
,
SPATIAL
KEY
index_geom
(
geomdata
)
)
ENGINE
=
MyISAM
DEFAULT
CHARSET
=
latin2
DELAY_KEY_WRITE
=
1
ROW_FORMAT
=
FIXED
;
CREATE
TABLE
t3
select
aswkb
(
ws
.
geomdata
)
AS
geomdatawkb
from
t1
ws
union
select
aswkb
(
ws
.
geomdata
)
AS
geomdatawkb
from
t2
ws
;
describe
t3
;
drop
table
t1
;
drop
table
t2
;
drop
table
t3
;
#
# Bug #30284 spatial key corruption
#
create
table
t1
(
col1
geometry
not
null
,
col15
geometrycollection
not
null
,
spatial
index
(
col15
),
index
(
col1
(
15
)))
engine
=
myisam
;
insert
into
t1
set
col15
=
GeomFromText
(
'POINT(6 5)'
);
insert
into
t1
set
col15
=
GeomFromText
(
'POINT(6 5)'
);
check
table
t1
extended
;
drop
table
t1
;
--
echo
End
of
4.1
tests
--
echo
End
of
4.1
tests
sql/field.cc
View file @
4e50bb0e
...
@@ -6975,7 +6975,7 @@ uint32 Field_blob::max_length()
...
@@ -6975,7 +6975,7 @@ uint32 Field_blob::max_length()
case
3
:
case
3
:
return
16777215
*
field_charset
->
mbmaxlen
;
return
16777215
*
field_charset
->
mbmaxlen
;
case
4
:
case
4
:
return
(
uint32
)
4294967295U
;
return
max_field_size
;
default:
default:
DBUG_ASSERT
(
0
);
// we should never go here
DBUG_ASSERT
(
0
);
// we should never go here
return
0
;
return
0
;
...
...
sql/field.h
View file @
4e50bb0e
...
@@ -26,6 +26,7 @@
...
@@ -26,6 +26,7 @@
#define NOT_FIXED_DEC 31
#define NOT_FIXED_DEC 31
#define DATETIME_DEC 6
#define DATETIME_DEC 6
const
uint32
max_field_size
=
(
uint32
)
4294967295U
;
class
Send_field
;
class
Send_field
;
class
Protocol
;
class
Protocol
;
...
...
sql/item_geofunc.cc
View file @
4e50bb0e
...
@@ -29,7 +29,7 @@ void Item_geometry_func::fix_length_and_dec()
...
@@ -29,7 +29,7 @@ void Item_geometry_func::fix_length_and_dec()
{
{
collation
.
set
(
&
my_charset_bin
);
collation
.
set
(
&
my_charset_bin
);
decimals
=
0
;
decimals
=
0
;
max_length
=
MAX_BLOB_WIDTH
;
max_length
=
max_field_size
;
maybe_null
=
1
;
maybe_null
=
1
;
}
}
...
...
sql/mysqld.cc
View file @
4e50bb0e
...
@@ -193,7 +193,7 @@ typedef fp_except fp_except_t;
...
@@ -193,7 +193,7 @@ typedef fp_except fp_except_t;
this on freebsd
this on freebsd
*/
*/
inline
void
reset_floating_point_exceptions
()
inline
void
set_proper_floating_point_mode
()
{
{
/* Don't fall for overflow, underflow,divide-by-zero or loss of precision */
/* Don't fall for overflow, underflow,divide-by-zero or loss of precision */
#if defined(__i386__)
#if defined(__i386__)
...
@@ -204,8 +204,22 @@ inline void reset_floating_point_exceptions()
...
@@ -204,8 +204,22 @@ inline void reset_floating_point_exceptions()
FP_X_IMP
));
FP_X_IMP
));
#endif
#endif
}
}
#elif defined(__sgi)
/* for IRIX to use set_fpc_csr() */
#include <sys/fpu.h>
inline
void
set_proper_floating_point_mode
()
{
/* Enable denormalized DOUBLE values support for IRIX */
{
union
fpc_csr
n
;
n
.
fc_word
=
get_fpc_csr
();
n
.
fc_struct
.
flush
=
0
;
set_fpc_csr
(
n
.
fc_word
);
}
}
#else
#else
#define
reset_floating_point_exceptions
()
#define
set_proper_floating_point_mode
()
#endif
/* __FreeBSD__ && HAVE_IEEEFP_H */
#endif
/* __FreeBSD__ && HAVE_IEEEFP_H */
}
/* cplusplus */
}
/* cplusplus */
...
@@ -2876,7 +2890,7 @@ static int init_server_components()
...
@@ -2876,7 +2890,7 @@ static int init_server_components()
query_cache_init
();
query_cache_init
();
query_cache_resize
(
query_cache_size
);
query_cache_resize
(
query_cache_size
);
randominit
(
&
sql_rand
,(
ulong
)
start_time
,(
ulong
)
start_time
/
2
);
randominit
(
&
sql_rand
,(
ulong
)
start_time
,(
ulong
)
start_time
/
2
);
reset_floating_point_exceptions
();
set_proper_floating_point_mode
();
init_thr_lock
();
init_thr_lock
();
#ifdef HAVE_REPLICATION
#ifdef HAVE_REPLICATION
init_slave_list
();
init_slave_list
();
...
...
sql/protocol.cc
View file @
4e50bb0e
...
@@ -56,7 +56,10 @@ void send_error(THD *thd, uint sql_errno, const char *err)
...
@@ -56,7 +56,10 @@ void send_error(THD *thd, uint sql_errno, const char *err)
{
{
#ifndef EMBEDDED_LIBRARY
#ifndef EMBEDDED_LIBRARY
uint
length
;
uint
length
;
char
buff
[
MYSQL_ERRMSG_SIZE
+
2
],
*
pos
;
/*
buff[]: sql_errno:2 + ('#':1 + SQLSTATE_LENGTH:5) + MYSQL_ERRMSG_SIZE:512
*/
char
buff
[
2
+
1
+
SQLSTATE_LENGTH
+
MYSQL_ERRMSG_SIZE
],
*
pos
;
#endif
#endif
const
char
*
orig_err
=
err
;
const
char
*
orig_err
=
err
;
NET
*
net
=
&
thd
->
net
;
NET
*
net
=
&
thd
->
net
;
...
...
sql/sql_table.cc
View file @
4e50bb0e
...
@@ -2429,12 +2429,12 @@ int mysql_create_like_table(THD* thd, TABLE_LIST* table,
...
@@ -2429,12 +2429,12 @@ int mysql_create_like_table(THD* thd, TABLE_LIST* table,
strxmov
(
src_path
,
(
*
tmp_table
)
->
path
,
reg_ext
,
NullS
);
strxmov
(
src_path
,
(
*
tmp_table
)
->
path
,
reg_ext
,
NullS
);
else
else
{
{
strxmov
(
src_path
,
mysql_data_home
,
"/"
,
src_db
,
"/"
,
src_table
,
char
*
tablename_pos
=
strxmov
(
src_path
,
mysql_data_home
,
"/"
,
NullS
);
reg_ext
,
NullS
);
strxmov
(
tablename_pos
,
src_db
,
"/"
,
src_table
,
reg_ext
,
NullS
);
if
(
lower_case_table_names
)
my_casedn_str
(
files_charset_info
,
tablename_pos
);
/* Resolve symlinks (for windows) */
/* Resolve symlinks (for windows) */
fn_format
(
src_path
,
src_path
,
""
,
""
,
MYF
(
MY_UNPACK_FILENAME
));
fn_format
(
src_path
,
src_path
,
""
,
""
,
MYF
(
MY_UNPACK_FILENAME
));
if
(
lower_case_table_names
)
my_casedn_str
(
files_charset_info
,
src_path
);
if
(
access
(
src_path
,
F_OK
))
if
(
access
(
src_path
,
F_OK
))
{
{
my_error
(
ER_BAD_TABLE_ERROR
,
MYF
(
0
),
src_table
);
my_error
(
ER_BAD_TABLE_ERROR
,
MYF
(
0
),
src_table
);
...
...
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