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
73d3dd79
Commit
73d3dd79
authored
Feb 20, 2006
by
osku
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove the concept of "field order", as we will not support descending order
indexes.
parent
bbdb0f41
Changes
12
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
25 additions
and
63 deletions
+25
-63
dict/dict0boot.c
dict/dict0boot.c
+8
-8
dict/dict0dict.c
dict/dict0dict.c
+8
-10
dict/dict0load.c
dict/dict0load.c
+1
-1
dict/dict0mem.c
dict/dict0mem.c
+0
-4
handler/ha_innodb.cc
handler/ha_innodb.cc
+1
-5
ibuf/ibuf0ibuf.c
ibuf/ibuf0ibuf.c
+3
-3
include/dict0dict.h
include/dict0dict.h
+0
-8
include/dict0dict.ic
include/dict0dict.ic
+0
-13
include/dict0mem.h
include/dict0mem.h
+0
-7
mtr/mtr0log.c
mtr/mtr0log.c
+1
-1
pars/pars0pars.c
pars/pars0pars.c
+1
-1
srv/srv0srv.c
srv/srv0srv.c
+2
-2
No files found.
dict/dict0boot.c
View file @
73d3dd79
...
...
@@ -265,7 +265,7 @@ dict_boot(void)
index
=
dict_mem_index_create
(
"SYS_TABLES"
,
"CLUST_IND"
,
DICT_HDR_SPACE
,
DICT_UNIQUE
|
DICT_CLUSTERED
,
1
);
dict_mem_index_add_field
(
index
,
"NAME"
,
0
,
0
);
dict_mem_index_add_field
(
index
,
"NAME"
,
0
);
index
->
id
=
DICT_TABLES_ID
;
...
...
@@ -275,7 +275,7 @@ dict_boot(void)
/*-------------------------*/
index
=
dict_mem_index_create
(
"SYS_TABLES"
,
"ID_IND"
,
DICT_HDR_SPACE
,
DICT_UNIQUE
,
1
);
dict_mem_index_add_field
(
index
,
"ID"
,
0
,
0
);
dict_mem_index_add_field
(
index
,
"ID"
,
0
);
index
->
id
=
DICT_TABLE_IDS_ID
;
success
=
dict_index_add_to_cache
(
table
,
index
,
mtr_read_ulint
(
...
...
@@ -300,8 +300,8 @@ dict_boot(void)
index
=
dict_mem_index_create
(
"SYS_COLUMNS"
,
"CLUST_IND"
,
DICT_HDR_SPACE
,
DICT_UNIQUE
|
DICT_CLUSTERED
,
2
);
dict_mem_index_add_field
(
index
,
"TABLE_ID"
,
0
,
0
);
dict_mem_index_add_field
(
index
,
"POS"
,
0
,
0
);
dict_mem_index_add_field
(
index
,
"TABLE_ID"
,
0
);
dict_mem_index_add_field
(
index
,
"POS"
,
0
);
index
->
id
=
DICT_COLUMNS_ID
;
success
=
dict_index_add_to_cache
(
table
,
index
,
mtr_read_ulint
(
...
...
@@ -336,8 +336,8 @@ dict_boot(void)
index
=
dict_mem_index_create
(
"SYS_INDEXES"
,
"CLUST_IND"
,
DICT_HDR_SPACE
,
DICT_UNIQUE
|
DICT_CLUSTERED
,
2
);
dict_mem_index_add_field
(
index
,
"TABLE_ID"
,
0
,
0
);
dict_mem_index_add_field
(
index
,
"ID"
,
0
,
0
);
dict_mem_index_add_field
(
index
,
"TABLE_ID"
,
0
);
dict_mem_index_add_field
(
index
,
"ID"
,
0
);
index
->
id
=
DICT_INDEXES_ID
;
success
=
dict_index_add_to_cache
(
table
,
index
,
mtr_read_ulint
(
...
...
@@ -357,8 +357,8 @@ dict_boot(void)
index
=
dict_mem_index_create
(
"SYS_FIELDS"
,
"CLUST_IND"
,
DICT_HDR_SPACE
,
DICT_UNIQUE
|
DICT_CLUSTERED
,
2
);
dict_mem_index_add_field
(
index
,
"INDEX_ID"
,
0
,
0
);
dict_mem_index_add_field
(
index
,
"POS"
,
0
,
0
);
dict_mem_index_add_field
(
index
,
"INDEX_ID"
,
0
);
dict_mem_index_add_field
(
index
,
"POS"
,
0
);
index
->
id
=
DICT_FIELDS_ID
;
success
=
dict_index_add_to_cache
(
table
,
index
,
mtr_read_ulint
(
...
...
dict/dict0dict.c
View file @
73d3dd79
...
...
@@ -1605,12 +1605,11 @@ dict_index_add_col(
/*===============*/
dict_index_t
*
index
,
/* in: index */
dict_col_t
*
col
,
/* in: column */
ulint
order
,
/* in: order criterion */
ulint
prefix_len
)
/* in: column prefix length */
{
dict_field_t
*
field
;
dict_mem_index_add_field
(
index
,
col
->
name
,
order
,
prefix_len
);
dict_mem_index_add_field
(
index
,
col
->
name
,
prefix_len
);
field
=
dict_index_get_nth_field
(
index
,
index
->
n_def
-
1
);
...
...
@@ -1653,8 +1652,7 @@ dict_index_copy(
for
(
i
=
start
;
i
<
end
;
i
++
)
{
field
=
dict_index_get_nth_field
(
index2
,
i
);
dict_index_add_col
(
index1
,
field
->
col
,
field
->
order
,
field
->
prefix_len
);
dict_index_add_col
(
index1
,
field
->
col
,
field
->
prefix_len
);
}
}
...
...
@@ -1758,7 +1756,7 @@ dict_index_build_internal_clust(
/* Add the mix id column */
dict_index_add_col
(
new_index
,
dict_table_get_sys_col
(
table
,
DATA_MIX_ID
),
0
,
0
);
dict_table_get_sys_col
(
table
,
DATA_MIX_ID
),
0
);
/* Copy the rest of fields */
dict_index_copy
(
new_index
,
index
,
table
->
mix_len
,
...
...
@@ -1802,15 +1800,15 @@ dict_index_build_internal_clust(
if
(
!
(
index
->
type
&
DICT_UNIQUE
))
{
dict_index_add_col
(
new_index
,
dict_table_get_sys_col
(
table
,
DATA_ROW_ID
),
0
,
0
);
dict_table_get_sys_col
(
table
,
DATA_ROW_ID
),
0
);
trx_id_pos
++
;
}
dict_index_add_col
(
new_index
,
dict_table_get_sys_col
(
table
,
DATA_TRX_ID
),
0
,
0
);
dict_table_get_sys_col
(
table
,
DATA_TRX_ID
),
0
);
dict_index_add_col
(
new_index
,
dict_table_get_sys_col
(
table
,
DATA_ROLL_PTR
),
0
,
0
);
dict_table_get_sys_col
(
table
,
DATA_ROLL_PTR
),
0
);
for
(
i
=
0
;
i
<
trx_id_pos
;
i
++
)
{
...
...
@@ -1864,7 +1862,7 @@ dict_index_build_internal_clust(
ut_ad
(
col
->
type
.
mtype
!=
DATA_SYS
);
if
(
col
->
aux
==
ULINT_UNDEFINED
)
{
dict_index_add_col
(
new_index
,
col
,
0
,
0
);
dict_index_add_col
(
new_index
,
col
,
0
);
}
}
...
...
@@ -1968,7 +1966,7 @@ dict_index_build_internal_non_clust(
field
=
dict_index_get_nth_field
(
clust_index
,
i
);
if
(
field
->
col
->
aux
==
ULINT_UNDEFINED
)
{
dict_index_add_col
(
new_index
,
field
->
col
,
0
,
dict_index_add_col
(
new_index
,
field
->
col
,
field
->
prefix_len
);
}
}
...
...
dict/dict0load.c
View file @
73d3dd79
...
...
@@ -533,7 +533,7 @@ dict_load_fields(
field
=
rec_get_nth_field_old
(
rec
,
4
,
&
len
);
dict_mem_index_add_field
(
index
,
mem_heap_strdupl
(
heap
,
(
char
*
)
field
,
len
),
0
,
prefix_len
);
mem_heap_strdupl
(
heap
,
(
char
*
)
field
,
len
),
prefix_len
);
btr_pcur_move_to_next_user_rec
(
&
pcur
,
&
mtr
);
}
...
...
dict/dict0mem.c
View file @
73d3dd79
...
...
@@ -261,8 +261,6 @@ dict_mem_index_add_field(
/*=====================*/
dict_index_t
*
index
,
/* in: index */
const
char
*
name
,
/* in: column name */
ulint
order
,
/* in: order criterion; 0 means an
ascending order */
ulint
prefix_len
)
/* in: 0 or the column prefix length
in a MySQL index like
INDEX (textcol(25)) */
...
...
@@ -277,8 +275,6 @@ dict_mem_index_add_field(
field
=
dict_index_get_nth_field
(
index
,
index
->
n_def
-
1
);
field
->
name
=
name
;
field
->
order
=
order
;
field
->
prefix_len
=
prefix_len
;
}
...
...
handler/ha_innodb.cc
View file @
73d3dd79
...
...
@@ -4781,12 +4781,8 @@ create_index(
field_lengths
[
i
]
=
key_part
->
length
;
/* We assume all fields should be sorted in ascending
order, hence the '0': */
dict_mem_index_add_field
(
index
,
(
char
*
)
key_part
->
field
->
field_name
,
0
,
prefix_len
);
(
char
*
)
key_part
->
field
->
field_name
,
prefix_len
);
}
/* Even though we've defined max_supported_key_part_length, we
...
...
ibuf/ibuf0ibuf.c
View file @
73d3dd79
...
...
@@ -545,8 +545,8 @@ ibuf_data_init_for_space(
index
=
dict_mem_index_create
(
buf
,
"CLUST_IND"
,
space
,
DICT_CLUSTERED
|
DICT_UNIVERSAL
|
DICT_IBUF
,
2
);
dict_mem_index_add_field
(
index
,
"PAGE_NO"
,
0
,
0
);
dict_mem_index_add_field
(
index
,
"TYPES"
,
0
,
0
);
dict_mem_index_add_field
(
index
,
"PAGE_NO"
,
0
);
dict_mem_index_add_field
(
index
,
"TYPES"
,
0
);
index
->
id
=
ut_dulint_add
(
DICT_IBUF_ID_MIN
,
space
);
...
...
@@ -1152,7 +1152,7 @@ ibuf_dummy_index_add_col(
dtype_get_len
(
type
),
dtype_get_prec
(
type
));
dict_index_add_col
(
index
,
dict_table_get_nth_col
(
index
->
table
,
i
),
0
,
len
);
dict_table_get_nth_col
(
index
->
table
,
i
),
len
);
}
/************************************************************************
Deallocates a dummy index for inserting a record to a non-clustered index.
...
...
include/dict0dict.h
View file @
73d3dd79
...
...
@@ -660,7 +660,6 @@ dict_index_add_col(
/*===============*/
dict_index_t
*
index
,
/* in: index */
dict_col_t
*
col
,
/* in: column */
ulint
order
,
/* in: order criterion */
ulint
prefix_len
);
/* in: column prefix length */
/***********************************************************************
Copies types of fields contained in index to tuple. */
...
...
@@ -680,13 +679,6 @@ dict_index_get_tree(
/* out: index tree */
dict_index_t
*
index
);
/* in: index */
/*************************************************************************
Gets the field order criterion. */
UNIV_INLINE
ulint
dict_field_get_order
(
/*=================*/
dict_field_t
*
field
);
/*************************************************************************
Gets the field column. */
UNIV_INLINE
dict_col_t
*
...
...
include/dict0dict.ic
View file @
73d3dd79
...
...
@@ -326,19 +326,6 @@ dict_index_get_tree(
return(index->tree);
}
/*************************************************************************
Gets the field order criterion. */
UNIV_INLINE
ulint
dict_field_get_order(
/*=================*/
dict_field_t* field)
{
ut_ad(field);
return(field->order);
}
/*************************************************************************
Gets the field column. */
UNIV_INLINE
...
...
include/dict0mem.h
View file @
73d3dd79
...
...
@@ -33,9 +33,6 @@ combination of types */
other index */
#define DICT_IBUF 8
/* insert buffer tree */
/* Flags for ordering an index field: OR'ing of the flags allowed */
#define DICT_DESCEND 1
/* in descending order (default ascending) */
/* Types for a table object */
#define DICT_TABLE_ORDINARY 1
#define DICT_TABLE_CLUSTER_MEMBER 2
...
...
@@ -116,8 +113,6 @@ dict_mem_index_add_field(
/*=====================*/
dict_index_t
*
index
,
/* in: index */
const
char
*
name
,
/* in: column name */
ulint
order
,
/* in: order criterion; 0 means an
ascending order */
ulint
prefix_len
);
/* in: 0 or the column prefix length
in a MySQL index like
INDEX (textcol(25)) */
...
...
@@ -163,8 +158,6 @@ UTF-8 charset. In that charset, a character may take at most 3 bytes. */
struct
dict_field_struct
{
dict_col_t
*
col
;
/* pointer to the table column */
const
char
*
name
;
/* name of the column */
ulint
order
;
/* flags for ordering this field:
DICT_DESCEND, ... */
ulint
prefix_len
;
/* 0 or the length of the column
prefix in bytes in a MySQL index of
type, e.g., INDEX (textcol(25));
...
...
mtr/mtr0log.c
View file @
73d3dd79
...
...
@@ -541,7 +541,7 @@ mlog_parse_index(
len
&
0x8000
?
DATA_NOT_NULL
:
0
,
len
&
0x7fff
,
0
);
dict_index_add_col
(
ind
,
dict_table_get_nth_col
(
table
,
i
),
0
,
0
);
dict_table_get_nth_col
(
table
,
i
),
0
);
}
ptr
+=
2
;
}
...
...
pars/pars0pars.c
View file @
73d3dd79
...
...
@@ -1643,7 +1643,7 @@ pars_create_index(
column
=
column_list
;
while
(
column
)
{
dict_mem_index_add_field
(
index
,
column
->
name
,
0
,
0
);
dict_mem_index_add_field
(
index
,
column
->
name
,
0
);
column
->
resolved
=
TRUE
;
column
->
token_type
=
SYM_COLUMN
;
...
...
srv/srv0srv.c
View file @
73d3dd79
...
...
@@ -922,7 +922,7 @@ srv_init(void)
srv_sys
->
dummy_ind1
=
dict_mem_index_create
(
"SYS_DUMMY1"
,
"SYS_DUMMY1"
,
DICT_HDR_SPACE
,
0
,
1
);
dict_index_add_col
(
srv_sys
->
dummy_ind1
,
dict_table_get_nth_col
(
table
,
0
),
0
,
0
);
dict_table_get_nth_col
(
table
,
0
),
0
);
srv_sys
->
dummy_ind1
->
table
=
table
;
/* create dummy table and index for new-style infimum and supremum */
table
=
dict_mem_table_create
(
"SYS_DUMMY2"
,
...
...
@@ -932,7 +932,7 @@ srv_init(void)
srv_sys
->
dummy_ind2
=
dict_mem_index_create
(
"SYS_DUMMY2"
,
"SYS_DUMMY2"
,
DICT_HDR_SPACE
,
0
,
1
);
dict_index_add_col
(
srv_sys
->
dummy_ind2
,
dict_table_get_nth_col
(
table
,
0
),
0
,
0
);
dict_table_get_nth_col
(
table
,
0
),
0
);
srv_sys
->
dummy_ind2
->
table
=
table
;
/* avoid ut_ad(index->cached) in dict_index_get_n_unique_in_tree */
...
...
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