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
d5e934d0
Commit
d5e934d0
authored
Nov 17, 2008
by
Kristofer Pettersson
Browse files
Options
Browse Files
Download
Plain Diff
Automerge
parents
66f8501d
9ca6e03b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
2 deletions
+12
-2
sql/sql_class.cc
sql/sql_class.cc
+12
-2
No files found.
sql/sql_class.cc
View file @
d5e934d0
...
@@ -311,7 +311,7 @@ void thd_inc_row_count(THD *thd)
...
@@ -311,7 +311,7 @@ void thd_inc_row_count(THD *thd)
Dumps a text description of a thread, its security context
Dumps a text description of a thread, its security context
(user, host) and the current query.
(user, host) and the current query.
@param thd
current
thread context
@param thd thread context
@param buffer pointer to preferred result buffer
@param buffer pointer to preferred result buffer
@param length length of buffer
@param length length of buffer
@param max_query_len how many chars of query to copy (0 for all)
@param max_query_len how many chars of query to copy (0 for all)
...
@@ -385,7 +385,17 @@ char *thd_security_context(THD *thd, char *buffer, unsigned int length,
...
@@ -385,7 +385,17 @@ char *thd_security_context(THD *thd, char *buffer, unsigned int length,
}
}
if
(
str
.
c_ptr_safe
()
==
buffer
)
if
(
str
.
c_ptr_safe
()
==
buffer
)
return
buffer
;
return
buffer
;
return
thd
->
strmake
(
str
.
ptr
(),
str
.
length
());
/*
We have to copy the new string to the destination buffer because the string
was reallocated to a larger buffer to be able to fit.
*/
DBUG_ASSERT
(
buffer
!=
NULL
);
length
=
min
(
str
.
length
(),
length
-
1
);
memcpy
(
buffer
,
str
.
c_ptr_quick
(),
length
);
/* Make sure that the new string is null terminated */
buffer
[
length
]
=
'\0'
;
return
buffer
;
}
}
/**
/**
...
...
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