mirror of
https://github.com/MariaDB/server.git
synced 2025-07-04 01:23:45 +03:00
Fix of error messages with big help of serg
This commit is contained in:
@ -33,6 +33,6 @@ SET timestamp=default;
|
||||
create table t1 (p point not null default if(unix_timestamp()>10,POINT(1,1),LineString(Point(0,0),Point(1,1))));
|
||||
set timestamp=10;
|
||||
alter table t1 add column i int;
|
||||
ERROR 22007: Incorrect POINT value: 'GEOMETRYCOLLECTION' for column `test`.`(temporary)`.`p` at row 1
|
||||
ERROR 22007: Incorrect POINT value: 'GEOMETRYCOLLECTION' for column `test`.`t1`.`p` at row 1
|
||||
drop table t1;
|
||||
SET timestamp=default;
|
||||
|
@ -795,7 +795,7 @@ SET timestamp=default;
|
||||
create table t1 (p point not null default if(unix_timestamp()>10,POINT(1,1),LineString(Point(0,0),Point(1,1)))) ENGINE=innodb;
|
||||
set timestamp=10;
|
||||
alter table t1 add column i int;
|
||||
ERROR 22007: Incorrect POINT value: 'GEOMETRYCOLLECTION' for column `test`.`(temporary)`.`p` at row 1
|
||||
ERROR 22007: Incorrect POINT value: 'GEOMETRYCOLLECTION' for column `test`.`t1`.`p` at row 1
|
||||
drop table t1;
|
||||
SET timestamp=default;
|
||||
CREATE OR REPLACE TABLE t1 (a INT) ENGINE=InnoDB;
|
||||
|
@ -9695,7 +9695,7 @@ do_continue:;
|
||||
thd->create_and_open_tmp_table(new_db_type, &frm,
|
||||
alter_ctx.get_tmp_path(),
|
||||
alter_ctx.new_db.str,
|
||||
alter_ctx.tmp_name.str,
|
||||
alter_ctx.new_name.str,
|
||||
false, true)))
|
||||
goto err_new_table_cleanup;
|
||||
|
||||
|
@ -5034,18 +5034,15 @@ new_clustered_failed:
|
||||
goto err_exit;
|
||||
}
|
||||
|
||||
size_t dblen = ctx->old_table->name.dblen() + 1;
|
||||
size_t tablen = altered_table->s->table_name.length;
|
||||
size_t prefixlen= strlen(mysql_data_home) + 1;
|
||||
size_t tablen = altered_table->s->path.length - prefixlen;
|
||||
const char* part = ctx->old_table->name.part();
|
||||
size_t partlen = part ? strlen(part) : 0;
|
||||
char* new_table_name = static_cast<char*>(
|
||||
mem_heap_alloc(ctx->heap,
|
||||
dblen + tablen + partlen + 1));
|
||||
memcpy(new_table_name, ctx->old_table->name.m_name, dblen);
|
||||
memcpy(new_table_name + dblen,
|
||||
altered_table->s->table_name.str, tablen);
|
||||
memcpy(new_table_name + dblen + tablen,
|
||||
part ? part : "", partlen + 1);
|
||||
mem_heap_alloc(ctx->heap, tablen + partlen + 1));
|
||||
memcpy(new_table_name,
|
||||
altered_table->s->path.str + prefixlen, tablen);
|
||||
memcpy(new_table_name + tablen, part ? part : "", partlen + 1);
|
||||
ulint n_cols = 0;
|
||||
ulint n_v_cols = 0;
|
||||
dtuple_t* defaults;
|
||||
|
Reference in New Issue
Block a user