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
0d67738e
Commit
0d67738e
authored
Dec 13, 2001
by
sasha@mysql.sashanet.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
misc cleanup
parent
9db9b463
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
23 additions
and
31 deletions
+23
-31
Docs/manual.texi
Docs/manual.texi
+2
-0
include/my_bitmap.h
include/my_bitmap.h
+3
-2
mysql-test/r/rpl_get_lock.result
mysql-test/r/rpl_get_lock.result
+3
-1
mysql-test/t/rpl_get_lock.test
mysql-test/t/rpl_get_lock.test
+1
-0
mysys/my_bitmap.c
mysys/my_bitmap.c
+4
-3
sql/slave.cc
sql/slave.cc
+10
-25
No files found.
Docs/manual.texi
View file @
0d67738e
...
@@ -46872,6 +46872,8 @@ Added @code{slave-skip-errors} option
...
@@ -46872,6 +46872,8 @@ Added @code{slave-skip-errors} option
Added statistics variables for all MySQL commands. (@code{SHOW STATUS} is
Added statistics variables for all MySQL commands. (@code{SHOW STATUS} is
now much longer).
now much longer).
@item
@item
Fixed default values for InnoDB tables.
@item
Fixed that @code{GROUP BY expr DESC} works.
Fixed that @code{GROUP BY expr DESC} works.
@item
@item
Fixed bug when using @code{t1 LEFT JOIN t2 ON t2.key=constant}.
Fixed bug when using @code{t1 LEFT JOIN t2 ON t2.key=constant}.
include/my_bitmap.h
View file @
0d67738e
...
@@ -27,10 +27,11 @@ typedef struct st_bitmap
...
@@ -27,10 +27,11 @@ typedef struct st_bitmap
uchar
*
bitmap
;
uchar
*
bitmap
;
uint
bitmap_size
;
uint
bitmap_size
;
my_bool
thread_safe
;
/* set if several threads access the bitmap */
my_bool
thread_safe
;
/* set if several threads access the bitmap */
/* mutex will be acquired for the duration of each bitmap operation if
/*
mutex will be acquired for the duration of each bitmap operation if
thread_safe flag is set. Otherwise, we optimize by not acquiring the
thread_safe flag is set. Otherwise, we optimize by not acquiring the
mutex
mutex
*/
*/
#ifdef THREAD
#ifdef THREAD
pthread_mutex_t
mutex
;
pthread_mutex_t
mutex
;
#endif
#endif
...
...
mysql-test/r/rpl_get_lock.result
View file @
0d67738e
get_lock("lock",2)
1
release_lock("lock")
release_lock("lock")
0
1
get_lock("lock",3)
get_lock("lock",3)
1
1
n
n
...
...
mysql-test/t/rpl_get_lock.test
View file @
0d67738e
...
@@ -4,6 +4,7 @@ create table t1(n int);
...
@@ -4,6 +4,7 @@ create table t1(n int);
insert
into
t1
values
(
get_lock
(
"lock"
,
2
));
insert
into
t1
values
(
get_lock
(
"lock"
,
2
));
dirty_close
master
;
dirty_close
master
;
connection
master1
;
connection
master1
;
select
get_lock
(
"lock"
,
2
);
select
release_lock
(
"lock"
);
select
release_lock
(
"lock"
);
save_master_pos
;
save_master_pos
;
connection
slave
;
connection
slave
;
...
...
mysys/my_bitmap.c
View file @
0d67738e
...
@@ -51,8 +51,8 @@ my_bool bitmap_init(MY_BITMAP *map, uint bitmap_size, my_bool thread_safe)
...
@@ -51,8 +51,8 @@ my_bool bitmap_init(MY_BITMAP *map, uint bitmap_size, my_bool thread_safe)
return
1
;
return
1
;
dbug_assert
(
bitmap_size
!=
~
(
uint
)
0
);
dbug_assert
(
bitmap_size
!=
~
(
uint
)
0
);
#ifdef THREAD
#ifdef THREAD
map
->
thread_safe
=
thread_safe
;
if
((
map
->
thread_safe
=
thread_safe
))
pthread_mutex_init
(
&
map
->
mutex
,
MY_MUTEX_INIT_FAST
);
pthread_mutex_init
(
&
map
->
mutex
,
MY_MUTEX_INIT_FAST
);
#endif
#endif
map
->
bitmap_size
=
bitmap_size
;
map
->
bitmap_size
=
bitmap_size
;
return
0
;
return
0
;
...
@@ -65,7 +65,8 @@ void bitmap_free(MY_BITMAP *map)
...
@@ -65,7 +65,8 @@ void bitmap_free(MY_BITMAP *map)
my_free
((
char
*
)
map
->
bitmap
,
MYF
(
0
));
my_free
((
char
*
)
map
->
bitmap
,
MYF
(
0
));
map
->
bitmap
=
0
;
map
->
bitmap
=
0
;
#ifdef THREAD
#ifdef THREAD
pthread_mutex_destroy
(
&
map
->
mutex
);
if
(
map
->
thread_safe
)
pthread_mutex_destroy
(
&
map
->
mutex
);
#endif
#endif
}
}
}
}
...
...
sql/slave.cc
View file @
0d67738e
...
@@ -78,8 +78,7 @@ static byte* get_table_key(TABLE_RULE_ENT* e, uint* len,
...
@@ -78,8 +78,7 @@ static byte* get_table_key(TABLE_RULE_ENT* e, uint* len,
/* called from get_options() in mysqld.cc on start-up */
/* called from get_options() in mysqld.cc on start-up */
void
init_slave_skip_errors
(
char
*
arg
)
void
init_slave_skip_errors
(
char
*
arg
)
{
{
char
*
p
,
*
end
;
char
*
p
;
int
err_code
=
0
;
my_bool
last_was_digit
=
0
;
my_bool
last_was_digit
=
0
;
if
(
bitmap_init
(
&
slave_error_mask
,
MAX_SLAVE_ERROR
,
0
))
if
(
bitmap_init
(
&
slave_error_mask
,
MAX_SLAVE_ERROR
,
0
))
{
{
...
@@ -89,34 +88,20 @@ void init_slave_skip_errors(char* arg)
...
@@ -89,34 +88,20 @@ void init_slave_skip_errors(char* arg)
use_slave_mask
=
1
;
use_slave_mask
=
1
;
for
(;
isspace
(
*
arg
);
++
arg
)
for
(;
isspace
(
*
arg
);
++
arg
)
/* empty */
;
/* empty */
;
/* force first three chars to lower case */
if
(
!
my_casecmp
(
arg
,
"all"
,
3
))
for
(
p
=
arg
,
end
=
arg
+
3
;
*
p
&&
p
<
end
;
++
p
)
*
p
=
tolower
(
*
p
);
if
(
!
memcmp
(
arg
,
"all"
,
3
))
{
{
bitmap_set_all
(
&
slave_error_mask
);
bitmap_set_all
(
&
slave_error_mask
);
return
;
return
;
}
}
for
(
p
=
arg
,
end
=
strend
(
arg
);
p
<
end
;
++
p
)
for
(
p
=
arg
;
*
p
;
)
{
{
int
digit
=
*
p
-
'0'
;
long
err_code
;
if
(
digit
>=
0
&&
digit
<
10
)
/* found real digit */
if
(
!
(
p
=
str2int
(
p
,
10
,
0
,
LONG_MAX
,
&
err_code
)))
{
break
;
err_code
=
err_code
*
10
+
digit
;
if
(
err_code
<
MAX_SLAVE_ERROR
)
last_was_digit
=
1
;
bitmap_set_bit
(
&
slave_error_mask
,(
uint
)
err_code
);
}
while
(
!
isdigit
(
*
p
)
&&
*
p
)
else
/* delimiter */
p
++
;
{
if
(
last_was_digit
)
{
if
(
err_code
<
MAX_SLAVE_ERROR
)
{
bitmap_set_bit
(
&
slave_error_mask
,
err_code
);
}
err_code
=
0
;
last_was_digit
=
0
;
}
}
}
}
}
}
...
...
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