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
1106c26b
Commit
1106c26b
authored
May 06, 2004
by
miguel@hegel.local
Browse files
Options
Browse Files
Download
Plain Diff
Windows VC++ compiler compatibility
parents
510b5d96
a0540f3c
Changes
22
Hide whitespace changes
Inline
Side-by-side
Showing
22 changed files
with
88 additions
and
35 deletions
+88
-35
VC++Files/client/mysqlclient.dsp
VC++Files/client/mysqlclient.dsp
+4
-4
VC++Files/libmysql/libmysql.dsp
VC++Files/libmysql/libmysql.dsp
+4
-0
VC++Files/myisam_ftdump/myisam_ftdump.dsp
VC++Files/myisam_ftdump/myisam_ftdump.dsp
+2
-2
VC++Files/sql/mysqld.dsp
VC++Files/sql/mysqld.dsp
+4
-0
VC++Files/strings/strings.dsp
VC++Files/strings/strings.dsp
+4
-0
innobase/include/os0file.h
innobase/include/os0file.h
+8
-0
innobase/os/os0file.c
innobase/os/os0file.c
+17
-0
innobase/srv/srv0srv.c
innobase/srv/srv0srv.c
+1
-5
libmysql/libmysql.c
libmysql/libmysql.c
+2
-1
mysql-test/r/rpl_server_id2.result
mysql-test/r/rpl_server_id2.result
+1
-0
mysql-test/t/rpl_server_id2.test
mysql-test/t/rpl_server_id2.test
+4
-0
sql/ha_innodb.cc
sql/ha_innodb.cc
+1
-1
sql/handler.h
sql/handler.h
+3
-3
sql/item_cmpfunc.h
sql/item_cmpfunc.h
+2
-1
sql/item_subselect.h
sql/item_subselect.h
+1
-1
sql/set_var.cc
sql/set_var.cc
+1
-1
sql/spatial.h
sql/spatial.h
+1
-1
sql/sql_acl.cc
sql/sql_acl.cc
+3
-3
sql/sql_cache.cc
sql/sql_cache.cc
+1
-1
sql/sql_lex.h
sql/sql_lex.h
+9
-3
sql/sql_prepare.cc
sql/sql_prepare.cc
+11
-7
tests/client_test.c
tests/client_test.c
+4
-1
No files found.
VC++Files/client/mysqlclient.dsp
View file @
1106c26b
...
...
@@ -160,6 +160,10 @@ SOURCE="..\strings\ctype-tis620.c"
# End Source File
# Begin Source File
SOURCE="..\strings\ctype-uca.c"
# End Source File
# Begin Source File
SOURCE="..\strings\ctype-ucs2.c"
# End Source File
# Begin Source File
...
...
@@ -510,10 +514,6 @@ SOURCE=..\strings\strxnmov.c
# End Source File
# Begin Source File
SOURCE=..\strings\strxnmov.c
# End Source File
# Begin Source File
SOURCE=..\mysys\thr_mutex.c
# End Source File
# Begin Source File
...
...
VC++Files/libmysql/libmysql.dsp
View file @
1106c26b
...
...
@@ -179,6 +179,10 @@ SOURCE="..\strings\ctype-tis620.c"
# End Source File
# Begin Source File
SOURCE="..\strings\ctype-uca.c"
# End Source File
# Begin Source File
SOURCE="..\strings\ctype-ucs2.c"
# End Source File
# Begin Source File
...
...
VC++Files/myisam_ftdump/myisam_ftdump.dsp
View file @
1106c26b
...
...
@@ -50,7 +50,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
# ADD LINK32 wsock32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib uuid.lib setargv.obj /nologo /subsystem:console /machine:I386 /out:"../client_release/myisam_ftdump.exe"
# ADD LINK32 wsock32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib uuid.lib setargv.obj
..\lib_release\zlib.lib
/nologo /subsystem:console /machine:I386 /out:"../client_release/myisam_ftdump.exe"
!ELSEIF "$(CFG)" == "myisam_ftdump - Win32 Debug"
...
...
@@ -75,7 +75,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
# ADD LINK32 kernel32.lib user32.lib wsock32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib setargv.obj /nologo /subsystem:console /incremental:no /debug /machine:I386 /out:"../client_debug/myisam_ftdump.exe" /pdbtype:sept
# ADD LINK32 kernel32.lib user32.lib wsock32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib setargv.obj
..\lib_debug\zlib.lib
/nologo /subsystem:console /incremental:no /debug /machine:I386 /out:"../client_debug/myisam_ftdump.exe" /pdbtype:sept
!ENDIF
...
...
VC++Files/sql/mysqld.dsp
View file @
1106c26b
...
...
@@ -218,6 +218,10 @@ SOURCE=.\derror.cpp
# End Source File
# Begin Source File
SOURCE=.\discover.cpp
# End Source File
# Begin Source File
SOURCE=..\libmysql\errmsg.c
# End Source File
# Begin Source File
...
...
VC++Files/strings/strings.dsp
View file @
1106c26b
...
...
@@ -151,6 +151,10 @@ SOURCE=".\ctype-sjis.c"
SOURCE=".\ctype-tis620.c"
# End Source File
# Begin Source File
SOURCE=".\ctype-uca.c"
# End Source File
# Begin Source File
SOURCE=".\ctype-ucs2.c"
# End Source File
...
...
innobase/include/os0file.h
View file @
1106c26b
...
...
@@ -358,6 +358,14 @@ os_file_set_size(
size */
ulint
size_high
);
/* in: most significant 32 bits of size */
/***************************************************************************
Truncates a file at its current position. */
ibool
os_file_set_eof
(
/*============*/
/* out: TRUE if success */
FILE
*
file
);
/* in: file to be truncated */
/***************************************************************************
Flushes the write buffers of a given file to the disk. */
ibool
...
...
innobase/os/os0file.c
View file @
1106c26b
...
...
@@ -1582,6 +1582,23 @@ error_handling:
return
(
FALSE
);
}
/***************************************************************************
Truncates a file at its current position. */
ibool
os_file_set_eof
(
/*============*/
/* out: TRUE if success */
FILE
*
file
)
/* in: file to be truncated */
{
#ifdef __WIN__
HANDLE
h
=
(
HANDLE
)
_get_osfhandle
(
fileno
(
file
));
return
(
SetEndOfFile
(
h
));
#else
/* __WIN__ */
return
(
!
ftruncate
(
fileno
(
file
),
ftell
(
file
)));
#endif
/* __WIN__ */
}
/***************************************************************************
Flushes the write buffers of a given file to the disk. */
...
...
innobase/srv/srv0srv.c
View file @
1106c26b
...
...
@@ -1655,11 +1655,7 @@ loop:
mutex_enter
(
&
srv_monitor_file_mutex
);
rewind
(
srv_monitor_file
);
srv_printf_innodb_monitor
(
srv_monitor_file
);
#ifdef __WIN__
chsize
(
fileno
(
srv_monitor_file
),
ftell
(
srv_monitor_file
));
#else
/* __WIN__ */
ftruncate
(
fileno
(
srv_monitor_file
),
ftell
(
srv_monitor_file
));
#endif
/* __WIN__ */
os_file_set_eof
(
srv_monitor_file
);
mutex_exit
(
&
srv_monitor_file_mutex
);
if
(
srv_print_innodb_tablespace_monitor
...
...
libmysql/libmysql.c
View file @
1106c26b
...
...
@@ -3992,7 +3992,8 @@ my_bool STDCALL mysql_stmt_reset(MYSQL_STMT *stmt)
mysql
=
stmt
->
mysql
->
last_used_con
;
int4store
(
buff
,
stmt
->
stmt_id
);
/* Send stmt id to server */
if
((
*
mysql
->
methods
->
advanced_command
)(
mysql
,
COM_RESET_STMT
,
buff
,
MYSQL_STMT_HEADER
,
0
,
0
,
1
))
if
((
*
mysql
->
methods
->
advanced_command
)(
mysql
,
COM_RESET_STMT
,
buff
,
MYSQL_STMT_HEADER
,
0
,
0
,
0
))
{
set_stmt_errmsg
(
stmt
,
mysql
->
net
.
last_error
,
mysql
->
net
.
last_errno
,
mysql
->
net
.
sqlstate
);
...
...
mysql-test/r/rpl_server_id2.result
View file @
1106c26b
...
...
@@ -20,4 +20,5 @@ select * from t1;
n
1
1
stop slave;
drop table t1;
mysql-test/t/rpl_server_id2.test
View file @
1106c26b
...
...
@@ -18,4 +18,8 @@ insert into t1 values (1);
save_master_pos
;
sync_with_master
;
select
*
from
t1
;
# check that indeed 2 were inserted
# We stop the slave before cleaning up otherwise we'll get
# 'drop table t1' executed twice, so an error in the slave.err
# (not critical).
stop
slave
;
drop
table
t1
;
sql/ha_innodb.cc
View file @
1106c26b
...
...
@@ -4817,7 +4817,7 @@ innodb_show_status(
rewind
(
srv_monitor_file
);
srv_printf_innodb_monitor
(
srv_monitor_file
);
flen
=
ftell
(
srv_monitor_file
);
my_chsize
(
fileno
(
srv_monitor_file
),
flen
,
0
,
MYF
(
0
)
);
os_file_set_eof
(
srv_monitor_file
);
if
(
flen
>
64000
-
1
)
{
flen
=
64000
-
1
;
}
...
...
sql/handler.h
View file @
1106c26b
...
...
@@ -322,11 +322,11 @@ public:
{
return
(
my_errno
=
HA_ERR_WRONG_COMMAND
);
}
virtual
int
handler
::
read_range_first
(
const
key_range
*
start_key
,
virtual
int
read_range_first
(
const
key_range
*
start_key
,
const
key_range
*
end_key
,
bool
sorted
);
virtual
int
handler
::
read_range_next
(
bool
eq_range
);
int
handler
::
compare_key
(
key_range
*
range
);
virtual
int
read_range_next
(
bool
eq_range
);
int
compare_key
(
key_range
*
range
);
virtual
int
ft_init
()
{
return
-
1
;
}
virtual
FT_INFO
*
ft_init_ext
(
uint
flags
,
uint
inx
,
const
byte
*
key
,
uint
keylen
)
...
...
sql/item_cmpfunc.h
View file @
1106c26b
...
...
@@ -96,7 +96,8 @@ protected:
bool
save_cache
;
public:
Item_in_optimizer
(
Item
*
a
,
Item_in_subselect
*
b
)
:
Item_bool_func
(
a
,
(
Item
*
)
b
),
cache
(
0
),
save_cache
(
0
)
{}
Item_bool_func
(
a
,
my_reinterpret_cast
(
Item
*
)(
b
)),
cache
(
0
),
save_cache
(
0
)
{}
bool
fix_fields
(
THD
*
,
struct
st_table_list
*
,
Item
**
);
bool
fix_left
(
THD
*
thd
,
struct
st_table_list
*
tables
,
Item
**
ref
);
bool
is_null
();
...
...
sql/item_subselect.h
View file @
1106c26b
...
...
@@ -140,7 +140,7 @@ public:
void
fix_length_and_dec
();
uint
cols
();
Item
*
el
(
uint
i
)
{
return
(
Item
*
)
row
[
i
]
;
}
Item
*
el
(
uint
i
)
{
return
my_reinterpret_cast
(
Item
*
)(
row
[
i
])
;
}
Item
**
addr
(
uint
i
)
{
return
(
Item
**
)
row
+
i
;
}
bool
check_cols
(
uint
c
);
bool
null_inside
();
...
...
sql/set_var.cc
View file @
1106c26b
...
...
@@ -853,7 +853,7 @@ bool update_sys_var_str(sys_var_str *var_str, rw_lock_t *var_mutex,
uint
new_length
=
(
var
?
var
->
value
->
str_value
.
length
()
:
0
);
if
(
!
old_value
)
old_value
=
(
char
*
)
""
;
if
(
!
(
res
=
my_strdup_with_length
((
byte
*
)
old_value
,
new_length
,
MYF
(
0
))))
if
(
!
(
res
=
my_strdup_with_length
((
byte
*
)
old_value
,
new_length
,
MYF
(
0
))))
return
1
;
/*
Replace the old value in such a way that the any thread using
...
...
sql/spatial.h
View file @
1106c26b
...
...
@@ -217,7 +217,7 @@ public:
if
(
!
(
ci
=
find_class
((
int
)
type_id
)))
return
NULL
;
(
*
ci
->
m_create_func
)((
void
*
)
buffer
);
return
(
Geometry
*
)
buffer
;
return
my_reinterpret_cast
(
Geometry
*
)(
buffer
)
;
}
static
Geometry
*
create_from_wkb
(
Geometry_buffer
*
buffer
,
...
...
sql/sql_acl.cc
View file @
1106c26b
...
...
@@ -2764,9 +2764,9 @@ bool check_grant_column(THD *thd,TABLE *table, const char *name,
if
(
table
->
grant
.
version
!=
grant_version
)
{
table
->
grant
.
grant_table
=
table_hash_search
(
thd
->
host
,
thd
->
ip
,
thd
->
db
,
table_hash_search
(
thd
->
host
,
thd
->
ip
,
table
->
table_cache_key
,
thd
->
priv_user
,
table
->
real_name
,
0
);
/* purecov: inspected */
table
->
real_name
,
0
);
/* purecov: inspected */
table
->
grant
.
version
=
grant_version
;
/* purecov: inspected */
}
if
(
!
(
grant_table
=
table
->
grant
.
grant_table
))
...
...
@@ -3161,7 +3161,7 @@ int mysql_show_grants(THD *thd,LEX_USER *lex_user)
/* Add database access */
for
(
counter
=
0
;
counter
<
acl_dbs
.
elements
;
counter
++
)
{
const
char
*
user
,
*
host
;
const
char
*
user
,
*
host
;
acl_db
=
dynamic_element
(
&
acl_dbs
,
counter
,
ACL_DB
*
);
if
(
!
(
user
=
acl_db
->
user
))
...
...
sql/sql_cache.cc
View file @
1106c26b
...
...
@@ -661,7 +661,7 @@ void query_cache_end_of_result(THD *thd)
if
(
thd
->
net
.
query_cache_query
!=
0
)
// Quick check on unlocked structure
{
#ifdef EMBEDDED_LIBRARY
query_cache_insert
(
&
thd
->
net
,
(
byte
*
)
thd
,
query_cache_insert
(
&
thd
->
net
,
(
char
*
)
thd
,
emb_count_querycache_size
(
thd
));
#endif
STRUCT_LOCK
(
&
query_cache
.
structure_guard_mutex
);
...
...
sql/sql_lex.h
View file @
1106c26b
...
...
@@ -341,12 +341,18 @@ public:
bool
create_total_list
(
THD
*
thd
,
st_lex
*
lex
,
TABLE_LIST
**
result
);
st_select_lex_unit
*
master_unit
();
st_select_lex
*
outer_select
();
st_select_lex
*
first_select
()
{
return
(
st_select_lex
*
)
slave
;
}
st_select_lex
*
first_select
()
{
return
my_reinterpret_cast
(
st_select_lex
*
)(
slave
);
}
st_select_lex
*
first_select_in_union
()
{
return
(
st_select_lex
*
)
slave
;
return
my_reinterpret_cast
(
st_select_lex
*
)(
slave
);
}
st_select_lex_unit
*
next_unit
()
{
return
my_reinterpret_cast
(
st_select_lex_unit
*
)(
next
);
}
st_select_lex_unit
*
next_unit
()
{
return
(
st_select_lex_unit
*
)
next
;
}
st_select_lex
*
return_after_parsing
()
{
return
return_to
;
}
void
exclude_level
();
void
exclude_tree
();
...
...
sql/sql_prepare.cc
View file @
1106c26b
...
...
@@ -1555,18 +1555,20 @@ set_params_data_err:
/*
Reset a prepared statement, in case there was an error in send_longdata.
Note: we don't send any reply to that command.
Reset a prepared statement in case there was a recoverable error.
SYNOPSIS
mysql_stmt_reset()
thd Thread handle
packet Packet with stmt id
DESCRIPTION
This function is useful when one gets an error after calling
mysql_stmt_getlongdata() and wants to reset the handle
so that one can call execute again.
See also bug #1664
This function resets statement to the state it was right after prepare.
It can be used to:
- clear an error happened during mysql_stmt_send_long_data
- cancel long data stream for all placeholders without
having to call mysql_stmt_execute.
Sends 'OK' packet in case of success (statement was reset)
or 'ERROR' packet (unrecoverable error/statement not found/etc).
*/
void
mysql_stmt_reset
(
THD
*
thd
,
char
*
packet
)
...
...
@@ -1577,7 +1579,7 @@ void mysql_stmt_reset(THD *thd, char *packet)
DBUG_ENTER
(
"mysql_stmt_reset"
);
if
(
!
(
stmt
=
find_prepared_statement
(
thd
,
stmt_id
,
"reset"
,
DONT_
SEND_ERROR
)))
if
(
!
(
stmt
=
find_prepared_statement
(
thd
,
stmt_id
,
"reset"
,
SEND_ERROR
)))
DBUG_VOID_RETURN
;
stmt
->
get_longdata_error
=
0
;
...
...
@@ -1587,6 +1589,8 @@ void mysql_stmt_reset(THD *thd, char *packet)
mysql_stmt_send_long_data() call.
*/
reset_stmt_params
(
stmt
);
send_ok
(
thd
);
DBUG_VOID_RETURN
;
}
...
...
tests/client_test.c
View file @
1106c26b
...
...
@@ -163,8 +163,11 @@ MYSQL_STMT *STDCALL
mysql_simple_prepare
(
MYSQL
*
mysql
,
const
char
*
query
)
{
MYSQL_STMT
*
stmt
=
mysql_stmt_init
(
mysql
);
if
(
mysql_stmt_prepare
(
stmt
,
query
,
strlen
(
query
)))
if
(
stmt
&&
mysql_stmt_prepare
(
stmt
,
query
,
strlen
(
query
)))
{
mysql_stmt_close
(
stmt
);
return
0
;
}
return
stmt
;
}
...
...
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