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
b4ad2ecc
Commit
b4ad2ecc
authored
Jul 11, 2007
by
gkodinov/kgeorge@magare.gmz
Browse files
Options
Browse Files
Download
Plain Diff
Merge magare.gmz:/home/kgeorge/mysql/autopush/B29325-5.0-opt
into magare.gmz:/home/kgeorge/mysql/work/B29325-merge-5.1-opt
parents
49285e96
1e4d6904
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
95 additions
and
50 deletions
+95
-50
client/mysql.cc
client/mysql.cc
+6
-1
mysql-test/r/ctype_collate.result
mysql-test/r/ctype_collate.result
+8
-0
mysql-test/r/gis-rtree.result
mysql-test/r/gis-rtree.result
+13
-0
mysql-test/t/ctype_collate.test
mysql-test/t/ctype_collate.test
+11
-0
mysql-test/t/gis-rtree.test
mysql-test/t/gis-rtree.test
+19
-0
mysys/my_conio.c
mysys/my_conio.c
+6
-2
storage/myisam/mi_create.c
storage/myisam/mi_create.c
+2
-4
storage/myisam/sp_key.c
storage/myisam/sp_key.c
+29
-42
strings/ctype-simple.c
strings/ctype-simple.c
+1
-1
No files found.
client/mysql.cc
View file @
b4ad2ecc
...
@@ -1089,7 +1089,12 @@ static int read_and_execute(bool interactive)
...
@@ -1089,7 +1089,12 @@ static int read_and_execute(bool interactive)
something else is still in console input buffer
something else is still in console input buffer
*/
*/
}
while
(
tmpbuf
.
alloced_length
()
<=
clen
);
}
while
(
tmpbuf
.
alloced_length
()
<=
clen
);
line
=
buffer
.
c_ptr
();
/*
An empty line is returned from my_cgets when there's error reading :
Ctrl-c for example
*/
if
(
line
)
line
=
buffer
.
c_ptr
();
#endif
/* __NETWARE__ */
#endif
/* __NETWARE__ */
#else
#else
if
(
opt_outfile
)
if
(
opt_outfile
)
...
...
mysql-test/r/ctype_collate.result
View file @
b4ad2ecc
...
@@ -603,3 +603,11 @@ check table t1 extended;
...
@@ -603,3 +603,11 @@ check table t1 extended;
Table Op Msg_type Msg_text
Table Op Msg_type Msg_text
test.t1 check status OK
test.t1 check status OK
drop table t1;
drop table t1;
create table t1 (a varchar(2) character set latin7 collate latin7_general_ci,key(a));
insert into t1 set a=0x4c20;
insert into t1 set a=0x6c;
insert into t1 set a=0x4c98;
check table t1 extended;
Table Op Msg_type Msg_text
test.t1 check status OK
drop table t1;
mysql-test/r/gis-rtree.result
View file @
b4ad2ecc
...
@@ -1444,3 +1444,16 @@ OPTIMIZE TABLE t1;
...
@@ -1444,3 +1444,16 @@ OPTIMIZE TABLE t1;
Table Op Msg_type Msg_text
Table Op Msg_type Msg_text
test.t1 optimize status OK
test.t1 optimize status OK
DROP TABLE t1;
DROP TABLE t1;
CREATE TABLE t1 (a INT, b GEOMETRY NOT NULL, SPATIAL KEY b(b));
INSERT INTO t1 VALUES (1, GEOMFROMTEXT('LINESTRING(1102218.456 1,2000000 2)'));
INSERT INTO t1 VALUES (2, GEOMFROMTEXT('LINESTRING(1102218.456 1,2000000 2)'));
SELECT COUNT(*) FROM t1 WHERE
MBRINTERSECTS(b, GEOMFROMTEXT('LINESTRING(1 1,1102219 2)') );
COUNT(*)
2
SELECT COUNT(*) FROM t1 IGNORE INDEX (b) WHERE
MBRINTERSECTS(b, GEOMFROMTEXT('LINESTRING(1 1,1102219 2)') );
COUNT(*)
2
DROP TABLE t1;
End of 5.0 tests.
mysql-test/t/ctype_collate.test
View file @
b4ad2ecc
...
@@ -218,3 +218,14 @@ insert into t1 set f1=0x3F3F1E563F;
...
@@ -218,3 +218,14 @@ insert into t1 set f1=0x3F3F1E563F;
insert
into
t1
set
f1
=
0x3F3F
;
insert
into
t1
set
f1
=
0x3F3F
;
check
table
t1
extended
;
check
table
t1
extended
;
drop
table
t1
;
drop
table
t1
;
#
# Bug#29461: Sort order of the collation wasn't used when comparing characters
# with the space character.
#
create
table
t1
(
a
varchar
(
2
)
character
set
latin7
collate
latin7_general_ci
,
key
(
a
));
insert
into
t1
set
a
=
0x4c20
;
insert
into
t1
set
a
=
0x6c
;
insert
into
t1
set
a
=
0x4c98
;
check
table
t1
extended
;
drop
table
t1
;
mysql-test/t/gis-rtree.test
View file @
b4ad2ecc
...
@@ -827,3 +827,22 @@ INSERT INTO t1 (b) SELECT b FROM t1;
...
@@ -827,3 +827,22 @@ INSERT INTO t1 (b) SELECT b FROM t1;
OPTIMIZE
TABLE
t1
;
OPTIMIZE
TABLE
t1
;
DROP
TABLE
t1
;
DROP
TABLE
t1
;
#
# Bug #29070: Error in spatial index
#
CREATE
TABLE
t1
(
a
INT
,
b
GEOMETRY
NOT
NULL
,
SPATIAL
KEY
b
(
b
));
INSERT
INTO
t1
VALUES
(
1
,
GEOMFROMTEXT
(
'LINESTRING(1102218.456 1,2000000 2)'
));
INSERT
INTO
t1
VALUES
(
2
,
GEOMFROMTEXT
(
'LINESTRING(1102218.456 1,2000000 2)'
));
# must return the same number as the next select
SELECT
COUNT
(
*
)
FROM
t1
WHERE
MBRINTERSECTS
(
b
,
GEOMFROMTEXT
(
'LINESTRING(1 1,1102219 2)'
)
);
SELECT
COUNT
(
*
)
FROM
t1
IGNORE
INDEX
(
b
)
WHERE
MBRINTERSECTS
(
b
,
GEOMFROMTEXT
(
'LINESTRING(1 1,1102219 2)'
)
);
DROP
TABLE
t1
;
--
echo
End
of
5.0
tests
.
mysys/my_conio.c
View file @
b4ad2ecc
...
@@ -187,15 +187,19 @@ char* my_cgets(char *buffer, size_t clen, size_t* plen)
...
@@ -187,15 +187,19 @@ char* my_cgets(char *buffer, size_t clen, size_t* plen)
while
(
GetLastError
()
==
ERROR_NOT_ENOUGH_MEMORY
);
while
(
GetLastError
()
==
ERROR_NOT_ENOUGH_MEMORY
);
*
plen
=
plen_res
;
*
plen
=
plen_res
;
/* We go here on error reading the string (Ctrl-C for example) */
if
(
!*
plen
)
result
=
NULL
;
/* purecov: inspected */
if
(
result
!=
NULL
)
if
(
result
!=
NULL
)
{
{
if
(
buffer
[
*
plen
-
2
]
==
'\r'
)
if
(
*
plen
>
1
&&
buffer
[
*
plen
-
2
]
==
'\r'
)
{
{
*
plen
=
*
plen
-
2
;
*
plen
=
*
plen
-
2
;
}
}
else
else
{
{
if
(
buffer
[
*
plen
-
1
]
==
'\r'
)
if
(
*
plen
>
0
&&
buffer
[
*
plen
-
1
]
==
'\r'
)
{
{
char
tmp
[
3
];
char
tmp
[
3
];
int
tmplen
=
sizeof
(
tmp
);
int
tmplen
=
sizeof
(
tmp
);
...
...
storage/myisam/mi_create.c
View file @
b4ad2ecc
...
@@ -615,8 +615,7 @@ int mi_create(const char *name,uint keys,MI_KEYDEF *keydefs,
...
@@ -615,8 +615,7 @@ int mi_create(const char *name,uint keys,MI_KEYDEF *keydefs,
(
have_iext
?
MY_REPLACE_EXT
:
MY_APPEND_EXT
));
(
have_iext
?
MY_REPLACE_EXT
:
MY_APPEND_EXT
));
linkname_ptr
=
0
;
linkname_ptr
=
0
;
/* Replace the current file */
/* Replace the current file */
if
(
!
(
flags
&
HA_CREATE_KEEP_FILES
))
create_flag
=
(
flags
&
HA_CREATE_KEEP_FILES
)
?
0
:
MY_DELETE_OLD
;
create_flag
=
MY_DELETE_OLD
;
}
}
/*
/*
...
@@ -690,8 +689,7 @@ int mi_create(const char *name,uint keys,MI_KEYDEF *keydefs,
...
@@ -690,8 +689,7 @@ int mi_create(const char *name,uint keys,MI_KEYDEF *keydefs,
fn_format
(
filename
,
name
,
""
,
MI_NAME_DEXT
,
fn_format
(
filename
,
name
,
""
,
MI_NAME_DEXT
,
MY_UNPACK_FILENAME
|
MY_APPEND_EXT
);
MY_UNPACK_FILENAME
|
MY_APPEND_EXT
);
linkname_ptr
=
0
;
linkname_ptr
=
0
;
if
(
!
(
flags
&
HA_CREATE_KEEP_FILES
))
create_flag
=
(
flags
&
HA_CREATE_KEEP_FILES
)
?
0
:
MY_DELETE_OLD
;
create_flag
=
MY_DELETE_OLD
;
}
}
if
((
dfile
=
if
((
dfile
=
my_create_with_symlink
(
linkname_ptr
,
filename
,
0
,
create_mode
,
my_create_with_symlink
(
linkname_ptr
,
filename
,
0
,
create_mode
,
...
...
storage/myisam/sp_key.c
View file @
b4ad2ecc
...
@@ -31,11 +31,6 @@ static int sp_get_geometry_mbr(uchar *(*wkb), uchar *end, uint n_dims,
...
@@ -31,11 +31,6 @@ static int sp_get_geometry_mbr(uchar *(*wkb), uchar *end, uint n_dims,
double
*
mbr
,
int
top
);
double
*
mbr
,
int
top
);
static
int
sp_mbr_from_wkb
(
uchar
(
*
wkb
),
uint
size
,
uint
n_dims
,
double
*
mbr
);
static
int
sp_mbr_from_wkb
(
uchar
(
*
wkb
),
uint
size
,
uint
n_dims
,
double
*
mbr
);
static
void
get_double
(
double
*
d
,
const
uchar
*
pos
)
{
float8get
(
*
d
,
pos
);
}
uint
sp_make_key
(
register
MI_INFO
*
info
,
uint
keynr
,
uchar
*
key
,
uint
sp_make_key
(
register
MI_INFO
*
info
,
uint
keynr
,
uchar
*
key
,
const
uchar
*
record
,
my_off_t
filepos
)
const
uchar
*
record
,
my_off_t
filepos
)
{
{
...
@@ -62,48 +57,40 @@ uint sp_make_key(register MI_INFO *info, uint keynr, uchar *key,
...
@@ -62,48 +57,40 @@ uint sp_make_key(register MI_INFO *info, uint keynr, uchar *key,
for
(
i
=
0
,
keyseg
=
keyinfo
->
seg
;
keyseg
->
type
;
keyseg
++
,
i
++
)
for
(
i
=
0
,
keyseg
=
keyinfo
->
seg
;
keyseg
->
type
;
keyseg
++
,
i
++
)
{
{
uint
length
=
keyseg
->
length
;
uint
length
=
keyseg
->
length
,
start
=
keyseg
->
start
;
double
val
;
DBUG_ASSERT
(
length
==
sizeof
(
double
));
DBUG_ASSERT
(
!
(
start
%
sizeof
(
double
)));
DBUG_ASSERT
(
start
<
sizeof
(
mbr
));
DBUG_ASSERT
(
keyseg
->
type
==
HA_KEYTYPE_DOUBLE
);
pos
=
((
uchar
*
)
mbr
)
+
keyseg
->
start
;
val
=
mbr
[
start
/
sizeof
(
double
)];
if
(
keyseg
->
flag
&
HA_SWAP_KEY
)
{
#ifdef HAVE_ISNAN
#ifdef HAVE_ISNAN
if
(
keyseg
->
type
==
HA_KEYTYPE_FLOAT
)
if
(
isnan
(
val
))
{
{
float
nr
;
bzero
(
key
,
length
);
float4get
(
nr
,
pos
);
key
+=
length
;
if
(
isnan
(
nr
))
len
+=
length
;
{
continue
;
/* Replace NAN with zero */
}
bzero
(
key
,
length
);
key
+=
length
;
continue
;
}
}
else
if
(
keyseg
->
type
==
HA_KEYTYPE_DOUBLE
)
{
double
nr
;
get_double
(
&
nr
,
pos
);
if
(
isnan
(
nr
))
{
bzero
(
key
,
length
);
key
+=
length
;
continue
;
}
}
#endif
#endif
pos
+=
length
;
while
(
length
--
)
if
(
keyseg
->
flag
&
HA_SWAP_KEY
)
{
{
char
buf
[
sizeof
(
double
)];
float8store
(
buf
,
val
);
pos
=
&
buf
[
length
];
while
(
pos
>
buf
)
*
key
++
=
*--
pos
;
*
key
++
=
*--
pos
;
}
}
}
else
else
{
{
memcpy
((
uchar
*
)
key
,
pos
,
length
);
float8store
((
byte
*
)
key
,
val
);
key
+=
keyseg
->
length
;
key
+=
length
;
}
}
len
+=
keyseg
->
length
;
len
+=
length
;
}
}
_mi_dpointer
(
info
,
key
,
filepos
);
_mi_dpointer
(
info
,
key
,
filepos
);
return
len
;
return
len
;
...
@@ -141,13 +128,13 @@ static int sp_add_point_to_mbr(uchar *(*wkb), uchar *end, uint n_dims,
...
@@ -141,13 +128,13 @@ static int sp_add_point_to_mbr(uchar *(*wkb), uchar *end, uint n_dims,
{
{
if
((
*
wkb
)
>
end
-
8
)
if
((
*
wkb
)
>
end
-
8
)
return
-
1
;
return
-
1
;
get_double
(
&
ord
,
(
const
uchar
*
)
*
wkb
);
float8get
(
ord
,
(
const
byte
*
)
*
wkb
);
(
*
wkb
)
+=
8
;
(
*
wkb
)
+=
8
;
if
(
ord
<
*
mbr
)
if
(
ord
<
*
mbr
)
float8store
((
char
*
)
mbr
,
ord
)
;
*
mbr
=
ord
;
mbr
++
;
mbr
++
;
if
(
ord
>
*
mbr
)
if
(
ord
>
*
mbr
)
float8store
((
char
*
)
mbr
,
ord
)
;
*
mbr
=
ord
;
mbr
++
;
mbr
++
;
}
}
return
0
;
return
0
;
...
...
strings/ctype-simple.c
View file @
b4ad2ecc
...
@@ -185,7 +185,7 @@ int my_strnncollsp_simple(CHARSET_INFO * cs, const uchar *a, size_t a_length,
...
@@ -185,7 +185,7 @@ int my_strnncollsp_simple(CHARSET_INFO * cs, const uchar *a, size_t a_length,
}
}
for
(
end
=
a
+
a_length
-
length
;
a
<
end
;
a
++
)
for
(
end
=
a
+
a_length
-
length
;
a
<
end
;
a
++
)
{
{
if
(
*
a
!=
' '
)
if
(
map
[
*
a
]
!=
' '
)
return
(
map
[
*
a
]
<
' '
)
?
-
swap
:
swap
;
return
(
map
[
*
a
]
<
' '
)
?
-
swap
:
swap
;
}
}
}
}
...
...
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