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
b3b598d1
Commit
b3b598d1
authored
Jul 16, 2004
by
miguel@hegel.txg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes for bug #4571 (Windows compabilities)
parent
3a2ca91e
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
17 additions
and
20 deletions
+17
-20
sql/opt_range.cc
sql/opt_range.cc
+2
-3
sql/sp_head.cc
sql/sp_head.cc
+4
-6
sql/sql_acl.cc
sql/sql_acl.cc
+1
-1
sql/sql_db.cc
sql/sql_db.cc
+1
-2
sql/sql_insert.cc
sql/sql_insert.cc
+6
-5
sql/sql_parse.cc
sql/sql_parse.cc
+1
-1
sql/sql_update.cc
sql/sql_update.cc
+2
-2
No files found.
sql/opt_range.cc
View file @
b3b598d1
...
...
@@ -1882,7 +1882,6 @@ TABLE_READ_PLAN *get_best_disjunct_quick(PARAM *param, SEL_IMERGE *imerge,
double
blocks_in_index_read
;
ha_rows
roru_total_records
;
double
roru_intersect_part
=
1.0
;
double
sweep_cost
;
DBUG_ENTER
(
"get_best_disjunct_quick"
);
DBUG_PRINT
(
"info"
,
(
"Full table scan cost =%g"
,
read_time
));
...
...
@@ -2449,7 +2448,7 @@ bool ror_intersect_add(const PARAM *param, ROR_INTERSECT_INFO *info,
DBUG_PRINT
(
"info"
,
(
"Adding scan on %s"
,
info
->
param
->
table
->
key_info
[
ror_scan
->
keynr
].
name
));
SEL_ARG
*
tuple_arg
=
NULL
;
char
*
key_ptr
=
key_val
;
char
*
key_ptr
=
(
char
*
)
key_val
;
bool
cur_covered
,
prev_covered
=
bitmap_is_set
(
&
info
->
covered_fields
,
key_part
->
fieldnr
);
...
...
@@ -2481,7 +2480,7 @@ bool ror_intersect_add(const PARAM *param, ROR_INTERSECT_INFO *info,
}
}
ha_rows
records
;
min_range
.
length
=
max_range
.
length
=
key_ptr
-
key_val
;
min_range
.
length
=
max_range
.
length
=
((
char
*
)
key_ptr
-
(
char
*
)
key_val
)
;
records
=
param
->
table
->
file
->
records_in_range
(
ror_scan
->
keynr
,
&
min_range
,
...
...
sql/sp_head.cc
View file @
b3b598d1
...
...
@@ -695,7 +695,6 @@ sp_head::restore_lex(THD *thd)
DBUG_ENTER
(
"sp_head::restore_lex"
);
LEX
*
sublex
=
thd
->
lex
;
LEX
*
oldlex
=
(
LEX
*
)
m_lex
.
pop
();
SELECT_LEX
*
sl
;
if
(
!
oldlex
)
return
;
// Nothing to restore
...
...
@@ -866,7 +865,7 @@ sp_head::show_create_procedure(THD *thd)
if
(
sql_mode_var
)
{
sql_mode_str
=
sql_mode_var
->
value_ptr
(
thd
,
OPT_SESSION
,
0
);
sql_mode_len
=
strlen
(
sql_mode_str
);
sql_mode_len
=
strlen
(
(
char
*
)
sql_mode_str
);
}
field_list
.
push_back
(
new
Item_empty_string
(
"Procedure"
,
NAME_LEN
));
...
...
@@ -883,7 +882,7 @@ sp_head::show_create_procedure(THD *thd)
protocol
->
prepare_for_resend
();
protocol
->
store
(
m_name
.
str
,
m_name
.
length
,
system_charset_info
);
if
(
sql_mode_var
)
protocol
->
store
(
sql_mode_str
,
sql_mode_len
,
system_charset_info
);
protocol
->
store
(
(
char
*
)
sql_mode_str
,
sql_mode_len
,
system_charset_info
);
protocol
->
store
(
m_defstr
.
str
,
m_defstr
.
length
,
system_charset_info
);
res
=
protocol
->
write
();
send_eof
(
thd
);
...
...
@@ -931,7 +930,7 @@ sp_head::show_create_function(THD *thd)
if
(
sql_mode_var
)
{
sql_mode_str
=
sql_mode_var
->
value_ptr
(
thd
,
OPT_SESSION
,
0
);
sql_mode_len
=
strlen
(
sql_mode_str
);
sql_mode_len
=
strlen
(
(
char
*
)
sql_mode_str
);
}
field_list
.
push_back
(
new
Item_empty_string
(
"Function"
,
NAME_LEN
));
...
...
@@ -947,7 +946,7 @@ sp_head::show_create_function(THD *thd)
protocol
->
prepare_for_resend
();
protocol
->
store
(
m_name
.
str
,
m_name
.
length
,
system_charset_info
);
if
(
sql_mode_var
)
protocol
->
store
(
sql_mode_str
,
sql_mode_len
,
system_charset_info
);
protocol
->
store
(
(
char
*
)
sql_mode_str
,
sql_mode_len
,
system_charset_info
);
protocol
->
store
(
m_defstr
.
str
,
m_defstr
.
length
,
system_charset_info
);
res
=
protocol
->
write
();
send_eof
(
thd
);
...
...
@@ -990,7 +989,6 @@ int
sp_instr_stmt
::
exec_stmt
(
THD
*
thd
,
LEX
*
lex
)
{
LEX
*
olex
;
// The other lex
SELECT_LEX
*
sl
;
int
res
;
olex
=
thd
->
lex
;
// Save the other lex
...
...
sql/sql_acl.cc
View file @
b3b598d1
...
...
@@ -2907,7 +2907,7 @@ bool check_grant_all_columns(THD *thd, ulong want_access, GRANT_INFO *grant,
{
GRANT_TABLE
*
grant_table
;
GRANT_COLUMN
*
grant_column
;
Field
*
field
=
0
,
**
ptr
;
Field
*
field
=
0
;
want_access
&=
~
grant
->
privilege
;
if
(
!
want_access
)
...
...
sql/sql_db.cc
View file @
b3b598d1
...
...
@@ -225,7 +225,7 @@ void del_dbopt(const char *path)
{
my_dbopt_t
*
opt
;
rw_wrlock
(
&
LOCK_dboptions
);
if
((
opt
=
(
my_dbopt_t
*
)
hash_search
(
&
dboptions
,
path
,
strlen
(
path
))))
if
((
opt
=
(
my_dbopt_t
*
)
hash_search
(
&
dboptions
,
(
byte
*
)
path
,
strlen
(
path
))))
hash_delete
(
&
dboptions
,
(
byte
*
)
opt
);
rw_unlock
(
&
LOCK_dboptions
);
}
...
...
@@ -549,7 +549,6 @@ int mysql_rm_db(THD *thd,char *db,bool if_exists, bool silent)
char
path
[
FN_REFLEN
+
16
],
tmp_db
[
NAME_LEN
+
1
];
MY_DIR
*
dirp
;
uint
length
;
my_dbopt_t
*
dbopt
;
DBUG_ENTER
(
"mysql_rm_db"
);
VOID
(
pthread_mutex_lock
(
&
LOCK_mysql_create_db
));
...
...
sql/sql_insert.cc
View file @
b3b598d1
...
...
@@ -407,7 +407,7 @@ int mysql_insert(THD *thd,TABLE_LIST *table_list,
!
thd
->
cuted_fields
))
{
thd
->
row_count_func
=
info
.
copied
+
info
.
deleted
+
info
.
updated
;
send_ok
(
thd
,
thd
->
row_count_func
,
id
);
send_ok
(
thd
,
(
ulong
)
(
ulong
)
thd
->
row_count_func
,
id
);
}
else
{
...
...
@@ -420,7 +420,7 @@ int mysql_insert(THD *thd,TABLE_LIST *table_list,
sprintf
(
buff
,
ER
(
ER_INSERT_INFO
),
(
ulong
)
info
.
records
,
(
ulong
)
(
info
.
deleted
+
info
.
updated
),
(
ulong
)
thd
->
cuted_fields
);
thd
->
row_count_func
=
info
.
copied
+
info
.
deleted
+
info
.
updated
;
::
send_ok
(
thd
,
thd
->
row_count_func
,
(
ulonglong
)
id
,
buff
);
::
send_ok
(
thd
,
(
ulong
)
thd
->
row_count_func
,
(
ulonglong
)
id
,
buff
);
}
free_underlaid_joins
(
thd
,
&
thd
->
lex
->
select_lex
);
table
->
insert_values
=
0
;
...
...
@@ -453,6 +453,7 @@ static bool check_view_insertability(TABLE_LIST *view, ulong query_id)
{
DBUG_ENTER
(
"check_key_in_view"
);
uint
i
;
TABLE
*
table
=
view
->
table
;
Item
**
trans
=
view
->
field_translation
;
Field
**
field_ptr
=
table
->
field
;
...
...
@@ -462,7 +463,7 @@ static bool check_view_insertability(TABLE_LIST *view, ulong query_id)
view
->
contain_auto_increment
=
0
;
/* check simplicity and prepare unique test of view */
for
(
uint
i
=
0
;
i
<
num
;
i
++
)
for
(
i
=
0
;
i
<
num
;
i
++
)
{
/* simple SELECT list entry (field without expression) */
if
(
trans
[
i
]
->
type
()
!=
Item
::
FIELD_ITEM
)
...
...
@@ -473,7 +474,7 @@ static bool check_view_insertability(TABLE_LIST *view, ulong query_id)
((
Item_field
*
)
trans
[
i
])
->
field
->
query_id
=
other_query_id
;
}
/* unique test */
for
(
uint
i
=
0
;
i
<
num
;
i
++
)
for
(
i
=
0
;
i
<
num
;
i
++
)
{
Item_field
*
field
=
(
Item_field
*
)
trans
[
i
];
if
(
field
->
field
->
query_id
==
query_id
)
...
...
@@ -1728,7 +1729,7 @@ bool select_insert::send_eof()
sprintf
(
buff
,
ER
(
ER_INSERT_INFO
),
(
ulong
)
info
.
records
,
(
ulong
)
(
info
.
deleted
+
info
.
updated
),
(
ulong
)
thd
->
cuted_fields
);
thd
->
row_count_func
=
info
.
copied
+
info
.
deleted
+
info
.
updated
;
::
send_ok
(
thd
,
thd
->
row_count_func
,
last_insert_id
,
buff
);
::
send_ok
(
thd
,
(
ulong
)
thd
->
row_count_func
,
last_insert_id
,
buff
);
DBUG_RETURN
(
0
);
}
...
...
sql/sql_parse.cc
View file @
b3b598d1
...
...
@@ -3672,7 +3672,7 @@ purposes internal to the MySQL server", MYF(0));
}
if
(
res
==
0
)
send_ok
(
thd
,
(
thd
->
row_count_func
<
0
?
0
:
thd
->
row_count_func
));
send_ok
(
thd
,
(
ulong
)
(
thd
->
row_count_func
<
0
?
0
:
thd
->
row_count_func
));
else
goto
error
;
// Substatement should already have sent error
}
...
...
sql/sql_update.cc
View file @
b3b598d1
...
...
@@ -421,7 +421,7 @@ int mysql_update(THD *thd,
(
ulong
)
thd
->
cuted_fields
);
thd
->
row_count_func
=
(
thd
->
client_capabilities
&
CLIENT_FOUND_ROWS
)
?
found
:
updated
;
send_ok
(
thd
,
thd
->
row_count_func
,
send_ok
(
thd
,
(
ulong
)
thd
->
row_count_func
,
thd
->
insert_id_used
?
thd
->
insert_id
()
:
0L
,
buff
);
DBUG_PRINT
(
"info"
,(
"%d records updated"
,
updated
));
}
...
...
@@ -1208,7 +1208,7 @@ bool multi_update::send_eof()
(
ulong
)
thd
->
cuted_fields
);
thd
->
row_count_func
=
(
thd
->
client_capabilities
&
CLIENT_FOUND_ROWS
)
?
found
:
updated
;
::
send_ok
(
thd
,
thd
->
row_count_func
,
::
send_ok
(
thd
,
(
ulong
)
thd
->
row_count_func
,
thd
->
insert_id_used
?
thd
->
insert_id
()
:
0L
,
buff
);
return
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