summaryrefslogtreecommitdiff
path: root/sql/sql_acl.cc
diff options
context:
space:
mode:
authorunknown <monty@mysql.com>2004-05-12 00:29:52 +0300
committerunknown <monty@mysql.com>2004-05-12 00:29:52 +0300
commitd3fcd8d4c0e0425433924987afbd5b43bec8e93e (patch)
tree11c75fdf1dd0dbc84178dbfbb39f5a584d19d581 /sql/sql_acl.cc
parent7b4cbde8edeb461ddacdc4d06d33fb8705380f40 (diff)
downloadmariadb-git-d3fcd8d4c0e0425433924987afbd5b43bec8e93e.tar.gz
Don't automaticly generate a new key for a foreign key constraint if there is already a usable key.
Prefer not automatic keys before automatic keys. If there is two conf BitKeeper/etc/ignore: added *.d include/my_base.h: Added flag for automaticly generated key mysql-test/r/constraints.result: Update tests after bug fix mysql-test/r/create.result: Update tests after bug fix mysql-test/r/innodb.result: Added test of automatic creation of foreign keys mysql-test/t/innodb.test: Added test of automatic creation of foreign keys mysql-test/t/key_cache.test: Portability fixes (64 BIT os) sql/sql_acl.cc: Indentation fixes sql/sql_class.cc: Fix key comparison to handle prefix and optionally key segments in different order. sql/sql_class.h: Added flag for automaticly generated keys sql/sql_parse.cc: Added flag for automaticly generated keys sql/sql_table.cc: Don't automaticly generate a new key for a foreign key constraint if there is already a usable key. Prefer not automatic keys before automatic keys. If there is two conflicting automatic keys, prefer the longer one. sql/sql_yacc.yy: Added flag for automaticly generated keys strings/strings-x86.s: Portability fix.
Diffstat (limited to 'sql/sql_acl.cc')
-rw-r--r--sql/sql_acl.cc8
1 files changed, 5 insertions, 3 deletions
diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc
index b2d030b523d..9c7fe3e2993 100644
--- a/sql/sql_acl.cc
+++ b/sql/sql_acl.cc
@@ -1918,7 +1918,8 @@ static int replace_column_table(GRANT_TABLE *g_t,
ulong privileges = xx->rights;
bool old_row_exists=0;
key_restore(table,key,0,key_length);
- table->field[4]->store(xx->column.ptr(),xx->column.length(),&my_charset_latin1);
+ table->field[4]->store(xx->column.ptr(),xx->column.length(),
+ &my_charset_latin1);
if (table->file->index_read(table->record[0],(byte*) table->field[0]->ptr,
0, HA_READ_KEY_EXACT))
@@ -1931,9 +1932,10 @@ static int replace_column_table(GRANT_TABLE *g_t,
continue; /* purecov: inspected */
}
old_row_exists = 0;
- restore_record(table,default_values); // Get empty record
+ restore_record(table,default_values); // Get empty record
key_restore(table,key,0,key_length);
- table->field[4]->store(xx->column.ptr(),xx->column.length(), &my_charset_latin1);
+ table->field[4]->store(xx->column.ptr(),xx->column.length(),
+ &my_charset_latin1);
}
else
{