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
3695c641
Commit
3695c641
authored
Feb 12, 2003
by
monty@mashka.mysql.fi
Browse files
Options
Browse Files
Download
Plain Diff
Merge work:/home/bk/mysql-4.1 into mashka.mysql.fi:/home/my/mysql-4.1
parents
9d000c32
7b1ed961
Changes
11
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
1011 additions
and
349 deletions
+1011
-349
Docs/gis.txt
Docs/gis.txt
+14
-1
Docs/prepare.texi
Docs/prepare.texi
+440
-126
libmysql/libmysql.c
libmysql/libmysql.c
+27
-16
myisam/rt_index.c
myisam/rt_index.c
+1
-1
scripts/mysqld_safe.sh
scripts/mysqld_safe.sh
+1
-2
sql/field.cc
sql/field.cc
+1
-1
sql/item_uniq.h
sql/item_uniq.h
+1
-1
sql/lex.h
sql/lex.h
+11
-7
sql/sql_derived.cc
sql/sql_derived.cc
+1
-1
sql/sql_yacc.yy
sql/sql_yacc.yy
+22
-0
tests/client_test.c
tests/client_test.c
+492
-193
No files found.
Docs/gis.txt
View file @
3695c641
...
...
@@ -496,18 +496,28 @@ built GEOMETRY value.
* |*LineFromText(lineStringTaggedText String [,SRID
Integer]):LineString *| - constructs a LineString
. |*LineStringFromText()*| - synonym for LineFromText().
* |*PolyFromText(polygonTaggedText String [,SRID Integer]):Polygon
*|- constructs a Polygon
|*PolygonFromText()*| - synonym for PolyFromText().
* |*MPointFromText(multiPointTaggedText String [,SRID
Integer]):MultiPoint *| - constructs a MultiPoint
|*MultiPointFromText()*| - synonym for MPointFromText().
* |*MLineFromText(multiLineStringTaggedText String [,SRID
Integer]):MultiLineString *| - constructs a MultiLineString
|*MultiLineStringFromText()*| - synonym for MLineFromText().
* |*MPolyFromText(multiPolygonTaggedText String [,SRID
Integer]):MultiPolygon *| - constructs a MultiPolygon
|*MultiPolygonFromText()*| - synonym for MPolyFromText().
* |*GeomCollFromText(geometryCollectionTaggedText String [,SRID
Integer]):GeomCollection *| - constructs a GeometryCollection
...
...
@@ -844,7 +854,10 @@ implementation of several spatial field types correspondent to every
instansiable object subclass. For example a *Point* type is proposed to
restrict data stored in a field of this type to only Point OpenGIS
subclass. MySQL provides an implementation of single GEOMETRY type which
doesn't restrict objects to certain OpenGIS subclass.
doesn't restrict objects to certain OpenGIS subclass. Other proposed
spatial field types are mapped into GEOMETRY type, so all these types
can be used as a symonym for GEOMETRY: POINT, MULTIPOINT, LINESTRING,
MULTILINESTRING, POLYGON, MULTIPOLYGON.
9.2 No additional Metadata Views
...
...
Docs/prepare.texi
View file @
3695c641
This diff is collapsed.
Click to expand it.
libmysql/libmysql.c
View file @
3695c641
...
...
@@ -2084,7 +2084,7 @@ Try also with PIPE or TCP/IP
}
sock_addr
.
sin_port
=
(
ushort
)
htons
((
ushort
)
port
);
if
(
my_connect
(
sock
,(
struct
sockaddr
*
)
&
sock_addr
,
sizeof
(
sock_addr
),
mysql
->
options
.
connect_timeout
)
<
0
)
mysql
->
options
.
connect_timeout
))
{
DBUG_PRINT
(
"error"
,(
"Got error %d on connect to '%s'"
,
socket_errno
,
host
));
net
->
last_errno
=
CR_CONN_HOST_ERROR
;
...
...
@@ -4043,6 +4043,7 @@ unsigned int alloc_stmt_fields(MYSQL_STMT *stmt)
field
->
org_table
=
strdup_root
(
alloc
,
fields
->
org_table
);
field
->
name
=
strdup_root
(
alloc
,
fields
->
name
);
field
->
org_name
=
strdup_root
(
alloc
,
fields
->
org_name
);
field
->
charsetnr
=
fields
->
charsetnr
;
field
->
length
=
fields
->
length
;
field
->
type
=
fields
->
type
;
field
->
flags
=
fields
->
flags
;
...
...
@@ -4767,13 +4768,13 @@ static void send_data_long(MYSQL_BIND *param, longlong value)
*
param
->
buffer
=
(
uchar
)
value
;
break
;
case
MYSQL_TYPE_SHORT
:
int2store
(
buffer
,
(
short
)
value
);
int2store
(
buffer
,
value
);
break
;
case
MYSQL_TYPE_LONG
:
int4store
(
buffer
,
(
int32
)
value
);
int4store
(
buffer
,
value
);
break
;
case
MYSQL_TYPE_LONGLONG
:
int8store
(
buffer
,
(
longlong
)
value
);
int8store
(
buffer
,
value
);
break
;
case
MYSQL_TYPE_FLOAT
:
{
...
...
@@ -4810,7 +4811,7 @@ static void send_data_double(MYSQL_BIND *param, double value)
int2store
(
buffer
,
(
short
)
value
);
break
;
case
MYSQL_TYPE_LONG
:
int4store
(
buffer
,
(
int32
)
value
);
int4store
(
buffer
,
(
long
)
value
);
break
;
case
MYSQL_TYPE_LONGLONG
:
int8store
(
buffer
,
(
longlong
)
value
);
...
...
@@ -4947,30 +4948,37 @@ static void send_data_time(MYSQL_BIND *param, MYSQL_TIME ltime,
/* Fetch data to buffers */
static
void
fetch_results
(
MYSQL_BIND
*
param
,
uint
field_type
,
uchar
**
row
)
static
void
fetch_results
(
MYSQL_BIND
*
param
,
uint
field_type
,
uchar
**
row
,
my_bool
field_is_unsigned
)
{
ulong
length
;
switch
(
field_type
)
{
case
MYSQL_TYPE_TINY
:
{
uchar
value
=
(
uchar
)
**
row
;
send_data_long
(
param
,(
longlong
)
value
);
char
value
=
(
char
)
**
row
;
longlong
data
=
(
field_is_unsigned
)
?
(
longlong
)
(
unsigned
char
)
value
:
(
longlong
)
value
;
send_data_long
(
param
,
data
);
length
=
1
;
break
;
}
case
MYSQL_TYPE_SHORT
:
case
MYSQL_TYPE_YEAR
:
{
short
value
=
(
short
)
sint2korr
(
*
row
);
send_data_long
(
param
,(
longlong
)
value
);
length
=
2
;
short
value
=
sint2korr
(
*
row
);
longlong
data
=
(
field_is_unsigned
)
?
(
longlong
)
(
unsigned
short
)
value
:
(
longlong
)
value
;
send_data_long
(
param
,
data
);
length
=
2
;
break
;
}
case
MYSQL_TYPE_LONG
:
{
int32
value
=
(
int32
)
sint4korr
(
*
row
);
send_data_long
(
param
,(
int32
)
value
);
long
value
=
sint4korr
(
*
row
);
longlong
data
=
(
field_is_unsigned
)
?
(
longlong
)
(
unsigned
long
)
value
:
(
longlong
)
value
;
send_data_long
(
param
,
data
);
length
=
4
;
break
;
}
...
...
@@ -4985,7 +4993,7 @@ static void fetch_results(MYSQL_BIND *param, uint field_type, uchar **row)
{
float
value
;
float4get
(
value
,
*
row
);
send_data_double
(
param
,
(
double
)
value
);
send_data_double
(
param
,
value
);
length
=
4
;
break
;
}
...
...
@@ -4993,7 +5001,7 @@ static void fetch_results(MYSQL_BIND *param, uint field_type, uchar **row)
{
double
value
;
float8get
(
value
,
*
row
);
send_data_double
(
param
,
(
double
)
value
);
send_data_double
(
param
,
value
);
length
=
8
;
break
;
}
...
...
@@ -5241,7 +5249,10 @@ static int stmt_fetch_row(MYSQL_STMT *stmt, uchar *row)
if
(
field
->
type
==
bind
->
buffer_type
)
(
*
bind
->
fetch_result
)(
bind
,
&
row
);
else
fetch_results
(
bind
,
field
->
type
,
&
row
);
{
my_bool
field_is_unsigned
=
(
field
->
flags
&
UNSIGNED_FLAG
)
?
1
:
0
;
fetch_results
(
bind
,
field
->
type
,
&
row
,
field_is_unsigned
);
}
}
if
(
!
((
bit
<<=
1
)
&
255
))
{
...
...
myisam/rt_index.c
View file @
3695c641
...
...
@@ -503,7 +503,7 @@ static int rtree_insert_level(MI_INFO *info, uint keynr, uchar *key,
return
res
;
}
switch
((
res
=
rtree_insert_req
(
info
,
&
keyinfo
[
keynr
]
,
key
,
key_length
,
switch
((
res
=
rtree_insert_req
(
info
,
keyinfo
,
key
,
key_length
,
old_root
,
&
new_page
,
ins_level
,
0
)))
{
case
0
:
/* root was not split */
...
...
scripts/mysqld_safe.sh
View file @
3695c641
...
...
@@ -272,7 +272,6 @@ echo "Starting $MYSQLD daemon with databases from $DATADIR"
echo
"
`
date
+
'%y%m%d %H:%M:%S mysqld started'
`
"
>>
$err_log
while
true
do
rm
-f
$MYSQL_UNIX_PORT
$pid_file
# Some extra safety
if
test
-z
"
$args
"
then
$NOHUP_NICENESS
$ledir
/
$MYSQLD
$defaults
--basedir
=
$MY_BASEDIR_VERSION
--datadir
=
$DATADIR
$USER_OPTION
--pid-file
=
$pid_file
@MYSQLD_DEFAULT_SWITCHES@
>>
$err_log
2>&1
...
...
@@ -311,7 +310,7 @@ do
I
=
`
expr
$I
+ 1
`
done
fi
rm
-f
$MYSQL_UNIX_PORT
$pid_file
# Some extra safety
echo
"
`
date
+
'%y%m%d %H:%M:%S'
`
mysqld restarted"
|
tee
-a
$err_log
done
...
...
sql/field.cc
View file @
3695c641
...
...
@@ -1913,7 +1913,7 @@ int Field_longlong::store(const char *from,uint len,CHARSET_INFO *cs)
char
*
end
;
tmp
=
cs
->
scan
(
cs
,
from
,
from
+
len
,
MY_SEQ_SPACES
);
len
-=
tmp
;
len
-=
(
uint
)
tmp
;
from
+=
tmp
;
my_errno
=
0
;
if
(
unsigned_flag
)
...
...
sql/item_uniq.h
View file @
3695c641
...
...
@@ -50,7 +50,7 @@ public:
fixed
=
1
;
return
0
;
}
Item
_sum
*
copy_or_same
(
THD
*
thd
)
Item
*
copy_or_same
(
THD
*
thd
)
{
return
new
Item_sum_unique_users
(
thd
,
*
this
);
}
...
...
sql/lex.h
View file @
3695c641
...
...
@@ -222,6 +222,7 @@ static SYMBOL symbols[] = {
{
"LEVEL"
,
SYM
(
LEVEL_SYM
),
0
,
0
},
{
"LIKE"
,
SYM
(
LIKE
),
0
,
0
},
{
"LINES"
,
SYM
(
LINES
),
0
,
0
},
{
"LINESTRING"
,
SYM
(
LINESTRING
),
0
,
0
},
{
"LIMIT"
,
SYM
(
LIMIT
),
0
,
0
},
{
"LOAD"
,
SYM
(
LOAD
),
0
,
0
},
{
"LOCAL"
,
SYM
(
LOCAL_SYM
),
0
,
0
},
...
...
@@ -261,6 +262,9 @@ static SYMBOL symbols[] = {
{
"MODE"
,
SYM
(
MODE_SYM
),
0
,
0
},
{
"MODIFY"
,
SYM
(
MODIFY_SYM
),
0
,
0
},
{
"MONTH"
,
SYM
(
MONTH_SYM
),
0
,
0
},
{
"MULTILINESTRING"
,
SYM
(
MULTILINESTRING
),
0
,
0
},
{
"MULTIPOINT"
,
SYM
(
MULTIPOINT
),
0
,
0
},
{
"MULTIPOLYGON"
,
SYM
(
MULTIPOLYGON
),
0
,
0
},
{
"MRG_MYISAM"
,
SYM
(
MERGE_SYM
),
0
,
0
},
{
"MYISAM"
,
SYM
(
MYISAM_SYM
),
0
,
0
},
{
"NATURAL"
,
SYM
(
NATURAL
),
0
,
0
},
...
...
@@ -286,6 +290,8 @@ static SYMBOL symbols[] = {
{
"PACK_KEYS"
,
SYM
(
PACK_KEYS_SYM
),
0
,
0
},
{
"PARTIAL"
,
SYM
(
PARTIAL
),
0
,
0
},
{
"PASSWORD"
,
SYM
(
PASSWORD
),
0
,
0
},
{
"POINT"
,
SYM
(
POINT
),
0
,
0
},
{
"POLYGON"
,
SYM
(
POLYGON
),
0
,
0
},
{
"PURGE"
,
SYM
(
PURGE
),
0
,
0
},
{
"PRECISION"
,
SYM
(
PRECISION
),
0
,
0
},
{
"PREV"
,
SYM
(
PREV_SYM
),
0
,
0
},
...
...
@@ -503,7 +509,7 @@ static SYMBOL sql_functions[] = {
{
"LENGTH"
,
SYM
(
FUNC_ARG1
),
0
,
CREATE_FUNC
(
create_func_length
)},
{
"LN"
,
SYM
(
FUNC_ARG1
),
0
,
CREATE_FUNC
(
create_func_ln
)},
{
"LINEFROMTEXT"
,
SYM
(
LINEFROMTEXT
),
0
,
0
},
{
"LINESTRING
"
,
SYM
(
LINESTRING
),
0
,
0
},
{
"LINESTRING
FROMTEXT"
,
SYM
(
LINEFROMTEXT
),
0
,
0
},
{
"LOAD_FILE"
,
SYM
(
FUNC_ARG1
),
0
,
CREATE_FUNC
(
create_load_file
)},
{
"LOCATE"
,
SYM
(
LOCATE
),
0
,
0
},
{
"LOG"
,
SYM
(
LOG_SYM
),
0
,
0
},
...
...
@@ -521,14 +527,13 @@ static SYMBOL sql_functions[] = {
{
"MLINEFROMTEXT"
,
SYM
(
MLINEFROMTEXT
),
0
,
0
},
{
"MPOINTFROMTEXT"
,
SYM
(
MPOINTFROMTEXT
),
0
,
0
},
{
"MPOLYFROMTEXT"
,
SYM
(
MPOLYFROMTEXT
),
0
,
0
},
{
"MULTILINESTRING"
,
SYM
(
MULTILINESTRING
),
0
,
0
},
{
"MULTIPOINT"
,
SYM
(
MULTIPOINT
),
0
,
0
},
{
"MULTIPOLYGON"
,
SYM
(
MULTIPOLYGON
),
0
,
0
},
{
"MONTHNAME"
,
SYM
(
FUNC_ARG1
),
0
,
CREATE_FUNC
(
create_func_monthname
)},
{
"MULTILINESTRINGFROMTEXT"
,
SYM
(
MLINEFROMTEXT
),
0
,
0
},
{
"MULTIPOLYGONFROMTEXT"
,
SYM
(
MPOLYFROMTEXT
),
0
,
0
},
{
"NOW"
,
SYM
(
NOW_SYM
),
0
,
0
},
{
"NULLIF"
,
SYM
(
FUNC_ARG2
),
0
,
CREATE_FUNC
(
create_func_nullif
)},
{
"NUMGEOMETRIES"
,
SYM
(
FUNC_ARG1
),
0
,
CREATE_FUNC
(
create_func_numgeometries
)},
{
"NUMINTERIORRING"
,
SYM
(
FUNC_ARG1
),
0
,
CREATE_FUNC
(
create_func_numinteriorring
)},
{
"NUMINTERIORRING
S
"
,
SYM
(
FUNC_ARG1
),
0
,
CREATE_FUNC
(
create_func_numinteriorring
)},
{
"NUMPOINTS"
,
SYM
(
FUNC_ARG1
),
0
,
CREATE_FUNC
(
create_func_numpoints
)},
{
"OCTET_LENGTH"
,
SYM
(
FUNC_ARG1
),
0
,
CREATE_FUNC
(
create_func_length
)},
{
"OCT"
,
SYM
(
FUNC_ARG1
),
0
,
CREATE_FUNC
(
create_func_oct
)},
...
...
@@ -538,11 +543,10 @@ static SYMBOL sql_functions[] = {
{
"PERIOD_ADD"
,
SYM
(
FUNC_ARG2
),
0
,
CREATE_FUNC
(
create_func_period_add
)},
{
"PERIOD_DIFF"
,
SYM
(
FUNC_ARG2
),
0
,
CREATE_FUNC
(
create_func_period_diff
)},
{
"PI"
,
SYM
(
FUNC_ARG0
),
0
,
CREATE_FUNC
(
create_func_pi
)},
{
"POINT"
,
SYM
(
FUNC_ARG2
),
0
,
CREATE_FUNC
(
create_func_point
)},
{
"POINTFROMTEXT"
,
SYM
(
POINTFROMTEXT
),
0
,
0
},
{
"POINTN"
,
SYM
(
FUNC_ARG2
),
0
,
CREATE_FUNC
(
create_func_pointn
)},
{
"POLYFROMTEXT"
,
SYM
(
POLYFROMTEXT
),
0
,
0
},
{
"POLYGON
"
,
SYM
(
POLYGON
),
0
,
0
},
{
"POLYGON
FROMTEXT"
,
SYM
(
POLYFROMTEXT
),
0
,
0
},
{
"POSITION"
,
SYM
(
POSITION_SYM
),
0
,
0
},
{
"POW"
,
SYM
(
FUNC_ARG2
),
0
,
CREATE_FUNC
(
create_func_pow
)},
{
"POWER"
,
SYM
(
FUNC_ARG2
),
0
,
CREATE_FUNC
(
create_func_pow
)},
...
...
sql/sql_derived.cc
View file @
3695c641
...
...
@@ -72,7 +72,7 @@ int mysql_derived(THD *thd, LEX *lex, SELECT_LEX_UNIT *unit,
TABLE_LIST
*
tables
=
(
TABLE_LIST
*
)
sl
->
table_list
.
first
;
TMP_TABLE_PARAM
tmp_table_param
;
bool
is_union
=
sl
->
next_select
()
&&
sl
->
next_select
()
->
linkage
==
UNION_TYPE
;
bool
is_subsel
=
sl
->
first_inner_unit
();
bool
is_subsel
=
sl
->
first_inner_unit
()
?
1
:
0
;
SELECT_LEX_NODE
*
save_current_select
=
lex
->
current_select
;
DBUG_ENTER
(
"mysql_derived"
);
...
...
sql/sql_yacc.yy
View file @
3695c641
...
...
@@ -486,6 +486,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b,int *yystacksize);
%token NOW_SYM
%token PASSWORD
%token POINTFROMTEXT
%token POINT
%token POLYFROMTEXT
%token POLYGON
%token POSITION_SYM
...
...
@@ -1145,6 +1146,18 @@ type:
$$=FIELD_TYPE_BLOB; }
| GEOMETRY_SYM { Lex->charset=&my_charset_bin;
$$=FIELD_TYPE_GEOMETRY; }
| POINT { Lex->charset=&my_charset_bin;
$$=FIELD_TYPE_GEOMETRY; }
| MULTIPOINT { Lex->charset=&my_charset_bin;
$$=FIELD_TYPE_GEOMETRY; }
| LINESTRING { Lex->charset=&my_charset_bin;
$$=FIELD_TYPE_GEOMETRY; }
| MULTILINESTRING { Lex->charset=&my_charset_bin;
$$=FIELD_TYPE_GEOMETRY; }
| POLYGON { Lex->charset=&my_charset_bin;
$$=FIELD_TYPE_GEOMETRY; }
| MULTIPOLYGON { Lex->charset=&my_charset_bin;
$$=FIELD_TYPE_GEOMETRY; }
| MEDIUMBLOB { Lex->charset=&my_charset_bin;
$$=FIELD_TYPE_MEDIUM_BLOB; }
| LONGBLOB { Lex->charset=&my_charset_bin;
...
...
@@ -2299,6 +2312,8 @@ simple_expr:
{ $$= new Item_func_password($3); }
| PASSWORD '(' expr ',' expr ')'
{ $$= new Item_func_password($3,$5); }
| POINT '(' expr ',' expr ')'
{ $$= new Item_func_point($3,$5); }
| POINTFROMTEXT '(' expr ')'
{ $$= new Item_func_geometry_from_text($3); }
| POINTFROMTEXT '(' expr ',' expr ')'
...
...
@@ -3966,6 +3981,7 @@ keyword:
| FIRST_SYM {}
| FIXED_SYM {}
| FLUSH_SYM {}
| GEOMETRY_SYM {}
| GRANTS {}
| GLOBAL_SYM {}
| HANDLER_SYM {}
...
...
@@ -3983,6 +3999,7 @@ keyword:
| IO_THREAD {}
| LAST_SYM {}
| LEVEL_SYM {}
| LINESTRING {}
| LOCAL_SYM {}
| LOCKS_SYM {}
| LOGS_SYM {}
...
...
@@ -4005,6 +4022,9 @@ keyword:
| MODIFY_SYM {}
| MODE_SYM {}
| MONTH_SYM {}
| MULTILINESTRING {}
| MULTIPOINT {}
| MULTIPOLYGON {}
| MYISAM_SYM {}
| NATIONAL_SYM {}
| NCHAR_SYM {}
...
...
@@ -4017,6 +4037,8 @@ keyword:
| PACK_KEYS_SYM {}
| PARTIAL {}
| PASSWORD {}
| POINT {}
| POLYGON {}
| PREV_SYM {}
| PROCESS {}
| PROCESSLIST_SYM {}
...
...
tests/client_test.c
View file @
3695c641
This diff is collapsed.
Click to expand it.
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