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
9d3fda77
Commit
9d3fda77
authored
Dec 15, 2006
by
monty@mysql.com/narttu.mysql.fi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
After merge fixes:
- Remove compiler warnings - Fix merge errors - Indentation fixes
parent
a6481aa4
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
26 additions
and
25 deletions
+26
-25
sql/ha_ndbcluster.cc
sql/ha_ndbcluster.cc
+9
-9
sql/slave.cc
sql/slave.cc
+3
-1
sql/sp.cc
sql/sp.cc
+0
-5
sql/sql_table.cc
sql/sql_table.cc
+8
-6
sql/sql_view.cc
sql/sql_view.cc
+6
-4
No files found.
sql/ha_ndbcluster.cc
View file @
9d3fda77
...
...
@@ -6219,20 +6219,19 @@ ha_ndbcluster::read_multi_range_first(KEY_MULTI_RANGE **found_range_p,
bool
sorted
,
HANDLER_BUFFER
*
buffer
)
{
DBUG_ENTER
(
"ha_ndbcluster::read_multi_range_first"
);
int
res
;
KEY
*
key_info
=
table
->
key_info
+
active_index
;
NDB_INDEX_TYPE
cur_index_type
=
get_index_type
(
active_index
);
ulong
reclength
=
table
->
s
->
reclength
;
NdbOperation
*
op
;
Thd_ndb
*
thd_ndb
=
get_thd_ndb
(
current_thd
);
DBUG_ENTER
(
"ha_ndbcluster::read_multi_range_first"
);
/**
* blobs and unique hash index with NULL can't be batched currently
*/
if
(
uses_blob_value
(
m_retrieve_all_fields
)
||
(
index_type
==
UNIQUE_INDEX
&&
(
cur_index_type
==
UNIQUE_INDEX
&&
has_null_in_unique_index
(
active_index
)
&&
null_value_index_search
(
ranges
,
ranges
+
range_count
,
buffer
)))
{
...
...
@@ -7953,6 +7952,7 @@ ha_ndbcluster::build_scan_filter_predicate(Ndb_cond * &cond,
DBUG_RETURN
(
1
);
}
int
ha_ndbcluster
::
build_scan_filter_group
(
Ndb_cond
*
&
cond
,
NdbScanFilter
*
filter
)
{
...
...
@@ -8026,6 +8026,7 @@ ha_ndbcluster::build_scan_filter_group(Ndb_cond* &cond, NdbScanFilter *filter)
DBUG_RETURN
(
0
);
}
int
ha_ndbcluster
::
build_scan_filter
(
Ndb_cond
*
&
cond
,
NdbScanFilter
*
filter
)
{
...
...
@@ -8076,14 +8077,14 @@ ha_ndbcluster::generate_scan_filter(Ndb_cond_stack *ndb_cond_stack,
DBUG_RETURN
(
0
);
}
int
ha_ndbcluster
::
generate_scan_filter_from_cond
(
Ndb_cond_stack
*
ndb_cond_stack
,
NdbScanFilter
&
filter
)
{
DBUG_ENTER
(
"generate_scan_filter_from_cond"
);
bool
multiple_cond
=
FALSE
;
DBUG_PRINT
(
"info"
,
(
"Generating scan filter"
));
DBUG_ENTER
(
"generate_scan_filter_from_cond"
);
// Wrap an AND group around multiple conditions
if
(
ndb_cond_stack
->
next
)
{
...
...
@@ -8109,6 +8110,7 @@ ha_ndbcluster::generate_scan_filter_from_cond(Ndb_cond_stack *ndb_cond_stack,
DBUG_RETURN
(
0
);
}
int
ha_ndbcluster
::
generate_scan_filter_from_key
(
NdbScanOperation
*
op
,
const
KEY
*
key_info
,
const
byte
*
key
,
...
...
@@ -8119,15 +8121,14 @@ int ha_ndbcluster::generate_scan_filter_from_key(NdbScanOperation *op,
KEY_PART_INFO
*
end
=
key_part
+
key_info
->
key_parts
;
NdbScanFilter
filter
(
op
);
int
res
;
DBUG_ENTER
(
"generate_scan_filter_from_key"
);
filter
.
begin
(
NdbScanFilter
::
AND
);
for
(;
key_part
!=
end
;
key_part
++
)
{
Field
*
field
=
key_part
->
field
;
uint32
pack_len
=
field
->
pack_length
();
const
byte
*
ptr
=
key
;
char
buf
[
256
];
DBUG_PRINT
(
"info"
,
(
"Filtering value for %s"
,
field
->
field_name
));
DBUG_DUMP
(
"key"
,
(
char
*
)
ptr
,
pack_len
);
if
(
key_part
->
null_bit
)
...
...
@@ -8162,7 +8163,6 @@ int
ndbcluster_show_status
(
THD
*
thd
)
{
Protocol
*
protocol
=
thd
->
protocol
;
DBUG_ENTER
(
"ndbcluster_show_status"
);
if
(
have_ndbcluster
!=
SHOW_OPTION_YES
)
...
...
sql/slave.cc
View file @
9d3fda77
...
...
@@ -4393,6 +4393,8 @@ int queue_event(MASTER_INFO* mi,const char* buf, ulong event_len)
pthread_mutex_t
*
log_lock
=
rli
->
relay_log
.
get_log_lock
();
DBUG_ENTER
(
"queue_event"
);
LINT_INIT
(
inc_pos
);
if
(
mi
->
rli
.
relay_log
.
description_event_for_queue
->
binlog_version
<
4
&&
buf
[
EVENT_TYPE_OFFSET
]
!=
FORMAT_DESCRIPTION_EVENT
/* a way to escape */
)
DBUG_RETURN
(
queue_old_event
(
mi
,
buf
,
event_len
));
...
...
@@ -4533,7 +4535,7 @@ int queue_event(MASTER_INFO* mi,const char* buf, ulong event_len)
err:
pthread_mutex_unlock
(
&
mi
->
data_lock
);
DBUG_PRINT
(
"info"
,
(
"error
=
%d"
,
error
));
DBUG_PRINT
(
"info"
,
(
"error
:
%d"
,
error
));
DBUG_RETURN
(
error
);
}
...
...
sql/sp.cc
View file @
9d3fda77
...
...
@@ -492,8 +492,6 @@ db_create_routine(THD *thd, int type, sp_head *sp)
int
ret
;
TABLE
*
table
;
char
definer
[
USER_HOST_BUFF_SIZE
];
char
old_db_buf
[
NAME_LEN
+
1
];
LEX_STRING
old_db
=
{
old_db_buf
,
sizeof
(
old_db_buf
)
};
DBUG_ENTER
(
"db_create_routine"
);
DBUG_PRINT
(
"enter"
,
(
"type: %d name: %.*s"
,
type
,
sp
->
m_name
.
length
,
sp
->
m_name
.
str
));
...
...
@@ -1843,9 +1841,7 @@ create_string(THD *thd, String *buf,
SYNOPSIS
sp_use_new_db()
thd thread handle
new_db new database name (a string and its length)
old_db [IN] str points to a buffer where to store the old
database, length contains the size of the buffer
[OUT] if old db was not NULL, its name is copied
...
...
@@ -1853,7 +1849,6 @@ create_string(THD *thd, String *buf,
accordingly. Otherwise str[0] is set to '\0' and length
is set to 0. The out parameter should be used only if
the database name has been changed (see dbchangedp).
dbchangedp [OUT] is set to TRUE if the current database is changed,
FALSE otherwise. A database is not changed if the old
name is the same as the new one, both names are empty,
...
...
sql/sql_table.cc
View file @
9d3fda77
...
...
@@ -223,9 +223,10 @@ int mysql_rm_table_part2(THD *thd, TABLE_LIST *tables, bool if_exists,
String
wrong_tables
;
int
error
;
bool
some_tables_deleted
=
0
,
tmp_table_deleted
=
0
,
foreign_key_error
=
0
;
DBUG_ENTER
(
"mysql_rm_table_part2"
);
LINT_INIT
(
alias
);
if
(
!
drop_temporary
&&
lock_table_names
(
thd
,
tables
))
DBUG_RETURN
(
1
);
...
...
@@ -2998,7 +2999,7 @@ bool mysql_alter_table(THD *thd,char *new_db, char *new_name,
ALTER_INFO
*
alter_info
,
bool
do_send_ok
)
{
TABLE
*
table
,
*
new_table
=
0
;
int
error
;
int
error
=
0
;
char
tmp_name
[
80
],
old_name
[
32
],
new_name_buff
[
FN_REFLEN
];
char
new_alias_buff
[
FN_REFLEN
],
*
table_name
,
*
db
,
*
new_alias
,
*
alias
;
char
index_file
[
FN_REFLEN
],
data_file
[
FN_REFLEN
];
...
...
@@ -3051,9 +3052,11 @@ bool mysql_alter_table(THD *thd,char *new_db, char *new_name,
DBUG_RETURN
(
1
);
VOID
(
pthread_mutex_lock
(
&
LOCK_open
));
if
(
lock_table_names
(
thd
,
table_list
))
{
error
=
1
;
goto
view_err
;
}
error
=
0
;
if
(
!
do_rename
(
thd
,
table_list
,
new_db
,
new_name
,
new_name
,
1
))
{
if
(
mysql_bin_log
.
is_open
())
...
...
@@ -3154,7 +3157,6 @@ view_err:
switch
(
alter_info
->
keys_onoff
)
{
case
LEAVE_AS_IS
:
error
=
0
;
break
;
case
ENABLE
:
wait_while_table_is_used
(
thd
,
table
,
HA_EXTRA_FORCE_REOPEN
);
...
...
@@ -3169,10 +3171,10 @@ view_err:
}
if
(
error
==
HA_ERR_WRONG_COMMAND
)
{
error
=
0
;
push_warning_printf
(
thd
,
MYSQL_ERROR
::
WARN_LEVEL_NOTE
,
ER_ILLEGAL_HA
,
ER
(
ER_ILLEGAL_HA
),
table
->
alias
);
error
=
0
;
}
if
(
!
error
&&
(
new_name
!=
table_name
||
new_db
!=
db
))
...
...
@@ -3202,10 +3204,10 @@ view_err:
if
(
error
==
HA_ERR_WRONG_COMMAND
)
{
error
=
0
;
push_warning_printf
(
thd
,
MYSQL_ERROR
::
WARN_LEVEL_NOTE
,
ER_ILLEGAL_HA
,
ER
(
ER_ILLEGAL_HA
),
table
->
alias
);
error
=
0
;
}
if
(
!
error
)
...
...
sql/sql_view.cc
View file @
9d3fda77
...
...
@@ -862,7 +862,8 @@ bool mysql_make_view(THD *thd, File_parser *parser, TABLE_LIST *table,
Query_arena
*
arena
,
backup
;
TABLE_LIST
*
top_view
=
table
->
top_table
();
int
res
;
bool
result
;
bool
result
,
view_is_mergeable
;
TABLE_LIST
*
view_main_select_tables
;
DBUG_ENTER
(
"mysql_make_view"
);
DBUG_PRINT
(
"info"
,
(
"table: 0x%lx (%s)"
,
(
ulong
)
table
,
table
->
table_name
));
...
...
@@ -1089,9 +1090,10 @@ bool mysql_make_view(THD *thd, File_parser *parser, TABLE_LIST *table,
table
->
next_global
=
view_tables
;
}
bool
view_is_mergeable
=
(
table
->
algorithm
!=
VIEW_ALGORITHM_TMPTABLE
&&
lex
->
can_be_merged
());
TABLE_LIST
*
view_main_select_tables
;
view_is_mergeable
=
(
table
->
algorithm
!=
VIEW_ALGORITHM_TMPTABLE
&&
lex
->
can_be_merged
());
LINT_INIT
(
view_main_select_tables
);
if
(
view_is_mergeable
)
{
/*
...
...
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