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
5ef40235
Commit
5ef40235
authored
Apr 12, 2007
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge bk-internal.mysql.com:/home/bk/mysql-maria
into mysql.com:/home/my/mysql-maria
parents
6ad2316f
a10648a6
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
43 additions
and
15 deletions
+43
-15
mysql-test/t/disabled.def
mysql-test/t/disabled.def
+0
-1
storage/maria/ma_bitmap.c
storage/maria/ma_bitmap.c
+14
-0
storage/maria/ma_blockrec.c
storage/maria/ma_blockrec.c
+1
-1
storage/maria/ma_blockrec.h
storage/maria/ma_blockrec.h
+1
-0
storage/maria/ma_create.c
storage/maria/ma_create.c
+22
-13
storage/maria/ma_delete_all.c
storage/maria/ma_delete_all.c
+4
-0
storage/maria/maria_def.h
storage/maria/maria_def.h
+1
-0
No files found.
mysql-test/t/disabled.def
View file @
5ef40235
...
@@ -39,4 +39,3 @@ mysql_upgrade : Bug#25074 mysql_upgrade gives inconsisten results
...
@@ -39,4 +39,3 @@ mysql_upgrade : Bug#25074 mysql_upgrade gives inconsisten results
plugin : Bug#25659 memory leak via "plugins" test
plugin : Bug#25659 memory leak via "plugins" test
rpl_ndb_dd_advance : Bug#25913 rpl_ndb_dd_advance fails randomly
rpl_ndb_dd_advance : Bug#25913 rpl_ndb_dd_advance fails randomly
ndb_alter_table : Bug##25774 ndb_alter_table.test fails in DBUG_ASSERT() on Linux x64
ndb_alter_table : Bug##25774 ndb_alter_table.test fails in DBUG_ASSERT() on Linux x64
ps_maria : Until maria is fully functional
storage/maria/ma_bitmap.c
View file @
5ef40235
...
@@ -191,6 +191,7 @@ my_bool _ma_bitmap_end(MARIA_SHARE *share)
...
@@ -191,6 +191,7 @@ my_bool _ma_bitmap_end(MARIA_SHARE *share)
_ma_flush_bitmap
(
share
);
_ma_flush_bitmap
(
share
);
pthread_mutex_destroy
(
&
share
->
bitmap
.
bitmap_lock
);
pthread_mutex_destroy
(
&
share
->
bitmap
.
bitmap_lock
);
my_free
((
byte
*
)
share
->
bitmap
.
map
,
MYF
(
MY_ALLOW_ZERO_PTR
));
my_free
((
byte
*
)
share
->
bitmap
.
map
,
MYF
(
MY_ALLOW_ZERO_PTR
));
share
->
bitmap
.
map
=
0
;
return
res
;
return
res
;
}
}
...
@@ -216,6 +217,19 @@ my_bool _ma_flush_bitmap(MARIA_SHARE *share)
...
@@ -216,6 +217,19 @@ my_bool _ma_flush_bitmap(MARIA_SHARE *share)
}
}
void
_ma_bitmap_delete_all
(
MARIA_SHARE
*
share
)
{
MARIA_FILE_BITMAP
*
bitmap
=
&
share
->
bitmap
;
if
(
bitmap
->
map
)
/* Not in create */
{
bzero
(
bitmap
->
map
,
share
->
block_size
);
bitmap
->
changed
=
0
;
bitmap
->
page
=
0
;
bitmap
->
used_size
=
bitmap
->
total_size
;
}
}
/*
/*
Return bitmap pattern for the smallest head block that can hold 'size'
Return bitmap pattern for the smallest head block that can hold 'size'
...
...
storage/maria/ma_blockrec.c
View file @
5ef40235
...
@@ -585,7 +585,7 @@ static void calc_record_size(MARIA_HA *info, const byte *record,
...
@@ -585,7 +585,7 @@ static void calc_record_size(MARIA_HA *info, const byte *record,
*
null_field_lengths
=
rec
->
length
;
*
null_field_lengths
=
rec
->
length
;
break
;
break
;
case
FIELD_SKIP_ZERO
:
/* Fixed length field */
case
FIELD_SKIP_ZERO
:
/* Fixed length field */
if
(
memcmp
(
record
+
rec
->
null_pos
,
maria_zero_string
,
if
(
memcmp
(
record
+
rec
->
offset
,
maria_zero_string
,
rec
->
length
)
==
0
)
rec
->
length
)
==
0
)
{
{
row
->
empty_bits
[
rec
->
empty_pos
]
|=
rec
->
empty_bit
;
row
->
empty_bits
[
rec
->
empty_pos
]
|=
rec
->
empty_bit
;
...
...
storage/maria/ma_blockrec.h
View file @
5ef40235
...
@@ -158,3 +158,4 @@ my_bool _ma_check_if_right_bitmap_type(MARIA_HA *info,
...
@@ -158,3 +158,4 @@ my_bool _ma_check_if_right_bitmap_type(MARIA_HA *info,
enum
en_page_type
page_type
,
enum
en_page_type
page_type
,
ulonglong
page
,
ulonglong
page
,
uint
*
bitmap_pattern
);
uint
*
bitmap_pattern
);
void
_ma_bitmap_delete_all
(
MARIA_SHARE
*
share
);
storage/maria/ma_create.c
View file @
5ef40235
...
@@ -773,17 +773,8 @@ int maria_create(const char *name, enum data_file_type record_type,
...
@@ -773,17 +773,8 @@ int maria_create(const char *name, enum data_file_type record_type,
goto
err
;
goto
err
;
errpos
=
3
;
errpos
=
3
;
if
(
record_type
==
BLOCK_RECORD
)
if
(
_ma_initialize_data_file
(
dfile
,
&
share
))
{
/* Write one bitmap page */
char
buff
[
IO_SIZE
];
uint
i
;
bzero
(
buff
,
sizeof
(
buff
));
for
(
i
=
0
;
i
<
maria_block_size
;
i
+=
IO_SIZE
)
if
(
my_write
(
dfile
,
(
byte
*
)
buff
,
sizeof
(
buff
),
MYF
(
MY_NABP
)))
goto
err
;
goto
err
;
share
.
state
.
state
.
data_file_length
=
maria_block_size
;
}
}
}
DBUG_PRINT
(
"info"
,
(
"write state info and base info"
));
DBUG_PRINT
(
"info"
,
(
"write state info and base info"
));
if
(
_ma_state_info_write
(
file
,
&
share
.
state
,
2
)
||
if
(
_ma_state_info_write
(
file
,
&
share
.
state
,
2
)
||
...
@@ -1030,7 +1021,7 @@ static inline int sign(longlong a)
...
@@ -1030,7 +1021,7 @@ static inline int sign(longlong a)
}
}
int
compare_columns
(
MARIA_COLUMNDEF
**
a_ptr
,
MARIA_COLUMNDEF
**
b_ptr
)
static
int
compare_columns
(
MARIA_COLUMNDEF
**
a_ptr
,
MARIA_COLUMNDEF
**
b_ptr
)
{
{
MARIA_COLUMNDEF
*
a
=
*
a_ptr
,
*
b
=
*
b_ptr
;
MARIA_COLUMNDEF
*
a
=
*
a_ptr
,
*
b
=
*
b_ptr
;
enum
en_fieldtype
a_type
,
b_type
;
enum
en_fieldtype
a_type
,
b_type
;
...
@@ -1062,5 +1053,23 @@ int compare_columns(MARIA_COLUMNDEF **a_ptr, MARIA_COLUMNDEF **b_ptr)
...
@@ -1062,5 +1053,23 @@ int compare_columns(MARIA_COLUMNDEF **a_ptr, MARIA_COLUMNDEF **b_ptr)
}
}
/* Initialize data file */
int
_ma_initialize_data_file
(
File
dfile
,
MARIA_SHARE
*
share
)
{
if
(
share
->
data_file_type
==
BLOCK_RECORD
)
{
/* Write one bitmap page */
byte
buff
[
IO_SIZE
];
uint
i
;
bzero
((
char
*
)
buff
,
sizeof
(
buff
));
if
(
my_seek
(
dfile
,
0
,
SEEK_SET
,
0
))
return
1
;
for
(
i
=
0
;
i
<
maria_block_size
;
i
+=
IO_SIZE
)
if
(
my_write
(
dfile
,
buff
,
sizeof
(
buff
),
MYF
(
MY_NABP
)))
return
1
;
share
->
state
.
state
.
data_file_length
=
maria_block_size
;
_ma_bitmap_delete_all
(
share
);
}
return
0
;
}
storage/maria/ma_delete_all.c
View file @
5ef40235
...
@@ -65,6 +65,10 @@ int maria_delete_all_rows(MARIA_HA *info)
...
@@ -65,6 +65,10 @@ int maria_delete_all_rows(MARIA_HA *info)
if
(
my_chsize
(
info
->
dfile
,
0
,
0
,
MYF
(
MY_WME
))
||
if
(
my_chsize
(
info
->
dfile
,
0
,
0
,
MYF
(
MY_WME
))
||
my_chsize
(
share
->
kfile
,
share
->
base
.
keystart
,
0
,
MYF
(
MY_WME
))
)
my_chsize
(
share
->
kfile
,
share
->
base
.
keystart
,
0
,
MYF
(
MY_WME
))
)
goto
err
;
goto
err
;
if
(
_ma_initialize_data_file
(
info
->
dfile
,
info
->
s
))
goto
err
;
/*
/*
RECOVERY TODO Consider updating ZeroDirtyPagesLSN here. It is
RECOVERY TODO Consider updating ZeroDirtyPagesLSN here. It is
not a necessity (it is one only in RENAME commands) but an optional
not a necessity (it is one only in RENAME commands) but an optional
...
...
storage/maria/maria_def.h
View file @
5ef40235
...
@@ -852,3 +852,4 @@ int _ma_sort_write_record(MARIA_SORT_PARAM *sort_param);
...
@@ -852,3 +852,4 @@ int _ma_sort_write_record(MARIA_SORT_PARAM *sort_param);
int
_ma_create_index_by_sort
(
MARIA_SORT_PARAM
*
info
,
my_bool
no_messages
,
int
_ma_create_index_by_sort
(
MARIA_SORT_PARAM
*
info
,
my_bool
no_messages
,
ulong
);
ulong
);
int
_ma_sync_table_files
(
const
MARIA_HA
*
info
);
int
_ma_sync_table_files
(
const
MARIA_HA
*
info
);
int
_ma_initialize_data_file
(
File
dfile
,
MARIA_SHARE
*
share
);
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