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
8d1480f7
Commit
8d1480f7
authored
May 05, 2004
by
miguel@hegel.local
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Windows fixes for VC++ compiler compability
parent
ee627d25
Changes
11
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
38 additions
and
26 deletions
+38
-26
myisam/myisam_ftdump.c
myisam/myisam_ftdump.c
+1
-1
mysys/my_getsystime.c
mysys/my_getsystime.c
+20
-5
sql/handler.cc
sql/handler.cc
+1
-1
sql/item_geofunc.cc
sql/item_geofunc.cc
+1
-2
sql/item_strfunc.cc
sql/item_strfunc.cc
+3
-3
sql/opt_range.cc
sql/opt_range.cc
+2
-2
sql/sql_insert.cc
sql/sql_insert.cc
+1
-1
sql/sql_lex.cc
sql/sql_lex.cc
+4
-4
sql/sql_parse.cc
sql/sql_parse.cc
+2
-3
sql/sql_prepare.cc
sql/sql_prepare.cc
+2
-2
sql/sql_union.cc
sql/sql_union.cc
+1
-2
No files found.
myisam/myisam_ftdump.c
View file @
8d1480f7
...
...
@@ -83,7 +83,7 @@ int main(int argc,char *argv[])
{
char
*
end
;
inx
=
strtoll
(
argv
[
1
],
&
end
,
10
);
inx
=
(
uint
)
strtoll
(
argv
[
1
],
&
end
,
10
);
if
(
*
end
)
usage
();
}
...
...
mysys/my_getsystime.c
View file @
8d1480f7
...
...
@@ -30,11 +30,26 @@ ulonglong my_getsystime()
clock_gettime
(
CLOCK_REALTIME
,
&
tp
);
return
(
ulonglong
)
tp
.
tv_sec
*
10000000
+
(
ulonglong
)
tp
.
tv_nsec
/
100
;
#elif defined(__WIN__)
/* TODO: use GetSystemTimeAsFileTime here or
QueryPerformanceCounter/QueryPerformanceFrequency */
struct
_timeb
tb
;
_ftime
(
&
tb
);
return
(
ulonglong
)
tb
.
time
*
10000000
+
(
ulonglong
)
tb
.
millitm
*
10000
;
#define OFFSET_TO_EPOC ((__int64) 134774 * 24 * 60 * 60 * 1000 * 1000 * 10)
static
__int64
offset
=
0
,
freq
;
LARGE_INTEGER
t_cnt
;
if
(
!
offset
)
{
/* strictly speaking there should be a mutex to protect
initialization section. But my_getsystime() is called from
UUID() code, and UUID() calls are serialized with a mutex anyway
*/
LARGE_INTEGER
li
;
FILETIME
ft
;
GetSystemTimeAsFileTime
(
&
ft
);
li
.
LowPart
=
ft
.
dwLowDateTime
;
li
.
HighPart
=
ft
.
dwHighDateTime
;
offset
=
li
.
QuadPart
-
OFFSET_TO_EPOC
;
QueryPerformanceFrequency
(
&
li
);
freq
=
li
.
QuadPart
;
}
QueryPerformanceCounter
(
&
t_cnt
);
return
t_cnt
.
QuadPart
/
freq
*
10000000
+
t_cnt
.
QuadPart
%
freq
*
10000000
/
freq
+
offset
;
#elif defined(__NETWARE__)
NXTime_t
tm
;
NXGetTime
(
NX_SINCE_1970
,
NX_NSECONDS
,
&
tm
);
...
...
sql/handler.cc
View file @
8d1480f7
...
...
@@ -1490,7 +1490,7 @@ int handler::compare_key(key_range *range)
if
(
!
range
)
return
0
;
// No max range
for
(
const
char
*
key
=
range
->
key
,
*
end
=
key
+
range
->
length
;
for
(
const
char
*
key
=
(
const
char
*
)
range
->
key
,
*
end
=
key
+
range
->
length
;
key
<
end
;
key
+=
store_length
,
key_part
++
)
{
...
...
sql/item_geofunc.cc
View file @
8d1480f7
...
...
@@ -697,7 +697,6 @@ longlong Item_func_srid::val_int()
DBUG_ASSERT
(
fixed
==
1
);
String
*
swkb
=
args
[
0
]
->
val_str
(
&
value
);
Geometry_buffer
buffer
;
Geometry
*
geom
;
null_value
=
(
!
swkb
||
!
Geometry
::
create_from_wkb
(
&
buffer
,
...
...
sql/item_strfunc.cc
View file @
8d1480f7
...
...
@@ -2825,9 +2825,9 @@ String *Item_func_uuid::val_str(String *str)
uuid_time
=
tv
;
pthread_mutex_unlock
(
&
LOCK_uuid_generator
);
uint32
time_low
=
tv
&
0xFFFFFFFF
;
uint16
time_mid
=
(
tv
>>
32
)
&
0xFFFF
;
uint16
time_hi_and_version
=
(
tv
>>
48
)
|
UUID_VERSION
;
uint32
time_low
=
(
uint32
)
(
tv
&
0xFFFFFFFF
)
;
uint16
time_mid
=
(
uint16
)
((
tv
>>
32
)
&
0xFFFF
)
;
uint16
time_hi_and_version
=
(
uint16
)
((
tv
>>
48
)
|
UUID_VERSION
)
;
str
->
realloc
(
UUID_LENGTH
+
1
);
str
->
length
(
UUID_LENGTH
);
...
...
sql/opt_range.cc
View file @
8d1480f7
...
...
@@ -2612,12 +2612,12 @@ int QUICK_SELECT::get_next()
if
(
!
(
range
=
it
++
))
DBUG_RETURN
(
HA_ERR_END_OF_FILE
);
// All ranges used
start_key
.
key
=
range
->
min_key
;
start_key
.
key
=
(
const
byte
*
)
range
->
min_key
;
start_key
.
length
=
range
->
min_length
;
start_key
.
flag
=
((
range
->
flag
&
NEAR_MIN
)
?
HA_READ_AFTER_KEY
:
(
range
->
flag
&
EQ_RANGE
)
?
HA_READ_KEY_EXACT
:
HA_READ_KEY_OR_NEXT
);
end_key
.
key
=
range
->
max_key
;
end_key
.
key
=
(
const
byte
*
)
range
->
max_key
;
end_key
.
length
=
range
->
max_length
;
/*
We use READ_AFTER_KEY here because if we are reading on a key
...
...
sql/sql_insert.cc
View file @
8d1480f7
...
...
@@ -121,7 +121,7 @@ int mysql_insert(THD *thd,TABLE_LIST *table_list,
runs without --log-update or --log-bin).
*/
int
log_on
=
DELAYED_LOG_UPDATE
|
DELAYED_LOG_BIN
;
bool
transactional_table
,
log_delayed
,
bulk_insert
;
bool
transactional_table
,
log_delayed
;
uint
value_count
;
ulong
counter
=
1
;
ulonglong
id
;
...
...
sql/sql_lex.cc
View file @
8d1480f7
...
...
@@ -1668,8 +1668,8 @@ TABLE_LIST *st_lex::unlink_first_table(TABLE_LIST *tables,
and from local list if it is not the same
*/
select_lex
.
table_list
.
first
=
((
&
select_lex
!=
all_selects_list
)
?
(
gptr
)
(
*
local_first
)
->
next
:
(
gptr
)
tables
);
(
byte
*
)
(
*
local_first
)
->
next
:
(
byte
*
)
tables
);
(
*
global_first
)
->
next
=
0
;
return
tables
;
}
...
...
@@ -1698,10 +1698,10 @@ TABLE_LIST *st_lex::link_first_table_back(TABLE_LIST *tables,
we do not touch local table 'next' field => we need just
put the table in the list
*/
select_lex
.
table_list
.
first
=
(
gptr
)
local_first
;
select_lex
.
table_list
.
first
=
(
byte
*
)
local_first
;
}
else
select_lex
.
table_list
.
first
=
(
gptr
)
global_first
;
select_lex
.
table_list
.
first
=
(
byte
*
)
global_first
;
return
global_first
;
}
...
...
sql/sql_parse.cc
View file @
8d1480f7
...
...
@@ -2601,11 +2601,11 @@ unsent_create_error:
if
((
result
=
new
select_insert
(
tables
->
table
,
&
lex
->
field_list
,
lex
->
duplicates
)))
/* Skip first table, which is the table we are inserting in */
lex
->
select_lex
.
table_list
.
first
=
(
gptr
)
first_local_table
->
next
;
lex
->
select_lex
.
table_list
.
first
=
(
byte
*
)
first_local_table
->
next
;
lex
->
select_lex
.
resolve_mode
=
SELECT_LEX
::
NOMATTER_MODE
;
res
=
handle_select
(
thd
,
lex
,
result
);
/* revert changes for SP */
lex
->
select_lex
.
table_list
.
first
=
(
gptr
)
first_local_table
;
lex
->
select_lex
.
table_list
.
first
=
(
byte
*
)
first_local_table
;
lex
->
select_lex
.
resolve_mode
=
SELECT_LEX
::
INSERT_MODE
;
if
(
thd
->
net
.
report_error
)
res
=
-
1
;
...
...
@@ -4362,7 +4362,6 @@ static void remove_escape(char *name)
bool
add_to_list
(
THD
*
thd
,
SQL_LIST
&
list
,
Item
*
item
,
bool
asc
)
{
ORDER
*
order
;
Item
**
item_ptr
;
DBUG_ENTER
(
"add_to_list"
);
if
(
!
(
order
=
(
ORDER
*
)
thd
->
alloc
(
sizeof
(
ORDER
))))
DBUG_RETURN
(
1
);
...
...
sql/sql_prepare.cc
View file @
8d1480f7
...
...
@@ -1147,11 +1147,11 @@ static int mysql_test_insert_select(Prepared_statement *stmt,
TABLE_LIST
*
first_local_table
=
(
TABLE_LIST
*
)
lex
->
select_lex
.
table_list
.
first
;
/* Skip first table, which is the table we are inserting in */
lex
->
select_lex
.
table_list
.
first
=
(
gptr
)
first_local_table
->
next
;
lex
->
select_lex
.
table_list
.
first
=
(
uchar
*
)
first_local_table
->
next
;
lex
->
select_lex
.
resolve_mode
=
SELECT_LEX
::
NOMATTER_MODE
;
res
=
select_like_statement_test
(
stmt
,
tables
);
/* revert changes*/
lex
->
select_lex
.
table_list
.
first
=
(
gptr
)
first_local_table
;
lex
->
select_lex
.
table_list
.
first
=
(
uchar
*
)
first_local_table
;
lex
->
select_lex
.
resolve_mode
=
SELECT_LEX
::
INSERT_MODE
;
return
res
;
}
...
...
sql/sql_union.cc
View file @
8d1480f7
...
...
@@ -112,7 +112,6 @@ int st_select_lex_unit::prepare(THD *thd_arg, select_result *sel_result,
SELECT_LEX
*
lex_select_save
=
thd_arg
->
lex
->
current_select
;
SELECT_LEX
*
sl
,
*
first_select
;
select_result
*
tmp_result
;
ORDER
*
tmp_order
;
DBUG_ENTER
(
"st_select_lex_unit::prepare"
);
/*
...
...
@@ -215,7 +214,7 @@ int st_select_lex_unit::prepare(THD *thd_arg, select_result *sel_result,
union_result
->
tmp_table_param
.
field_count
=
types
.
elements
;
if
(
!
(
table
=
create_tmp_table
(
thd_arg
,
&
union_result
->
tmp_table_param
,
types
,
(
ORDER
*
)
0
,
union_distinct
,
1
,
(
ORDER
*
)
0
,
(
bool
)
union_distinct
,
1
,
(
first_select_in_union
()
->
options
|
thd_arg
->
options
|
TMP_TABLE_ALL_COLUMNS
),
...
...
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