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
ef74d8d8
Commit
ef74d8d8
authored
Jan 06, 2005
by
monty@mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed a bug in prepared statements error handling
After merge fixes
parent
bda0a781
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
16 additions
and
8 deletions
+16
-8
libmysql/libmysql.c
libmysql/libmysql.c
+4
-3
mysql-test/r/delayed.result
mysql-test/r/delayed.result
+3
-0
mysql-test/t/delayed.test
mysql-test/t/delayed.test
+3
-1
sql/sql_base.cc
sql/sql_base.cc
+4
-2
sql/sql_prepare.cc
sql/sql_prepare.cc
+2
-2
No files found.
libmysql/libmysql.c
View file @
ef74d8d8
...
...
@@ -1864,12 +1864,13 @@ void set_stmt_errmsg(MYSQL_STMT * stmt, const char *err, int errcode,
my_bool
cli_read_prepare_result
(
MYSQL
*
mysql
,
MYSQL_STMT
*
stmt
)
{
uchar
*
pos
;
uint
field_count
,
param_count
,
packet_length
;
uint
field_count
,
param_count
;
ulong
packet_length
;
MYSQL_DATA
*
fields_data
;
DBUG_ENTER
(
"read_prepare_result"
);
DBUG_ENTER
(
"
cli_
read_prepare_result"
);
mysql
=
mysql
->
last_used_con
;
if
((
packet_length
=
net_safe_read
(
mysql
))
==
packet_error
)
if
((
packet_length
=
net_safe_read
(
mysql
))
==
packet_error
)
DBUG_RETURN
(
1
);
mysql
->
warning_count
=
0
;
...
...
mysql-test/r/delayed.result
View file @
ef74d8d8
...
...
@@ -22,6 +22,9 @@ insert delayed into t1 values (null,"c");
insert delayed into t1 values (3,"d"),(null,"e");
insert delayed into t1 values (3,"this will give an","error");
ERROR 21S01: Column count doesn't match value count at row 1
show status like 'not_flushed_delayed_rows';
Variable_name Value
Not_flushed_delayed_rows 0
select * from t1;
a b
1 b
...
...
mysql-test/t/delayed.test
View file @
ef74d8d8
...
...
@@ -31,6 +31,8 @@ insert delayed into t1 values (null,"c");
insert
delayed
into
t1
values
(
3
,
"d"
),(
null
,
"e"
);
--
error
1136
insert
delayed
into
t1
values
(
3
,
"this will give an"
,
"error"
);
--
sleep
2
# 2 was not enough for --ps-protocol
--
sleep
4
show
status
like
'not_flushed_delayed_rows'
;
select
*
from
t1
;
drop
table
t1
;
sql/sql_base.cc
View file @
ef74d8d8
...
...
@@ -2323,8 +2323,10 @@ find_field_in_tables(THD *thd, Item_ident *item, TABLE_LIST *tables,
bool
found_table
=
0
;
for
(;
tables
;
tables
=
tables
->
next_local
)
{
/* TODO; Ensure that db and tables->db always points to something ! */
if
(
!
my_strcasecmp
(
table_alias_charset
,
tables
->
alias
,
table_name
)
&&
(
!
db
||
!
tables
->
db
||
!
tables
->
db
[
0
]
||
!
strcmp
(
db
,
tables
->
db
)))
(
!
db
||
!
db
[
0
]
||
!
tables
->
db
||
!
tables
->
db
[
0
]
||
!
strcmp
(
db
,
tables
->
db
)))
{
found_table
=
1
;
Field
*
find
=
find_field_in_table
(
thd
,
tables
,
name
,
item
->
name
,
...
...
@@ -3039,7 +3041,7 @@ insert_fields(THD *thd, TABLE_LIST *tables, const char *db_name,
iterator
=
&
view_iter
;
view
=
1
;
alias_used
=
my_strcasecmp
(
table_alias_charset
,
tables
->
real
_name
,
tables
->
alias
);
tables
->
table
_name
,
tables
->
alias
);
}
else
{
...
...
sql/sql_prepare.cc
View file @
ef74d8d8
...
...
@@ -935,7 +935,7 @@ static bool mysql_test_insert(Prepared_statement *stmt,
{
my_error
(
ER_ILLEGAL_HA
,
MYF
(
0
),
(
table_list
->
view
?
table_list
->
view_name
.
str
:
table_list
->
real
_name
));
table_list
->
table
_name
));
goto
error
;
}
while
((
values
=
its
++
))
...
...
@@ -1445,7 +1445,7 @@ static bool mysql_insert_select_prepare_tester(THD *thd)
and item_list belong to SELECT
*/
first_select
->
resolve_mode
=
SELECT_LEX
::
SELECT_MODE
;
mysql_insert_select_prepare
(
thd
);
return
mysql_insert_select_prepare
(
thd
);
}
...
...
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