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
dc66c88b
Commit
dc66c88b
authored
Apr 18, 2007
by
msvensson@pilot.blaudden
Browse files
Options
Browse Files
Download
Plain Diff
Merge pilot.blaudden:/home/msvensson/mysql/mysql-5.0-maint
into pilot.blaudden:/home/msvensson/mysql/mysql-5.1-maint
parents
4ca2b73f
a8a8c8c1
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
9 deletions
+19
-9
client/mysqltest.c
client/mysqltest.c
+19
-9
No files found.
client/mysqltest.c
View file @
dc66c88b
...
...
@@ -1329,23 +1329,31 @@ void var_set(const char *var_name, const char *var_name_end,
DBUG_VOID_RETURN
;
}
void
var_set_string
(
const
char
*
name
,
const
char
*
value
)
{
var_set
(
name
,
name
+
strlen
(
name
),
value
,
value
+
strlen
(
value
));
}
void
var_set_int
(
const
char
*
name
,
int
value
)
{
char
buf
[
21
];
snprintf
(
buf
,
sizeof
(
buf
),
"%d"
,
value
);
var_set_string
(
name
,
buf
);
}
/*
Store an integer (typically the returncode of the last SQL)
statement in the mysqltest builtin variable $mysql_errno, by
simulating of a user statement "let $mysql_errno= <integer>"
statement in the mysqltest builtin variable $mysql_errno
*/
void
var_set_errno
(
int
sql_errno
)
{
/* TODO MASV make easier */
const
char
*
var_name
=
"$mysql_errno"
;
char
var_val
[
21
];
uint
length
=
my_sprintf
(
var_val
,
(
var_val
,
"%d"
,
sql_errno
));
var_set
(
var_name
,
var_name
+
12
,
var_val
,
var_val
+
length
);
return
;
var_set_int
(
"$mysql_errno"
,
sql_errno
);
}
/*
Set variable from the result of a query
...
...
@@ -6011,6 +6019,8 @@ int main(int argc, char **argv)
1024
,
0
,
0
,
get_var_key
,
var_free
,
MYF
(
0
)))
die
(
"Variable hash initialization failed"
);
var_set_string
(
"$MYSQL_SERVER_VERSION"
,
MYSQL_SERVER_VERSION
);
memset
(
&
master_pos
,
0
,
sizeof
(
master_pos
));
parser
.
current_line
=
parser
.
read_lines
=
0
;
...
...
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