summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorunknown <monty@mashka.mysql.fi>2002-12-21 10:56:40 +0200
committerunknown <monty@mashka.mysql.fi>2002-12-21 10:56:40 +0200
commit62c7449a5594972f5e940bfdf8785a70f82af82c (patch)
treead383628b0de0a338b83b72a5c8832d3177b18af /sql
parent23362b5cae7acbe00b64980802e8e5e7f9480f7d (diff)
parent5f1b9717c53f19ef4f7a5206f59a7678a025dbe2 (diff)
downloadmariadb-git-62c7449a5594972f5e940bfdf8785a70f82af82c.tar.gz
Merge with 3.23:
Remove duplicate casedn_str() in mysql_change_db() Fix for null handling in CASE innobase/btr/btr0sea.c: Auto merged mysql-test/t/case.test: Auto merged sql/ha_innodb.cc: Auto merged sql/item_cmpfunc.cc: Auto merged mysql-test/r/case.result: merge with 3.23 sql/sql_db.cc: Merge with 3.23 (to remove duplicate casedn_str())
Diffstat (limited to 'sql')
-rw-r--r--sql/ha_innodb.cc9
-rw-r--r--sql/item_cmpfunc.cc3
-rw-r--r--sql/sql_db.cc2
3 files changed, 10 insertions, 4 deletions
diff --git a/sql/ha_innodb.cc b/sql/ha_innodb.cc
index b11c31f1d23..dd718f02ba9 100644
--- a/sql/ha_innodb.cc
+++ b/sql/ha_innodb.cc
@@ -1238,7 +1238,14 @@ ha_innobase::open(
if (primary_key != MAX_KEY) {
fprintf(stderr,
"InnoDB: Error: table %s has no primary key in InnoDB\n"
- "InnoDB: data dictionary, but has one in MySQL!\n", name);
+ "InnoDB: data dictionary, but has one in MySQL!\n"
+ "InnoDB: If you created the table with a MySQL\n"
+ "InnoDB: version < 3.23.54 and did not define a primary\n"
+ "InnoDB: key, but defined a unique key with all non-NULL\n"
+ "InnoDB: columns, then MySQL internally treats that key\n"
+ "InnoDB: as the primary key. You can fix this error by\n"
+ "InnoDB: dump + DROP + CREATE + reimport of the table.\n",
+ name);
}
((row_prebuilt_t*)innobase_prebuilt)
diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc
index 0e7d38ecda8..a36c96ffea4 100644
--- a/sql/item_cmpfunc.cc
+++ b/sql/item_cmpfunc.cc
@@ -727,8 +727,9 @@ String *Item_func_case::val_str(String *str)
null_value=1;
return 0;
}
+ null_value= 0;
if (!(res=item->val_str(str)))
- null_value=1;
+ null_value= 1;
return res;
}
diff --git a/sql/sql_db.cc b/sql/sql_db.cc
index cde0c6cc31f..e805cf74f19 100644
--- a/sql/sql_db.cc
+++ b/sql/sql_db.cc
@@ -383,8 +383,6 @@ bool mysql_change_db(THD *thd,const char *name)
}
send_ok(&thd->net);
x_free(thd->db);
- if (lower_case_table_names)
- casedn_str(dbname);
thd->db=dbname;
thd->db_length=db_length;
thd->db_access=db_access;