mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Fixed error found during review of new pushed code
client/mysql.cc: Don't use c_ptr() for cgets() and ensure buffer is not overwritten mysql-test/r/cast.result: More test for CAST(0x.... as signed) sql/opt_sum.cc: Fix bugs found during review - Changed code to be able to remove one if - Ensure that count == 0 only if is_exact_count == TRUE sql/sql_delete.cc: Ensure 'allow_sum_func' is reset before call to setup_conds sql/sql_lex.cc: allow_sum_func doesn't have to be reset for each query (It's to be reset in setup_fields() or before call to setup_conds() sql/sql_load.cc: Move set of auto_increment_field_not_null so that it's not set if field value is NULL sql/sql_prepare.cc: allow_sum_func doesn't have to be reset for each query (It's to be reset in setup_fields() or before call to setup_conds() sql/sql_update.cc: Ensure 'allow_sum_func' is reset before call to setup_conds
This commit is contained in:
@ -993,13 +993,13 @@ static int read_lines(bool execute_commands)
|
||||
unsigned long clen;
|
||||
do
|
||||
{
|
||||
line= my_cgets(tmpbuf.c_ptr(), tmpbuf.alloced_length(), &clen);
|
||||
line= my_cgets(tmpbuf.ptr(), tmpbuf.alloced_length()-1, &clen);
|
||||
buffer.append(line, clen);
|
||||
/*
|
||||
if we got buffer fully filled than there is a chance that
|
||||
something else is still in console input buffer
|
||||
*/
|
||||
} while (tmpbuf.alloced_length() <= clen + 1);
|
||||
} while (tmpbuf.alloced_length() <= clen);
|
||||
line= buffer.c_ptr();
|
||||
#else /* OS2 */
|
||||
buffer.length(0);
|
||||
|
Reference in New Issue
Block a user