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
50183677
Commit
50183677
authored
Jul 23, 2004
by
hf@deer.(none)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Several fixes to make tests working for embedded library
parent
94bfeb83
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
11 deletions
+12
-11
libmysqld/lib_sql.cc
libmysqld/lib_sql.cc
+8
-11
sql/mysqld.cc
sql/mysqld.cc
+2
-0
sql/set_var.cc
sql/set_var.cc
+2
-0
No files found.
libmysqld/lib_sql.cc
View file @
50183677
...
...
@@ -462,14 +462,6 @@ int init_embedded_server(int argc, char **argv, char **groups)
}
}
/*
Update mysqld variables from client variables if set
The client variables are set also by get_one_option() in mysqld.cc
*/
if
(
max_allowed_packet
)
global_system_variables
.
max_allowed_packet
=
max_allowed_packet
;
if
(
net_buffer_length
)
global_system_variables
.
net_buffer_length
=
net_buffer_length
;
return
0
;
}
...
...
@@ -498,18 +490,20 @@ void *create_embedded_thd(int client_flag, char *db)
if
(
thd
->
store_globals
())
{
fprintf
(
stderr
,
"store_globals failed.
\n
"
);
return
NULL
;
goto
err
;
}
thd
->
mysys_var
=
my_thread_var
;
thd
->
dbug_thread_id
=
my_thread_id
();
thd
->
thread_stack
=
(
char
*
)
&
thd
;
/* TODO - add init_connect command execution */
thd
->
proc_info
=
0
;
// Remove 'login'
thd
->
command
=
COM_SLEEP
;
thd
->
version
=
refresh_version
;
thd
->
set_time
();
init_sql_alloc
(
&
thd
->
mem_root
,
8192
,
8192
);
thd
->
init_for_queries
(
);
thd
->
client_capabilities
=
client_flag
;
thd
->
db
=
db
;
...
...
@@ -524,6 +518,9 @@ void *create_embedded_thd(int client_flag, char *db)
thread_count
++
;
return
thd
;
err:
delete
(
thd
);
return
NULL
;
}
#ifdef NO_EMBEDDED_ACCESS_CHECKS
...
...
@@ -629,7 +626,7 @@ bool Protocol::send_fields(List<Item> *list, uint flag)
client_field
->
org_table_length
=
strlen
(
client_field
->
org_table
);
client_field
->
charsetnr
=
server_field
.
charsetnr
;
client_field
->
catalog
=
strdup_root
(
field_alloc
,
"
std
"
);
client_field
->
catalog
=
strdup_root
(
field_alloc
,
"
def
"
);
client_field
->
catalog_length
=
3
;
if
(
INTERNAL_NUM_FIELD
(
client_field
))
...
...
sql/mysqld.cc
View file @
50183677
...
...
@@ -5583,9 +5583,11 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
#ifdef EMBEDDED_LIBRARY
case
OPT_MAX_ALLOWED_PACKET
:
max_allowed_packet
=
atoi
(
argument
);
global_system_variables
.
max_allowed_packet
=
max_allowed_packet
;
break
;
case
OPT_NET_BUFFER_LENGTH
:
net_buffer_length
=
atoi
(
argument
);
global_system_variables
.
net_buffer_length
=
net_buffer_length
;
break
;
#endif
#include <sslopt-case.h>
...
...
sql/set_var.cc
View file @
50183677
...
...
@@ -1129,8 +1129,10 @@ static int check_max_delayed_threads(THD *thd, set_var *var)
static
void
fix_max_connections
(
THD
*
thd
,
enum_var_type
type
)
{
#ifndef EMBEDDED_LIBRARY
resize_thr_alarm
(
max_connections
+
global_system_variables
.
max_insert_delayed_threads
+
10
);
#endif
}
...
...
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