1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

Merge 10.2 into 10.3

This commit is contained in:
Marko Mäkelä
2018-04-24 20:59:57 +03:00
101 changed files with 705 additions and 257 deletions

View File

@@ -1,5 +1,5 @@
/* Copyright (c) 2000, 2015, Oracle and/or its affiliates.
Copyright (c) 2008, 2016, MariaDB
/* Copyright (c) 2000, 2017, Oracle and/or its affiliates.
Copyright (c) 2008, 2018, MariaDB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -3539,7 +3539,7 @@ partititon_err:
table TABLE object to free
*/
int closefrm(register TABLE *table)
int closefrm(TABLE *table)
{
int error=0;
DBUG_ENTER("closefrm");
@@ -3576,7 +3576,7 @@ int closefrm(register TABLE *table)
/* Deallocate temporary blob storage */
void free_blobs(register TABLE *table)
void free_blobs(TABLE *table)
{
uint *ptr, *end;
for (ptr= table->s->blob_field, end=ptr + table->s->blob_fields ;
@@ -4195,7 +4195,7 @@ Table_check_intact::check(TABLE *table, const TABLE_FIELD_DEF *table_def)
/* Whether the table definition has already been validated. */
if (table->s->table_field_def_cache == table_def)
DBUG_RETURN(FALSE);
goto end;
if (table->s->fields != table_def->count)
{
@@ -4228,6 +4228,8 @@ Table_check_intact::check(TABLE *table, const TABLE_FIELD_DEF *table_def)
is backward compatible.
*/
}
else
{
StringBuffer<1024> sql_type(system_charset_info);
sql_type.extra_allocation(256); // Allocate min 256 characters at once
for (i=0 ; i < table_def->count; i++, field_def++)
@@ -4313,6 +4315,7 @@ Table_check_intact::check(TABLE *table, const TABLE_FIELD_DEF *table_def)
error= TRUE;
}
}
}
if (table_def->primary_key_parts)
{
@@ -4357,6 +4360,16 @@ Table_check_intact::check(TABLE *table, const TABLE_FIELD_DEF *table_def)
if (! error)
table->s->table_field_def_cache= table_def;
end:
if (has_keys && !error && !table->key_info)
{
report_error(0, "Incorrect definition of table %s.%s: "
"indexes are missing",
table->s->db.str, table->alias.c_ptr());
error= TRUE;
}
DBUG_RETURN(error);
}