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
12f7fb82
Commit
12f7fb82
authored
Sep 23, 2004
by
dlenev@mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/home/dlenev/src/mysql-4.1-memroot
parents
d2a29047
7f7f7b0d
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
93 additions
and
49 deletions
+93
-49
mysql-test/r/gis.result
mysql-test/r/gis.result
+7
-0
mysql-test/r/rpl_charset.result
mysql-test/r/rpl_charset.result
+8
-0
mysql-test/t/gis.test
mysql-test/t/gis.test
+4
-0
mysql-test/t/rpl_charset.test
mysql-test/t/rpl_charset.test
+18
-0
sql/item_geofunc.cc
sql/item_geofunc.cc
+15
-18
sql/item_geofunc.h
sql/item_geofunc.h
+32
-30
sql/log_event.cc
sql/log_event.cc
+9
-1
No files found.
mysql-test/r/gis.result
View file @
12f7fb82
...
...
@@ -485,3 +485,10 @@ MBRContains(GeomFromText('Polygon((0 0, 0 7, 7 7, 7 0, 0 0))'), a);
AsText(a)
POINT(1 1)
drop table t1;
create table t1 select POINT(1,3);
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`POINT(1,3)` longblob NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
mysql-test/r/rpl_charset.result
View file @
12f7fb82
...
...
@@ -198,4 +198,12 @@ CDF32C20E7E020F0FBE1E0EBEAF3 CDF32C20E7E020F0FBE1E0EBEAF3
select hex(c1), hex(c2) from t1;
hex(c1) hex(c2)
CDF32C20E7E020F0FBE1E0EBEAF3 CDF32C20E7E020F0FBE1E0EBEAF3
stop slave;
delete from t1;
change master to master_log_pos=5801;
start slave until master_log_file='master-bin.000001', master_log_pos=5937;
start slave;
select hex(c1), hex(c2) from t1;
hex(c1) hex(c2)
CDF32C20E7E020F0FBE1E0EBEAF3 CDF32C20E7E020F0FBE1E0EBEAF3
drop table t1;
mysql-test/t/gis.test
View file @
12f7fb82
...
...
@@ -190,3 +190,7 @@ select AsText(a) from t1 where
and
MBRContains
(
GeomFromText
(
'Polygon((0 0, 0 7, 7 7, 7 0, 0 0))'
),
a
);
drop
table
t1
;
create
table
t1
select
POINT
(
1
,
3
);
show
create
table
t1
;
drop
table
t1
;
mysql-test/t/rpl_charset.test
View file @
12f7fb82
...
...
@@ -148,6 +148,24 @@ INSERT INTO t1 (c1, c2) VALUES ('
select
hex
(
c1
),
hex
(
c2
)
from
t1
;
sync_slave_with_master
;
select
hex
(
c1
),
hex
(
c2
)
from
t1
;
# Now test for BUG##5705: SET CHARATER_SET_SERVERetc will be lost if
# STOP SLAVE before following query
stop
slave
;
delete
from
t1
;
change
master
to
master_log_pos
=
5801
;
start
slave
until
master_log_file
=
'master-bin.000001'
,
master_log_pos
=
5937
;
# Slave is supposed to stop _after_ the INSERT, even though 5937 is
# the position of the beginning of the INSERT; after SET slave is not
# supposed to increment position.
wait_for_slave_to_stop
;
# When you merge this into 5.0 you will have to adjust positions
# above; the first master_log_pos above should be the one of the SET,
# the second should be the one of the INSERT.
start
slave
;
sync_with_master
;
select
hex
(
c1
),
hex
(
c2
)
from
t1
;
connection
master
;
drop
table
t1
;
sync_slave_with_master
;
sql/item_geofunc.cc
View file @
12f7fb82
...
...
@@ -27,6 +27,13 @@
#include "sql_acl.h"
#include <m_ctype.h>
void
Item_geometry_func
::
fix_length_and_dec
()
{
collation
.
set
(
&
my_charset_bin
);
decimals
=
0
;
max_length
=
MAX_BLOB_WIDTH
;
}
String
*
Item_func_geometry_from_text
::
val_str
(
String
*
str
)
{
...
...
@@ -44,6 +51,7 @@ String *Item_func_geometry_from_text::val_str(String *str)
if
((
arg_count
==
2
)
&&
!
args
[
1
]
->
null_value
)
srid
=
(
uint32
)
args
[
1
]
->
val_int
();
str
->
set_charset
(
&
my_charset_bin
);
if
(
str
->
reserve
(
SRID_SIZE
,
512
))
return
0
;
str
->
length
(
0
);
...
...
@@ -54,12 +62,6 @@ String *Item_func_geometry_from_text::val_str(String *str)
}
void
Item_func_geometry_from_text
::
fix_length_and_dec
()
{
max_length
=
MAX_BLOB_WIDTH
;
}
String
*
Item_func_geometry_from_wkb
::
val_str
(
String
*
str
)
{
DBUG_ASSERT
(
fixed
==
1
);
...
...
@@ -71,6 +73,7 @@ String *Item_func_geometry_from_wkb::val_str(String *str)
if
((
arg_count
==
2
)
&&
!
args
[
1
]
->
null_value
)
srid
=
(
uint32
)
args
[
1
]
->
val_int
();
str
->
set_charset
(
&
my_charset_bin
);
if
(
str
->
reserve
(
SRID_SIZE
,
512
))
return
0
;
str
->
length
(
0
);
...
...
@@ -84,12 +87,6 @@ String *Item_func_geometry_from_wkb::val_str(String *str)
}
void
Item_func_geometry_from_wkb
::
fix_length_and_dec
()
{
max_length
=
MAX_BLOB_WIDTH
;
}
String
*
Item_func_as_wkt
::
val_str
(
String
*
str
)
{
DBUG_ASSERT
(
fixed
==
1
);
...
...
@@ -138,12 +135,6 @@ String *Item_func_as_wkb::val_str(String *str)
}
void
Item_func_as_wkb
::
fix_length_and_dec
()
{
max_length
=
MAX_BLOB_WIDTH
;
}
String
*
Item_func_geometry_type
::
val_str
(
String
*
str
)
{
DBUG_ASSERT
(
fixed
==
1
);
...
...
@@ -180,6 +171,7 @@ String *Item_func_envelope::val_str(String *str)
return
0
;
srid
=
uint4korr
(
swkb
->
ptr
());
str
->
set_charset
(
&
my_charset_bin
);
str
->
length
(
0
);
if
(
str
->
reserve
(
SRID_SIZE
,
512
))
return
0
;
...
...
@@ -202,6 +194,7 @@ String *Item_func_centroid::val_str(String *str)
swkb
->
length
()
-
SRID_SIZE
))))
return
0
;
str
->
set_charset
(
&
my_charset_bin
);
if
(
str
->
reserve
(
SRID_SIZE
,
512
))
return
0
;
str
->
length
(
0
);
...
...
@@ -232,6 +225,7 @@ String *Item_func_spatial_decomp::val_str(String *str)
return
0
;
srid
=
uint4korr
(
swkb
->
ptr
());
str
->
set_charset
(
&
my_charset_bin
);
if
(
str
->
reserve
(
SRID_SIZE
,
512
))
goto
err
;
str
->
length
(
0
);
...
...
@@ -279,6 +273,7 @@ String *Item_func_spatial_decomp_n::val_str(String *str)
swkb
->
length
()
-
SRID_SIZE
)))))
return
0
;
str
->
set_charset
(
&
my_charset_bin
);
if
(
str
->
reserve
(
SRID_SIZE
,
512
))
goto
err
;
srid
=
uint4korr
(
swkb
->
ptr
());
...
...
@@ -333,6 +328,7 @@ String *Item_func_point::val_str(String *str)
str
->
realloc
(
1
+
4
+
SIZEOF_STORED_DOUBLE
*
2
))))
return
0
;
str
->
set_charset
(
&
my_charset_bin
);
str
->
length
(
0
);
str
->
q_append
((
char
)
Geometry
::
wkb_ndr
);
str
->
q_append
((
uint32
)
Geometry
::
wkb_point
);
...
...
@@ -358,6 +354,7 @@ String *Item_func_spatial_collection::val_str(String *str)
String
arg_value
;
uint
i
;
str
->
set_charset
(
&
my_charset_bin
);
str
->
length
(
0
);
if
(
str
->
reserve
(
1
+
4
+
4
,
512
))
goto
err
;
...
...
sql/item_geofunc.h
View file @
12f7fb82
...
...
@@ -23,24 +23,33 @@
#pragma interface
/* gcc class implementation */
#endif
class
Item_
func_geometry_from_text
:
public
Item_str_func
class
Item_
geometry_func
:
public
Item_str_func
{
public:
Item_func_geometry_from_text
(
Item
*
a
)
:
Item_str_func
(
a
)
{}
Item_func_geometry_from_text
(
Item
*
a
,
Item
*
srid
)
:
Item_str_func
(
a
,
srid
)
{}
Item_geometry_func
()
:
Item_str_func
()
{}
Item_geometry_func
(
Item
*
a
)
:
Item_str_func
(
a
)
{}
Item_geometry_func
(
Item
*
a
,
Item
*
b
)
:
Item_str_func
(
a
,
b
)
{}
Item_geometry_func
(
Item
*
a
,
Item
*
b
,
Item
*
c
)
:
Item_str_func
(
a
,
b
,
c
)
{}
Item_geometry_func
(
List
<
Item
>
&
list
)
:
Item_str_func
(
list
)
{}
void
fix_length_and_dec
();
};
class
Item_func_geometry_from_text
:
public
Item_geometry_func
{
public:
Item_func_geometry_from_text
(
Item
*
a
)
:
Item_geometry_func
(
a
)
{}
Item_func_geometry_from_text
(
Item
*
a
,
Item
*
srid
)
:
Item_geometry_func
(
a
,
srid
)
{}
const
char
*
func_name
()
const
{
return
"geometryfromtext"
;
}
String
*
val_str
(
String
*
);
void
fix_length_and_dec
();
};
class
Item_func_geometry_from_wkb
:
public
Item_
str
_func
class
Item_func_geometry_from_wkb
:
public
Item_
geometry
_func
{
public:
Item_func_geometry_from_wkb
(
Item
*
a
)
:
Item_
str
_func
(
a
)
{}
Item_func_geometry_from_wkb
(
Item
*
a
,
Item
*
srid
)
:
Item_
str
_func
(
a
,
srid
)
{}
Item_func_geometry_from_wkb
(
Item
*
a
)
:
Item_
geometry
_func
(
a
)
{}
Item_func_geometry_from_wkb
(
Item
*
a
,
Item
*
srid
)
:
Item_
geometry
_func
(
a
,
srid
)
{}
const
char
*
func_name
()
const
{
return
"geometryfromwkb"
;
}
String
*
val_str
(
String
*
);
void
fix_length_and_dec
();
};
class
Item_func_as_wkt
:
public
Item_str_func
...
...
@@ -52,13 +61,12 @@ public:
void
fix_length_and_dec
();
};
class
Item_func_as_wkb
:
public
Item_
str
_func
class
Item_func_as_wkb
:
public
Item_
geometry
_func
{
public:
Item_func_as_wkb
(
Item
*
a
)
:
Item_
str
_func
(
a
)
{}
Item_func_as_wkb
(
Item
*
a
)
:
Item_
geometry
_func
(
a
)
{}
const
char
*
func_name
()
const
{
return
"aswkb"
;
}
String
*
val_str
(
String
*
);
void
fix_length_and_dec
();
};
class
Item_func_geometry_type
:
public
Item_str_func
...
...
@@ -73,40 +81,37 @@ public:
};
};
class
Item_func_centroid
:
public
Item_
str
_func
class
Item_func_centroid
:
public
Item_
geometry
_func
{
public:
Item_func_centroid
(
Item
*
a
)
:
Item_
str
_func
(
a
)
{}
Item_func_centroid
(
Item
*
a
)
:
Item_
geometry
_func
(
a
)
{}
const
char
*
func_name
()
const
{
return
"centroid"
;
}
String
*
val_str
(
String
*
);
void
fix_length_and_dec
(){
max_length
=
MAX_BLOB_WIDTH
;}
};
class
Item_func_envelope
:
public
Item_
str
_func
class
Item_func_envelope
:
public
Item_
geometry
_func
{
public:
Item_func_envelope
(
Item
*
a
)
:
Item_
str
_func
(
a
)
{}
Item_func_envelope
(
Item
*
a
)
:
Item_
geometry
_func
(
a
)
{}
const
char
*
func_name
()
const
{
return
"envelope"
;
}
String
*
val_str
(
String
*
);
void
fix_length_and_dec
(){
max_length
=
MAX_BLOB_WIDTH
;}
};
class
Item_func_point
:
public
Item_
str
_func
class
Item_func_point
:
public
Item_
geometry
_func
{
public:
Item_func_point
(
Item
*
a
,
Item
*
b
)
:
Item_
str
_func
(
a
,
b
)
{}
Item_func_point
(
Item
*
a
,
Item
*
b
,
Item
*
srid
)
:
Item_
str
_func
(
a
,
b
,
srid
)
{}
Item_func_point
(
Item
*
a
,
Item
*
b
)
:
Item_
geometry
_func
(
a
,
b
)
{}
Item_func_point
(
Item
*
a
,
Item
*
b
,
Item
*
srid
)
:
Item_
geometry
_func
(
a
,
b
,
srid
)
{}
const
char
*
func_name
()
const
{
return
"point"
;
}
String
*
val_str
(
String
*
);
void
fix_length_and_dec
(){
max_length
=
MAX_BLOB_WIDTH
;}
};
class
Item_func_spatial_decomp
:
public
Item_
str
_func
class
Item_func_spatial_decomp
:
public
Item_
geometry
_func
{
enum
Functype
decomp_func
;
public:
Item_func_spatial_decomp
(
Item
*
a
,
Item_func
::
Functype
ft
)
:
Item_
str
_func
(
a
)
{
decomp_func
=
ft
;
}
Item_
geometry
_func
(
a
)
{
decomp_func
=
ft
;
}
const
char
*
func_name
()
const
{
switch
(
decomp_func
)
...
...
@@ -123,15 +128,14 @@ public:
}
}
String
*
val_str
(
String
*
);
void
fix_length_and_dec
(){
max_length
=
MAX_BLOB_WIDTH
;}
};
class
Item_func_spatial_decomp_n
:
public
Item_
str
_func
class
Item_func_spatial_decomp_n
:
public
Item_
geometry
_func
{
enum
Functype
decomp_func_n
;
public:
Item_func_spatial_decomp_n
(
Item
*
a
,
Item
*
b
,
Item_func
::
Functype
ft
)
:
Item_
str
_func
(
a
,
b
)
{
decomp_func_n
=
ft
;
}
Item_
geometry
_func
(
a
,
b
)
{
decomp_func_n
=
ft
;
}
const
char
*
func_name
()
const
{
switch
(
decomp_func_n
)
...
...
@@ -148,10 +152,9 @@ public:
}
}
String
*
val_str
(
String
*
);
void
fix_length_and_dec
(){
max_length
=
MAX_BLOB_WIDTH
;}
};
class
Item_func_spatial_collection
:
public
Item_
str
_func
class
Item_func_spatial_collection
:
public
Item_
geometry
_func
{
String
tmp_value
;
enum
Geometry
::
wkbType
coll_type
;
...
...
@@ -159,13 +162,12 @@ class Item_func_spatial_collection: public Item_str_func
public:
Item_func_spatial_collection
(
List
<
Item
>
&
list
,
enum
Geometry
::
wkbType
ct
,
enum
Geometry
::
wkbType
it
)
:
Item_
str
_func
(
list
)
Item_
geometry
_func
(
list
)
{
coll_type
=
ct
;
item_type
=
it
;
}
String
*
val_str
(
String
*
);
void
fix_length_and_dec
(){
max_length
=
MAX_BLOB_WIDTH
;}
const
char
*
func_name
()
const
{
return
"multipoint"
;
}
};
...
...
sql/log_event.cc
View file @
12f7fb82
...
...
@@ -1091,7 +1091,15 @@ end:
VOID
(
pthread_mutex_unlock
(
&
LOCK_thread_count
));
close_thread_tables
(
thd
);
free_root
(
&
thd
->
mem_root
,
MYF
(
MY_KEEP_PREALLOC
));
return
(
thd
->
query_error
?
thd
->
query_error
:
Log_event
::
exec_event
(
rli
));
/*
If there was an error we stop. Otherwise we increment positions. Note that
we will not increment group* positions if we are just after a SET
ONE_SHOT, because SET ONE_SHOT should not be separated from its following
updating query.
*/
return
(
thd
->
query_error
?
thd
->
query_error
:
(
thd
->
one_shot_set
?
(
rli
->
inc_event_relay_log_pos
(
get_event_len
()),
0
)
:
Log_event
::
exec_event
(
rli
)));
}
#endif
...
...
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