summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorunknown <monty@tik.mysql.fi>2001-06-11 15:01:28 +0300
committerunknown <monty@tik.mysql.fi>2001-06-11 15:01:28 +0300
commit765940cb3abccdbfe9e43f2c1116d1e96eb27ae9 (patch)
tree22274a6ce372c9763e3a9527f8e8dc0cb5548381 /sql
parent14289d42edec950a6cc9f3db1e242cf8595e207d (diff)
downloadmariadb-git-765940cb3abccdbfe9e43f2c1116d1e96eb27ae9.tar.gz
Changed compare in MyISAM to use my_pread()
Fixed that @VAR shows all decimals Fixed problem with FLUSH TABLES and LOCK TABLE CREATE ... SELECT now creates keys later Reset AUTO_INCREMENT order if droping AUTO_INCREMENT key Docs/manual.texi: Added MySQL/PostgreSQL comparison isam/_dynrec.c: Fixed wrong compare (not used in MySQL) myisam/mi_dynrec.c: Fixed wrong compare (not used in MySQL). Changed compare to use my_pread() myisam/mi_packrec.c: cleanup mysql-test/r/alter_table.result: Added test for ALTER TABLE mysql-test/r/variables.result: Added test for variables with REAL values. mysql-test/t/alter_table.test: Added test for ALTER TABLE mysql-test/t/variables.test: Added test for variables with REAL values. mysys/my_pread.c: Cleanup sql-bench/Makefile.am: removed extra \ sql-bench/README: Fixed typo. sql/item_func.cc: Fixed that @VAR shows all decimals sql/share/swedish/errmsg.OLD: update sql/sql_base.cc: Fixed problem with FLUSH TABLES and LOCK TABLE sql/sql_insert.cc: CREATE ... SELECT now creates keys later sql/sql_table.cc: Reset AUTO_INCREMENT order if droping AUTO_INCREMENT key. BitKeeper/etc/ignore: Added sql-bench/graph-compare-results to the ignore list BitKeeper/etc/logging_ok: Logging to logging@openlogging.org accepted
Diffstat (limited to 'sql')
-rw-r--r--sql/item_func.cc2
-rw-r--r--sql/share/swedish/errmsg.OLD3
-rw-r--r--sql/sql_base.cc3
-rw-r--r--sql/sql_insert.cc1
-rw-r--r--sql/sql_table.cc9
5 files changed, 17 insertions, 1 deletions
diff --git a/sql/item_func.cc b/sql/item_func.cc
index 84bc972608e..8a2bd15ae6d 100644
--- a/sql/item_func.cc
+++ b/sql/item_func.cc
@@ -1758,7 +1758,7 @@ Item_func_get_user_var::val_str(String *str)
return NULL;
switch (entry->type) {
case REAL_RESULT:
- str->set(*(double*) entry->value);
+ str->set(*(double*) entry->value,decimals);
break;
case INT_RESULT:
str->set(*(longlong*) entry->value);
diff --git a/sql/share/swedish/errmsg.OLD b/sql/share/swedish/errmsg.OLD
index 672ce97c575..fc26a08e9ee 100644
--- a/sql/share/swedish/errmsg.OLD
+++ b/sql/share/swedish/errmsg.OLD
@@ -206,3 +206,6 @@
"Kunde inte starta en tråd för replikering",
"Användare '%-.64s' har redan 'max_user_connections' aktiva inloggningar",
"Du kan endast använda konstant-uttryck med SET",
+"Lock wait timeout exceeded",
+"The total number of locks exceeds the lock table size",
+"Update locks cannot be acquired during a READ UNCOMMITTED transaction",
diff --git a/sql/sql_base.cc b/sql/sql_base.cc
index d9470ee0b59..d068dd500bc 100644
--- a/sql/sql_base.cc
+++ b/sql/sql_base.cc
@@ -389,6 +389,9 @@ bool close_cached_tables(THD *thd, bool if_wait_for_refresh,
thd->in_lock_tables=1;
result=reopen_tables(thd,1,1);
thd->in_lock_tables=0;
+ /* Set version for table */
+ for (TABLE *table=thd->open_tables; table ; table=table->next)
+ table->version=refresh_version;
}
VOID(pthread_mutex_unlock(&LOCK_open));
if (if_wait_for_refresh)
diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc
index cfd16df5d17..14f4a732eac 100644
--- a/sql/sql_insert.cc
+++ b/sql/sql_insert.cc
@@ -1362,6 +1362,7 @@ select_create::prepare(List<Item> &values)
if (info.handle_duplicates == DUP_IGNORE ||
info.handle_duplicates == DUP_REPLACE)
table->file->extra(HA_EXTRA_IGNORE_DUP_KEY);
+ table->file->deactivate_non_unique_index((ha_rows) 0);
DBUG_RETURN(0);
}
diff --git a/sql/sql_table.cc b/sql/sql_table.cc
index 3fa2bc5d9d3..207f9dd324d 100644
--- a/sql/sql_table.cc
+++ b/sql/sql_table.cc
@@ -1233,7 +1233,16 @@ int mysql_alter_table(THD *thd,char *new_db, char *new_name,
{
if (drop->type == Alter_drop::COLUMN &&
!my_strcasecmp(field->field_name, drop->name))
+ {
+ /* Reset auto_increment value if it was dropped */
+ if (MTYP_TYPENR(field->unireg_check) == Field::NEXT_NUMBER &&
+ !(create_info->used_fields & HA_CREATE_USED_AUTO))
+ {
+ create_info->auto_increment_value=0;
+ create_info->used_fields|=HA_CREATE_USED_AUTO;
+ }
break;
+ }
}
if (drop)
{