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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
ee2b8886
Commit
ee2b8886
authored
Feb 20, 2003
by
venu@myvenu.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Windows portabilty fixups (last commit caused some errors, so recomitting) - SCRUM
parent
af9a92cf
Changes
13
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
31 additions
and
29 deletions
+31
-29
libmysqld/lib_sql.cc
libmysqld/lib_sql.cc
+0
-1
libmysqld/libmysqld.c
libmysqld/libmysqld.c
+1
-1
mysys/mf_keycache.c
mysys/mf_keycache.c
+4
-4
sql/filesort.cc
sql/filesort.cc
+0
-1
sql/lex.h
sql/lex.h
+1
-1
sql/mysqld.cc
sql/mysqld.cc
+8
-4
sql/protocol.cc
sql/protocol.cc
+2
-0
sql/sql_class.h
sql/sql_class.h
+0
-4
sql/sql_derived.cc
sql/sql_derived.cc
+1
-1
sql/sql_help.cc
sql/sql_help.cc
+2
-2
sql/sql_parse.cc
sql/sql_parse.cc
+2
-0
sql/sql_yacc.yy
sql/sql_yacc.yy
+4
-4
strings/strto.c
strings/strto.c
+6
-6
No files found.
libmysqld/lib_sql.cc
View file @
ee2b8886
...
...
@@ -468,7 +468,6 @@ uint STDCALL mysql_warning_count(MYSQL *mysql)
void
Protocol_simple
::
prepare_for_resend
()
{
MYSQL_ROWS
*
cur
;
ulong
len
;
MYSQL_DATA
*
result
=
thd
->
mysql
->
result
->
data
;
DBUG_ENTER
(
"send_data"
);
...
...
libmysqld/libmysqld.c
View file @
ee2b8886
...
...
@@ -66,7 +66,7 @@ TYPELIB sql_protocol_typelib = {array_elements(sql_protocol_names_lib)-1,"",
#define closesocket(A) close(A)
#endif
static
void
mysql_once_init
(
void
);
void
mysql_once_init
(
void
);
static
void
end_server
(
MYSQL
*
mysql
);
static
void
append_wild
(
char
*
to
,
char
*
end
,
const
char
*
wild
);
static
ulong
mysql_sub_escape_string
(
CHARSET_INFO
*
charset_info
,
char
*
to
,
...
...
mysys/mf_keycache.c
View file @
ee2b8886
...
...
@@ -676,7 +676,7 @@ static inline void reg_requests(BLOCK_LINK *block, int count)
static
inline
void
unreg_request
(
BLOCK_LINK
*
block
,
int
at_end
)
{
if
(
!
--
block
->
requests
)
link_block
(
block
,
at_end
);
link_block
(
block
,
(
my_bool
)
at_end
);
}
/*
...
...
@@ -1000,7 +1000,7 @@ static BLOCK_LINK *find_key_block(int file, my_off_t filepos,
if
(
block
->
wqueue
[
COND_FOR_SAVED
].
last_thread
)
release_queue
(
&
block
->
wqueue
[
COND_FOR_SAVED
]);
}
link_to_file_list
(
block
,
file
,
block
->
hash_link
?
1
:
0
);
link_to_file_list
(
block
,
file
,
(
my_bool
)(
block
->
hash_link
?
1
:
0
)
);
block
->
status
=
error
?
BLOCK_ERROR
:
0
;
block
->
length
=
0
;
block
->
offset
=
key_cache_block_size
;
...
...
@@ -1150,7 +1150,7 @@ byte *key_cache_read(File file, my_off_t filepos, byte *buff, uint length,
{
/* The requested page is to be read into the block buffer */
read_block
(
block
,
key_cache_block_size
,
read_length
+
offset
,
page_st
==
PAGE_TO_BE_READ
);
(
my_bool
)(
page_st
==
PAGE_TO_BE_READ
)
);
}
else
if
(
!
(
block
->
status
&
BLOCK_ERROR
)
&&
block
->
length
<
read_length
+
offset
)
...
...
@@ -1270,7 +1270,7 @@ int key_cache_write(File file, my_off_t filepos, byte *buff, uint length,
read_block
(
block
,
offset
+
read_length
>=
key_cache_block_size
?
offset
:
key_cache_block_size
,
offset
,
page_st
==
PAGE_TO_BE_READ
);
offset
,
(
my_bool
)(
page_st
==
PAGE_TO_BE_READ
)
);
if
(
!
dont_write
)
{
/* buff has been written to disk at start */
...
...
sql/filesort.cc
View file @
ee2b8886
...
...
@@ -70,7 +70,6 @@ ha_rows filesort(THD *thd, TABLE *table, SORT_FIELD *sortorder, uint s_length,
int
error
;
ulong
memavl
;
uint
maxbuffer
;
uint
i
;
BUFFPEK
*
buffpek
;
ha_rows
records
;
uchar
**
sort_keys
;
...
...
sql/lex.h
View file @
ee2b8886
...
...
@@ -290,7 +290,7 @@ static SYMBOL symbols[] = {
{
"PACK_KEYS"
,
SYM
(
PACK_KEYS_SYM
),
0
,
0
},
{
"PARTIAL"
,
SYM
(
PARTIAL
),
0
,
0
},
{
"PASSWORD"
,
SYM
(
PASSWORD
),
0
,
0
},
{
"POINT"
,
SYM
(
POINT
),
0
,
0
},
{
"POINT"
,
SYM
(
POINT
_SYM
),
0
,
0
},
{
"POLYGON"
,
SYM
(
POLYGON
),
0
,
0
},
{
"PURGE"
,
SYM
(
PURGE
),
0
,
0
},
{
"PRECISION"
,
SYM
(
PRECISION
),
0
,
0
},
...
...
sql/mysqld.cc
View file @
ee2b8886
...
...
@@ -192,7 +192,6 @@ static char szPipeName [ 257 ];
static
SECURITY_ATTRIBUTES
saPipeSecurity
;
static
SECURITY_DESCRIPTOR
sdPipeDescriptor
;
static
HANDLE
hPipe
=
INVALID_HANDLE_VALUE
;
static
bool
opt_enable_named_pipe
=
0
;
#endif
#ifdef __WIN__
static
pthread_cond_t
COND_handler_count
;
...
...
@@ -502,9 +501,11 @@ static bool read_init_file(char *file_name);
#ifdef __NT__
extern
"C"
pthread_handler_decl
(
handle_connections_namedpipes
,
arg
);
#endif
#if !defined(EMBEDDED_LIBRARY)
#ifdef HAVE_SMEM
static
pthread_handler_decl
(
handle_connections_shared_memory
,
arg
);
#endif
#endif
/* EMBEDDED_LIBRARY */
extern
"C"
pthread_handler_decl
(
handle_slave
,
arg
);
#ifdef SET_RLIMIT_NOFILE
static
uint
set_maximum_open_files
(
uint
max_file_limit
);
...
...
@@ -2242,6 +2243,7 @@ static void create_maintenance_thread()
static
void
create_shutdown_thread
()
{
#if !defined(EMBEDDED_LIBRARY)
#ifdef __WIN__
hEventShutdown
=
CreateEvent
(
0
,
FALSE
,
FALSE
,
shutdown_event_name
);
pthread_t
hThread
;
...
...
@@ -2257,6 +2259,7 @@ static void create_shutdown_thread()
if
(
pthread_create
(
&
hThread
,
&
connection_attrib
,
handle_shutdown
,
0
))
sql_print_error
(
"Warning: Can't create thread to handle shutdown requests"
);
#endif
#endif // EMBEDDED_LIBRARY
}
...
...
@@ -2300,6 +2303,7 @@ static void handle_connections_methods()
handler_count
--
;
}
}
#if !defined(EMBEDDED_LIBRARY)
#ifdef HAVE_SMEM
if
(
opt_enable_shared_memory
)
{
...
...
@@ -2311,7 +2315,8 @@ static void handle_connections_methods()
handler_count
--
;
}
}
#endif
#endif
#endif // EMBEDDED_LIBRARY
while
(
handler_count
>
0
)
pthread_cond_wait
(
&
COND_handler_count
,
&
LOCK_thread_count
);
...
...
@@ -2676,11 +2681,10 @@ int main(int argc, char **argv)
static
int
bootstrap
(
FILE
*
file
)
{
THD
*
thd
;
int
error
=
0
;
DBUG_ENTER
(
"bootstrap"
);
#ifndef EMBEDDED_LIBRARY // TODO: Enable this
thd
=
new
THD
;
THD
*
thd
=
new
THD
;
thd
->
bootstrap
=
1
;
thd
->
client_capabilities
=
0
;
my_net_init
(
&
thd
->
net
,(
st_vio
*
)
0
);
...
...
sql/protocol.cc
View file @
ee2b8886
...
...
@@ -55,8 +55,10 @@ inline bool Protocol::convert_str(const char *from, uint length)
void
send_error
(
THD
*
thd
,
uint
sql_errno
,
const
char
*
err
)
{
#ifndef EMBEDDED_LIBRARY
uint
length
;
char
buff
[
MYSQL_ERRMSG_SIZE
+
2
];
#endif
NET
*
net
=
&
thd
->
net
;
DBUG_ENTER
(
"send_error"
);
DBUG_PRINT
(
"enter"
,(
"sql_errno: %d err: %s"
,
sql_errno
,
...
...
sql/sql_class.h
View file @
ee2b8886
...
...
@@ -355,10 +355,6 @@ class select_result;
#define THD_SENTRY_MAGIC 0xfeedd1ff
#define THD_SENTRY_GONE 0xdeadbeef
#ifdef EMBEDDED_LIBRARY
typedef
struct
st_mysql
;
#endif
#define THD_CHECK_SENTRY(thd) DBUG_ASSERT(thd->dbug_sentry == THD_SENTRY_MAGIC)
struct
system_variables
...
...
sql/sql_derived.cc
View file @
ee2b8886
...
...
@@ -71,7 +71,7 @@ int mysql_derived(THD *thd, LEX *lex, SELECT_LEX_UNIT *unit,
select_union
*
derived_result
;
TABLE_LIST
*
tables
=
(
TABLE_LIST
*
)
sl
->
table_list
.
first
;
TMP_TABLE_PARAM
tmp_table_param
;
bool
is_union
=
sl
->
next_select
();
bool
is_union
=
sl
->
next_select
()
?
1
:
0
;
bool
is_subsel
=
sl
->
first_inner_unit
()
?
1
:
0
;
SELECT_LEX_NODE
*
save_current_select
=
lex
->
current_select
;
DBUG_ENTER
(
"mysql_derived"
);
...
...
sql/sql_help.cc
View file @
ee2b8886
...
...
@@ -254,7 +254,7 @@ int get_all_topics_for_category(THD *thd, TABLE *topics, TABLE *relations,
rcat_id
->
get_key_image
(
buff
,
rcat_id
->
pack_length
(),
help_charset
,
Field
::
itRAW
);
int
key_res
=
relations
->
file
->
index_read
(
relations
->
record
[
0
],
buff
,
rcat_id
->
pack_length
(),
(
byte
*
)
buff
,
rcat_id
->
pack_length
(),
HA_READ_KEY_EXACT
);
for
(
;
!
key_res
&&
cat_id
==
(
int16
)
rcat_id
->
val_int
()
;
...
...
@@ -267,7 +267,7 @@ int get_all_topics_for_category(THD *thd, TABLE *topics, TABLE *relations,
field
->
get_key_image
(
topic_id_buff
,
field
->
pack_length
(),
help_charset
,
Field
::
itRAW
);
if
(
!
topics
->
file
->
index_read
(
topics
->
record
[
0
],
topic_id_buff
,
if
(
!
topics
->
file
->
index_read
(
topics
->
record
[
0
],
(
byte
*
)
topic_id_buff
,
field
->
pack_length
(),
HA_READ_KEY_EXACT
))
res
->
push_back
(
get_field
(
&
thd
->
mem_root
,
...
...
sql/sql_parse.cc
View file @
ee2b8886
...
...
@@ -1059,7 +1059,9 @@ bool do_command(THD *thd)
bool
dispatch_command
(
enum
enum_server_command
command
,
THD
*
thd
,
char
*
packet
,
uint
packet_length
)
{
#ifndef EMBEDDED_LIBRARY
int
res
;
#endif
NET
*
net
=
&
thd
->
net
;
bool
error
=
0
;
/*
...
...
sql/sql_yacc.yy
View file @
ee2b8886
...
...
@@ -486,7 +486,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b,int *yystacksize);
%token NOW_SYM
%token PASSWORD
%token POINTFROMTEXT
%token POINT
%token POINT
_SYM
%token POLYFROMTEXT
%token POLYGON
%token POSITION_SYM
...
...
@@ -1146,7 +1146,7 @@ type:
$$=FIELD_TYPE_BLOB; }
| GEOMETRY_SYM { Lex->charset=&my_charset_bin;
$$=FIELD_TYPE_GEOMETRY; }
| POINT
{ Lex->charset=&my_charset_bin;
| POINT
_SYM
{ Lex->charset=&my_charset_bin;
$$=FIELD_TYPE_GEOMETRY; }
| MULTIPOINT { Lex->charset=&my_charset_bin;
$$=FIELD_TYPE_GEOMETRY; }
...
...
@@ -2313,7 +2313,7 @@ simple_expr:
{ $$= new Item_func_password($3); }
| PASSWORD '(' expr ',' expr ')'
{ $$= new Item_func_password($3,$5); }
| POINT '(' expr ',' expr ')'
| POINT
_SYM
'(' expr ',' expr ')'
{ $$= new Item_func_point($3,$5); }
| POINTFROMTEXT '(' expr ')'
{ $$= new Item_func_geometry_from_text($3); }
...
...
@@ -4038,7 +4038,7 @@ keyword:
| PACK_KEYS_SYM {}
| PARTIAL {}
| PASSWORD {}
| POINT
{}
| POINT
_SYM
{}
| POLYGON {}
| PREV_SYM {}
| PROCESS {}
...
...
strings/strto.c
View file @
ee2b8886
...
...
@@ -95,7 +95,7 @@ function (const char *nptr,char **endptr,int base)
s
=
nptr
;
/* Skip white space. */
while
(
my_isspace
(
my_charset_latin1
,
*
s
))
while
(
my_isspace
(
&
my_charset_latin1
,
*
s
))
++
s
;
if
(
*
s
==
'\0'
)
{
...
...
@@ -115,7 +115,7 @@ function (const char *nptr,char **endptr,int base)
}
if
(
base
==
16
&&
s
[
0
]
==
'0'
&&
my_toupper
(
my_charset_latin1
,
s
[
1
])
==
'X'
)
if
(
base
==
16
&&
s
[
0
]
==
'0'
&&
my_toupper
(
&
my_charset_latin1
,
s
[
1
])
==
'X'
)
s
+=
2
;
/* If BASE is zero, figure it out ourselves. */
...
...
@@ -123,7 +123,7 @@ function (const char *nptr,char **endptr,int base)
{
if
(
*
s
==
'0'
)
{
if
(
my_toupper
(
my_charset_latin1
,
s
[
1
])
==
'X'
)
if
(
my_toupper
(
&
my_charset_latin1
,
s
[
1
])
==
'X'
)
{
s
+=
2
;
base
=
16
;
...
...
@@ -145,10 +145,10 @@ function (const char *nptr,char **endptr,int base)
i
=
0
;
for
(
c
=
*
s
;
c
!=
'\0'
;
c
=
*++
s
)
{
if
(
my_isdigit
(
my_charset_latin1
,
c
))
if
(
my_isdigit
(
&
my_charset_latin1
,
c
))
c
-=
'0'
;
else
if
(
my_isalpha
(
my_charset_latin1
,
c
))
c
=
my_toupper
(
my_charset_latin1
,
c
)
-
'A'
+
10
;
else
if
(
my_isalpha
(
&
my_charset_latin1
,
c
))
c
=
my_toupper
(
&
my_charset_latin1
,
c
)
-
'A'
+
10
;
else
break
;
if
(
c
>=
base
)
...
...
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