1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Merge with 4.0.3

Some simple optimzations, more comments and indentation changes.
Add ` around database in 'use database' in binary log.
Moved max_error_count and max_warning_count to variables struct.
Removed SHOW_WARNS_COUNT and SHOW_ERRORS_COUNT calls.
Changed string functions to use character set of first string argument as default return characterset
(Each string function can change the above assumption if needed)
This commit is contained in:
monty@narttu.mysql.fi
2002-08-30 12:40:40 +03:00
331 changed files with 71904 additions and 4598 deletions

View File

@ -44,7 +44,7 @@ static void unlink_blobs(register TABLE *table);
Resets form->time_stamp if a timestamp value is set
*/
static int
int
check_insert_fields(THD *thd,TABLE *table,List<Item> &fields,
List<Item> &values, ulong counter)
{
@ -1274,10 +1274,11 @@ bool delayed_insert::handle_inserts(void)
***************************************************************************/
int
select_insert::prepare(List<Item> &values)
select_insert::prepare(List<Item> &values, SELECT_LEX_UNIT *u)
{
DBUG_ENTER("select_insert::prepare");
unit= u;
save_time_stamp=table->time_stamp;
if (check_insert_fields(thd,table,*fields,values,1))
DBUG_RETURN(1);
@ -1310,9 +1311,9 @@ select_insert::~select_insert()
bool select_insert::send_data(List<Item> &values)
{
if (thd->offset_limit)
if (unit->offset_limit_cnt)
{ // using limit offset,count
thd->offset_limit--;
unit->offset_limit_cnt--;
return 0;
}
if (fields->elements)
@ -1391,10 +1392,11 @@ bool select_insert::send_eof()
***************************************************************************/
int
select_create::prepare(List<Item> &values)
select_create::prepare(List<Item> &values, SELECT_LEX_UNIT *u)
{
DBUG_ENTER("select_create::prepare");
unit= u;
table=create_table_from_items(thd, create_info, db, name,
extra_fields, keys, &values, &lock);
if (!table)
@ -1424,9 +1426,9 @@ select_create::prepare(List<Item> &values)
bool select_create::send_data(List<Item> &values)
{
if (thd->offset_limit)
if (unit->offset_limit_cnt)
{ // using limit offset,count
thd->offset_limit--;
unit->offset_limit_cnt--;
return 0;
}
fill_record(field,values);