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
cf5e0d33
Commit
cf5e0d33
authored
Apr 18, 2002
by
bar@gw.udmsearch.izhnet.ru
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix to use Monty's changes in frm format
Enable latin1 by default
parent
79fb335f
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
28 additions
and
10 deletions
+28
-10
configure.in
configure.in
+3
-0
sql/ha_myisam.cc
sql/ha_myisam.cc
+6
-2
sql/sql_show.cc
sql/sql_show.cc
+1
-1
sql/sql_table.cc
sql/sql_table.cc
+7
-4
sql/structs.h
sql/structs.h
+0
-1
sql/table.cc
sql/table.cc
+11
-2
No files found.
configure.in
View file @
cf5e0d33
...
...
@@ -2086,6 +2086,9 @@ do
esac
done
dnl Always compile latin1
AC_DEFINE
(
HAVE_CHARSET_latin1
)
if
test
"
$use_mb
"
=
"yes"
then
AC_DEFINE
(
USE_MB
)
...
...
sql/ha_myisam.cc
View file @
cf5e0d33
...
...
@@ -126,6 +126,10 @@ const char *ha_myisam::index_type(uint key_number)
{
return
((
table
->
key_info
[
key_number
].
flags
&
HA_FULLTEXT
)
?
"FULLTEXT"
:
(
table
->
key_info
[
key_number
].
flags
&
HA_SPATIAL
)
?
"SPATIAL"
:
(
table
->
key_info
[
key_number
].
algorithm
==
HA_KEY_ALG_RTREE
)
?
"RTREE"
:
"BTREE"
);
}
...
...
@@ -1006,7 +1010,7 @@ int ha_myisam::create(const char *name, register TABLE *table,
for
(
i
=
0
;
i
<
table
->
keys
;
i
++
,
pos
++
)
{
keydef
[
i
].
flag
=
(
pos
->
flags
&
(
HA_NOSAME
|
HA_FULLTEXT
|
HA_SPATIAL
));
keydef
[
i
].
key_alg
=
pos
->
key_alg
;
// +BAR
keydef
[
i
].
key_alg
=
pos
->
algorithm
;
keydef
[
i
].
seg
=
keyseg
;
keydef
[
i
].
keysegs
=
pos
->
key_parts
;
for
(
j
=
0
;
j
<
pos
->
key_parts
;
j
++
)
...
...
sql/sql_show.cc
View file @
cf5e0d33
...
...
@@ -890,7 +890,7 @@ store_create_info(THD *thd, TABLE *table, String *packet)
append_identifier
(
thd
,
packet
,
key_info
->
name
);
// +BAR: send USING only in non-default case: non-spatial rtree
if
((
key_info
->
key_alg
==
HA_KEY_ALG_RTREE
)
&&
!
(
key_info
->
flags
&
HA_SPATIAL
))
if
((
key_info
->
algorithm
==
HA_KEY_ALG_RTREE
)
&&
!
(
key_info
->
flags
&
HA_SPATIAL
))
packet
->
append
(
" USING RTREE"
,
12
);
packet
->
append
(
" ("
,
2
);
...
...
sql/sql_table.cc
View file @
cf5e0d33
...
...
@@ -454,7 +454,7 @@ int mysql_create_table(THD *thd,const char *db, const char *table_name,
key_info
->
flags
=
HA_NOSAME
;
}
key_info
->
key_alg
=
key
->
algorithm
;
key_info
->
algorithm
=
key
->
algorithm
;
key_info
->
key_parts
=
(
uint8
)
key
->
columns
.
elements
;
key_info
->
key_part
=
key_part_info
;
key_info
->
usable_key_parts
=
key_number
;
...
...
@@ -477,6 +477,9 @@ int mysql_create_table(THD *thd,const char *db, const char *table_name,
checking for proper key parts number:
*/
printf
(
"key_info->flags=%d key_info->algorithm=%d
\n
"
,
key_info
->
flags
,
key_info
->
algorithm
);
if
(
key_info
->
flags
==
HA_SPATIAL
){
if
(
key_info
->
key_parts
!=
1
){
my_printf_error
(
ER_WRONG_ARGUMENTS
,
...
...
@@ -485,7 +488,7 @@ int mysql_create_table(THD *thd,const char *db, const char *table_name,
}
}
else
{
if
(
key_info
->
key_alg
==
HA_KEY_ALG_RTREE
){
if
(
key_info
->
algorithm
==
HA_KEY_ALG_RTREE
){
if
((
key_info
->
key_parts
&
1
)
==
1
){
my_printf_error
(
ER_WRONG_ARGUMENTS
,
ER
(
ER_WRONG_ARGUMENTS
),
MYF
(
0
),
"RTREE INDEX"
);
...
...
@@ -1584,7 +1587,7 @@ int mysql_alter_table(THD *thd,char *new_db, char *new_name,
Key
::
PRIMARY
:
Key
::
UNIQUE
)
:
(
key_info
->
flags
&
HA_FULLTEXT
?
Key
::
FULLTEXT
:
Key
::
MULTIPLE
)),
key_info
->
key_alg
,
key_info
->
algorithm
,
key_name
,
key_parts
));
}
key_it
.
rewind
();
...
...
sql/structs.h
View file @
cf5e0d33
...
...
@@ -64,7 +64,6 @@ typedef struct st_key_part_info { /* Info about a key part */
typedef
struct
st_key
{
uint
key_length
;
/* Tot length of key */
uint
flags
;
/* dupp key and pack flags */
enum
ha_key_alg
key_alg
;
/* +BAR Algorithm BTREE or RTREE */
uint
key_parts
;
/* How many key_parts */
uint
extra_length
;
uint
usable_key_parts
;
/* Should normally be = key_parts */
...
...
sql/table.cc
View file @
cf5e0d33
...
...
@@ -201,6 +201,13 @@ int openfrm(const char *name, const char *alias, uint db_stat, uint prgflag,
for
(
i
=
0
;
i
<
keys
;
i
++
,
keyinfo
++
)
keyinfo
->
algorithm
=
(
enum
ha_key_alg
)
*
(
strpos
++
);
}
else
{
/* Set key types to BTREE, BAR TODO: how to be with HASH/RBTREE? */
keyinfo
=
outparam
->
key_info
;
for
(
i
=
0
;
i
<
keys
;
i
++
,
keyinfo
++
)
keyinfo
->
algorithm
=
HA_KEY_ALG_BTREE
;
}
outparam
->
reclength
=
uint2korr
((
head
+
16
));
if
(
*
(
head
+
26
)
==
1
)
outparam
->
system
=
1
;
/* one-record-database */
...
...
@@ -408,10 +415,12 @@ int openfrm(const char *name, const char *alias, uint db_stat, uint prgflag,
}
}
keyinfo
->
key_alg
=
HA_KEY_ALG_BTREE
;
// BAR : btree by default
if
(
keyinfo
->
name
[
0
]
==
'S'
)
keyinfo
->
flags
|=
HA_SPATIAL
;
#define BAR_DIRTY_HACK
#ifdef BAR_DIRTY_HACK
keyinfo
->
key_alg
=
HA_KEY_ALG_BTREE
;
// BAR : btree by default
// BAR FIXME: Dirty hack while waiting for new .frm format
switch
(
keyinfo
->
name
[
0
]){
case
'R'
:
...
...
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