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
efb5ed5b
Commit
efb5ed5b
authored
19 years ago
by
brian@zim.(none)
Browse files
Options
Browse Files
Download
Plain Diff
Merge
parents
f889f088
ba9b9f89
Changes
14
Show whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
29 additions
and
57 deletions
+29
-57
client/mysqladmin.cc
client/mysqladmin.cc
+1
-1
sql/examples/ha_archive.cc
sql/examples/ha_archive.cc
+3
-4
sql/examples/ha_example.cc
sql/examples/ha_example.cc
+1
-3
sql/examples/ha_tina.cc
sql/examples/ha_tina.cc
+12
-25
sql/ha_heap.cc
sql/ha_heap.cc
+0
-1
sql/item_subselect.cc
sql/item_subselect.cc
+0
-3
sql/mysqld.cc
sql/mysqld.cc
+1
-7
sql/opt_range.h
sql/opt_range.h
+1
-1
sql/repl_failsafe.cc
sql/repl_failsafe.cc
+1
-1
sql/slave.cc
sql/slave.cc
+1
-1
sql/sql_acl.cc
sql/sql_acl.cc
+5
-5
sql/sql_insert.cc
sql/sql_insert.cc
+1
-1
sql/sql_parse.cc
sql/sql_parse.cc
+0
-2
sql/sql_select.cc
sql/sql_select.cc
+2
-2
No files found.
client/mysqladmin.cc
View file @
efb5ed5b
...
...
@@ -271,7 +271,7 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
option_wait
=
1
;
}
else
option_wait
=
~
0
;
option_wait
=
~
(
uint
)
0
;
break
;
case
'?'
:
case
'I'
:
/* Info */
...
...
This diff is collapsed.
Click to expand it.
sql/examples/ha_archive.cc
View file @
efb5ed5b
...
...
@@ -577,7 +577,7 @@ int ha_archive::write_row(byte * buf)
written
=
gzwrite
(
share
->
archive_write
,
buf
,
table
->
reclength
);
DBUG_PRINT
(
"ha_archive::get_row"
,
(
"Wrote %d bytes expected %d"
,
written
,
table
->
reclength
));
share
->
dirty
=
TRUE
;
if
(
written
!=
table
->
reclength
)
if
(
written
!=
(
z_off_t
)
table
->
reclength
)
goto
error
;
/*
We should probably mark the table as damagaged if the record is written
...
...
@@ -592,7 +592,7 @@ int ha_archive::write_row(byte * buf)
{
(
*
field
)
->
get_ptr
(
&
ptr
);
written
=
gzwrite
(
share
->
archive_write
,
ptr
,
(
unsigned
)
size
);
if
(
written
!=
size
)
if
(
written
!=
(
z_off_t
)
size
)
goto
error
;
}
}
...
...
@@ -615,7 +615,6 @@ error:
int
ha_archive
::
rnd_init
(
bool
scan
)
{
DBUG_ENTER
(
"ha_archive::rnd_init"
);
int
read
;
// gzread() returns int, and we use this to check the header
/* We rewind the file so that we can read from the beginning if scan */
if
(
scan
)
...
...
@@ -749,7 +748,7 @@ int ha_archive::rnd_pos(byte * buf, byte *pos)
DBUG_ENTER
(
"ha_archive::rnd_pos"
);
statistic_increment
(
ha_read_rnd_count
,
&
LOCK_status
);
current_position
=
ha_get_ptr
(
pos
,
ref_length
);
z_off_t
seek
=
gzseek
(
archive
,
current_position
,
SEEK_SET
);
(
void
)
gzseek
(
archive
,
current_position
,
SEEK_SET
);
DBUG_RETURN
(
get_row
(
archive
,
buf
));
}
...
...
This diff is collapsed.
Click to expand it.
sql/examples/ha_example.cc
View file @
efb5ed5b
...
...
@@ -152,10 +152,8 @@ static EXAMPLE_SHARE *get_share(const char *table_name, TABLE *table)
return
share
;
error2:
thr_lock_delete
(
&
share
->
lock
);
pthread_mutex_destroy
(
&
share
->
mutex
);
error:
pthread_mutex_destroy
(
&
share
->
mutex
);
pthread_mutex_unlock
(
&
example_mutex
);
my_free
((
gptr
)
share
,
MYF
(
0
));
...
...
This diff is collapsed.
Click to expand it.
sql/examples/ha_tina.cc
View file @
efb5ed5b
...
...
@@ -343,7 +343,6 @@ int ha_tina::find_current_row(byte *buf)
for
(
Field
**
field
=
table
->
field
;
*
field
;
field
++
)
{
int
x
;
buffer
.
length
(
0
);
mapped_ptr
++
;
// Increment past the first quote
for
(;
mapped_ptr
!=
end_ptr
;
mapped_ptr
++
)
...
...
@@ -737,29 +736,17 @@ int ha_tina::rnd_end()
beginning so that we move the smallest amount of data possible.
*/
qsort
(
chain
,
(
size_t
)(
chain_ptr
-
chain
),
sizeof
(
tina_set
),
(
qsort_cmp
)
sort_set
);
for
(
ptr
=
chain
;
ptr
<
chain_ptr
;
ptr
++
)
printf
(
"Chain %d, %d
\n
"
,
(
int
)
ptr
->
begin
,
(
int
)
ptr
->
end
);
for
(
ptr
=
chain
;
ptr
<
chain_ptr
;
ptr
++
)
{
//memmove(share->mapped_file + ptr->begin, share->mapped_file
//+ ptr->end, length - (size_t)ptr->end);
/* We peek a head to see if this is the last chain */
printf
(
"Delete %d, %d, %d
\n
"
,
(
int
)
ptr
->
begin
,
(
int
)
ptr
->
end
,
(
int
)
length
);
if
(
ptr
+
1
==
chain_ptr
)
{
printf
(
"Shiftina(end) %d(%d) to %d
\n
"
,
(
int
)
ptr
->
end
,
(
int
)(
length
-
(
size_t
)
ptr
->
end
),
(
int
)
ptr
->
begin
);
memmove
(
share
->
mapped_file
+
ptr
->
begin
,
share
->
mapped_file
+
ptr
->
end
,
length
-
(
size_t
)
ptr
->
end
);
}
else
{
printf
(
"Shifting %d(%d) to %d
\n
"
,
(
int
)
ptr
->
end
,
(
int
)((
ptr
++
)
->
begin
-
(
size_t
)
ptr
->
end
),
(
int
)
ptr
->
begin
);
memmove
(
share
->
mapped_file
+
ptr
->
begin
,
share
->
mapped_file
+
ptr
->
end
,
(
size_t
)(
ptr
++
)
->
begin
-
(
size_t
)
ptr
->
end
);
}
memmove
((
caddr_t
)
share
->
mapped_file
+
ptr
->
begin
,
(
caddr_t
)
share
->
mapped_file
+
ptr
->
end
,
(
size_t
)((
ptr
++
)
->
begin
-
ptr
->
end
));
length
=
length
-
(
size_t
)(
ptr
->
end
-
ptr
->
begin
);
}
printf
(
"Buffer %s
\n
"
,
share
->
mapped_file
);
/* Truncate the file to the new size */
if
(
my_chsize
(
share
->
data_file
,
length
,
0
,
MYF
(
MY_WME
)))
...
...
This diff is collapsed.
Click to expand it.
sql/ha_heap.cc
View file @
efb5ed5b
...
...
@@ -486,7 +486,6 @@ int ha_heap::create(const char *name, TABLE *table_arg,
for
(;
key_part
!=
key_part_end
;
key_part
++
,
seg
++
)
{
uint
flag
=
key_part
->
key_type
;
Field
*
field
=
key_part
->
field
;
if
(
pos
->
algorithm
==
HA_KEY_ALG_BTREE
)
seg
->
type
=
field
->
key_type
();
...
...
This diff is collapsed.
Click to expand it.
sql/item_subselect.cc
View file @
efb5ed5b
...
...
@@ -381,9 +381,6 @@ Item_singlerow_subselect::select_transformer(JOIN *join)
return
RES_REDUCE
;
}
return
RES_OK
;
err:
return
RES_ERROR
;
}
void
Item_singlerow_subselect
::
store
(
uint
i
,
Item
*
item
)
...
...
This diff is collapsed.
Click to expand it.
sql/mysqld.cc
View file @
efb5ed5b
...
...
@@ -3355,7 +3355,7 @@ static int bootstrap(FILE *file)
thd
->
client_capabilities
=
0
;
my_net_init
(
&
thd
->
net
,(
st_vio
*
)
0
);
thd
->
max_client_packet_length
=
thd
->
net
.
max_packet
;
thd
->
master_access
=
~
0
;
thd
->
master_access
=
~
(
ulong
)
0
;
thd
->
thread_id
=
thread_id
++
;
thread_count
++
;
...
...
@@ -5574,12 +5574,6 @@ static void print_version(void)
server_version
,
SYSTEM_TYPE
,
MACHINE_TYPE
,
MYSQL_COMPILATION_COMMENT
);
}
static
void
use_help
(
void
)
{
print_version
();
printf
(
"Use '--help' or '--no-defaults --help' for a list of available options
\n
"
);
}
static
void
usage
(
void
)
{
if
(
!
(
default_charset_info
=
get_charset_by_csname
(
default_character_set_name
,
...
...
This diff is collapsed.
Click to expand it.
sql/opt_range.h
View file @
efb5ed5b
...
...
@@ -143,7 +143,7 @@ class SQL_SELECT :public Sql_alloc {
~
SQL_SELECT
();
void
cleanup
();
bool
check_quick
(
THD
*
thd
,
bool
force_quick_range
,
ha_rows
limit
)
{
return
test_quick_select
(
thd
,
key_map
(
~
0
),
0
,
limit
,
force_quick_range
)
<
0
;
}
{
return
test_quick_select
(
thd
,
key_map
(
~
(
uint
)
0
),
0
,
limit
,
force_quick_range
)
<
0
;
}
inline
bool
skip_record
()
{
return
cond
?
cond
->
val_int
()
==
0
:
0
;
}
int
test_quick_select
(
THD
*
thd
,
key_map
keys
,
table_map
prev_tables
,
ha_rows
limit
,
bool
force_quick_range
=
0
);
...
...
This diff is collapsed.
Click to expand it.
sql/repl_failsafe.cc
View file @
efb5ed5b
...
...
@@ -71,7 +71,7 @@ static int init_failsafe_rpl_thread(THD* thd)
my_net_init
(
&
thd
->
net
,
0
);
thd
->
net
.
read_timeout
=
slave_net_timeout
;
thd
->
max_client_packet_length
=
thd
->
net
.
max_packet
;
thd
->
master_access
=
~
0
;
thd
->
master_access
=
~
(
ulong
)
0
;
thd
->
priv_user
=
0
;
pthread_mutex_lock
(
&
LOCK_thread_count
);
thd
->
thread_id
=
thread_id
++
;
...
...
This diff is collapsed.
Click to expand it.
sql/slave.cc
View file @
efb5ed5b
...
...
@@ -2577,7 +2577,7 @@ static int init_slave_thread(THD* thd, SLAVE_THD_TYPE thd_type)
thd
->
client_capabilities
=
0
;
my_net_init
(
&
thd
->
net
,
0
);
thd
->
net
.
read_timeout
=
slave_net_timeout
;
thd
->
master_access
=
~
0
;
thd
->
master_access
=
~
(
ulong
)
0
;
thd
->
priv_user
=
0
;
thd
->
slave_thread
=
1
;
/*
...
...
This diff is collapsed.
Click to expand it.
sql/sql_acl.cc
View file @
efb5ed5b
...
...
@@ -1002,7 +1002,7 @@ static void acl_insert_db(const char *user, const char *host, const char *db,
ulong
acl_get
(
const
char
*
host
,
const
char
*
ip
,
const
char
*
user
,
const
char
*
db
,
my_bool
db_is_pattern
)
{
ulong
host_access
=
~
0
,
db_access
=
0
;
ulong
host_access
=
~
(
ulong
)
0
,
db_access
=
0
;
uint
i
,
key_length
;
char
key
[
ACL_KEY_LENGTH
],
*
tmp_db
,
*
end
;
acl_entry
*
entry
;
...
...
@@ -3673,7 +3673,7 @@ int mysql_revoke_all(THD *thd, List <LEX_USER> &list)
}
if
(
replace_user_table
(
thd
,
tables
[
0
].
table
,
*
lex_user
,
~
0
,
1
,
0
))
*
lex_user
,
~
(
ulong
)
0
,
1
,
0
))
{
result
=
-
1
;
continue
;
...
...
@@ -3700,7 +3700,7 @@ int mysql_revoke_all(THD *thd, List <LEX_USER> &list)
if
(
!
strcmp
(
lex_user
->
user
.
str
,
user
)
&&
!
my_strcasecmp
(
system_charset_info
,
lex_user
->
host
.
str
,
host
))
{
if
(
!
replace_db_table
(
tables
[
1
].
table
,
acl_db
->
db
,
*
lex_user
,
~
0
,
1
))
if
(
!
replace_db_table
(
tables
[
1
].
table
,
acl_db
->
db
,
*
lex_user
,
~
(
ulong
)
0
,
1
))
{
/*
Don't increment counter as replace_db_table deleted the
...
...
@@ -3734,7 +3734,7 @@ int mysql_revoke_all(THD *thd, List <LEX_USER> &list)
if
(
replace_table_table
(
thd
,
grant_table
,
tables
[
2
].
table
,
*
lex_user
,
grant_table
->
db
,
grant_table
->
tname
,
~
0
,
0
,
1
))
~
(
ulong
)
0
,
0
,
1
))
{
result
=
-
1
;
}
...
...
@@ -3750,7 +3750,7 @@ int mysql_revoke_all(THD *thd, List <LEX_USER> &list)
columns
,
grant_table
->
db
,
grant_table
->
tname
,
~
0
,
1
))
~
(
ulong
)
0
,
1
))
{
revoked
=
1
;
continue
;
...
...
This diff is collapsed.
Click to expand it.
sql/sql_insert.cc
View file @
efb5ed5b
...
...
@@ -1443,7 +1443,7 @@ bool delayed_insert::handle_inserts(void)
if
(
thd
.
killed
||
table
->
version
!=
refresh_version
)
{
thd
.
killed
=
1
;
max_rows
=
~
0
;
// Do as much as possible
max_rows
=
~
(
uint
)
0
;
// Do as much as possible
}
/*
...
...
This diff is collapsed.
Click to expand it.
sql/sql_parse.cc
View file @
efb5ed5b
...
...
@@ -561,7 +561,6 @@ bool is_update_query(enum enum_sql_command command)
static
void
time_out_user_resource_limits
(
THD
*
thd
,
USER_CONN
*
uc
)
{
bool
error
=
0
;
time_t
check_time
=
thd
->
start_time
?
thd
->
start_time
:
time
(
NULL
);
DBUG_ENTER
(
"time_out_user_resource_limits"
);
...
...
@@ -587,7 +586,6 @@ static bool check_mqh(THD *thd, uint check_command)
{
#ifndef NO_EMBEDDED_ACCESS_CHECKS
bool
error
=
0
;
time_t
check_time
=
thd
->
start_time
?
thd
->
start_time
:
time
(
NULL
);
USER_CONN
*
uc
=
thd
->
user_connect
;
DBUG_ENTER
(
"check_mqh"
);
DBUG_ASSERT
(
uc
!=
0
);
...
...
This diff is collapsed.
Click to expand it.
sql/sql_select.cc
View file @
efb5ed5b
...
...
@@ -36,7 +36,7 @@ const char *join_type_str[]={ "UNKNOWN","system","const","eq_ref","ref",
};
const
key_map
key_map_empty
(
0
);
const
key_map
key_map_full
(
~
0
);
const
key_map
key_map_full
(
~
(
uint
)
0
);
static
void
optimize_keyuse
(
JOIN
*
join
,
DYNAMIC_ARRAY
*
keyuse_array
);
static
bool
make_join_statistics
(
JOIN
*
join
,
TABLE_LIST
*
tables
,
COND
*
conds
,
...
...
@@ -3452,7 +3452,7 @@ make_simple_join(JOIN *join,TABLE *tmp_table)
join_tab
->
select_cond
=
0
;
join_tab
->
quick
=
0
;
join_tab
->
type
=
JT_ALL
;
/* Map through all records */
join_tab
->
keys
.
init
(
~
0
);
/* test everything in quick */
join_tab
->
keys
.
init
(
~
(
uint
)
0
);
/* test everything in quick */
join_tab
->
info
=
0
;
join_tab
->
on_expr
=
0
;
join_tab
->
ref
.
key
=
-
1
;
...
...
This diff is collapsed.
Click to expand it.
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