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
b875f790
Commit
b875f790
authored
Jun 20, 2005
by
konstantin@mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix a formatting bug and add a test for it.
parent
43f8b7b4
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
3 deletions
+16
-3
sql/share/errmsg.txt
sql/share/errmsg.txt
+1
-1
sql/sql_prepare.cc
sql/sql_prepare.cc
+1
-1
tests/mysql_client_test.c
tests/mysql_client_test.c
+14
-1
No files found.
sql/share/errmsg.txt
View file @
b875f790
...
...
@@ -5355,6 +5355,6 @@ ER_BINLOG_CREATE_ROUTINE_NEED_SUPER
ER_EXEC_STMT_WITH_OPEN_CURSOR
eng "You can't execute a prepared statement which has an open cursor associated with it. Reset the statement to re-execute it."
ER_STMT_HAS_NO_OPEN_CURSOR
eng "The statement (%
d
) has no open cursor."
eng "The statement (%
lu
) has no open cursor."
ER_COMMIT_NOT_ALLOWED_IN_SF_OR_TRG
eng "Explicit or implicit commit is not allowed in stored function or trigger."
sql/sql_prepare.cc
View file @
b875f790
...
...
@@ -2209,7 +2209,7 @@ void mysql_stmt_fetch(THD *thd, char *packet, uint packet_length)
if
(
!
stmt
->
cursor
||
!
stmt
->
cursor
->
is_open
())
{
my_error
(
ER_STMT_HAS_NO_OPEN_CURSOR
,
MYF
(
0
));
my_error
(
ER_STMT_HAS_NO_OPEN_CURSOR
,
MYF
(
0
)
,
stmt_id
);
DBUG_VOID_RETURN
;
}
...
...
tests/mysql_client_test.c
View file @
b875f790
...
...
@@ -12995,6 +12995,19 @@ static void test_bug9478()
rc
=
mysql_stmt_fetch
(
stmt
);
DIE_UNLESS
(
rc
==
MYSQL_NO_DATA
);
{
char
buff
[
8
];
/* Fill in the fethc packet */
int4store
(
buff
,
stmt
->
stmt_id
);
buff
[
4
]
=
1
;
/* prefetch rows */
rc
=
((
*
mysql
->
methods
->
advanced_command
)(
mysql
,
COM_STMT_FETCH
,
buff
,
sizeof
(
buff
),
0
,
0
,
1
)
||
(
*
mysql
->
methods
->
read_query_result
)(
mysql
));
DIE_UNLESS
(
rc
);
if
(
!
opt_silent
&&
i
==
0
)
printf
(
"Got error (as expected): %s
\n
"
,
mysql_error
(
mysql
));
}
rc
=
mysql_stmt_execute
(
stmt
);
check_execute
(
stmt
,
rc
);
...
...
@@ -13039,7 +13052,7 @@ static void test_bug9478()
/* Fill in the execute packet */
int4store
(
buff
,
stmt
->
stmt_id
);
buff
[
4
]
=
0
;
/* Flag */
int4store
(
buff
+
5
,
1
);
/* Re
turn 1 row
*/
int4store
(
buff
+
5
,
1
);
/* Re
served for array bind
*/
rc
=
((
*
mysql
->
methods
->
advanced_command
)(
mysql
,
COM_STMT_EXECUTE
,
buff
,
sizeof
(
buff
),
0
,
0
,
1
)
||
(
*
mysql
->
methods
->
read_query_result
)(
mysql
));
...
...
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