summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorunknown <monty@mysql.com>2004-04-30 14:02:17 +0300
committerunknown <monty@mysql.com>2004-04-30 14:02:17 +0300
commit15c2bb61f505a1ce59894c3c299e533667274860 (patch)
treee1353cabd03b354f8b81634423e6b0e5cb0e54f5 /sql
parentae629fff866dda4e0e3411b0614d0c1efdfb6362 (diff)
downloadmariadb-git-15c2bb61f505a1ce59894c3c299e533667274860.tar.gz
Update 'MYSQL_FIELD->max_length' on mysql_stmt_store_result() (Bug #1647)
Added checking of cut read lines in bootstrap thread (Bug #2874) include/mysql.h: Added length to MYSQL_ROWS to enable sanity checking of packets Update 'MYSQL_FIELD->max_length' on mysql_stmt_store_result() libmysql/libmysql.c: Update 'MYSQL_FIELD->max_length' on mysql_stmt_store_result() (Bug #1647) scripts/fill_help_tables.sh: Added checking of maximum length of line in output (Bug #2874) scripts/mysql_install_db.sh: Added error message if help tables couldn't be done (Bug #2874) sql/sql_parse.cc: Added checking of cut read lines in bootstrap thread (Bug #2874) tests/client_test.c: Added --debug Changed some strange define names Less output Added testing of max_length for prepared statements
Diffstat (limited to 'sql')
-rw-r--r--sql/sql_parse.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc
index 3a3ebc93f51..a69c048a918 100644
--- a/sql/sql_parse.cc
+++ b/sql/sql_parse.cc
@@ -1095,6 +1095,12 @@ extern "C" pthread_handler_decl(handle_bootstrap,arg)
while (fgets(buff, thd->net.max_packet, file))
{
uint length=(uint) strlen(buff);
+ if (buff[length-1]!='\n' && !feof(file))
+ {
+ send_error(thd,ER_NET_PACKET_TOO_LARGE, NullS);
+ thd->is_fatal_error= 1;
+ break;
+ }
while (length && (my_isspace(thd->charset(), buff[length-1]) ||
buff[length-1] == ';'))
length--;