summaryrefslogtreecommitdiff
path: root/sql/table.cc
diff options
context:
space:
mode:
authorbar@mysql.com <>2004-12-07 17:01:46 +0400
committerbar@mysql.com <>2004-12-07 17:01:46 +0400
commit5e597e267099a7b030bfe06005d390ddb333bb20 (patch)
tree7e702ee3a5a1c50ca7216917dc8af88463ecb943 /sql/table.cc
parentc946d4dd7b4170ccce4c638246297584beb50ac8 (diff)
downloadmariadb-git-5e597e267099a7b030bfe06005d390ddb333bb20.tar.gz
#7066 [Ver]: "ctype_ucs" fails on SGI IRIX
Diffstat (limited to 'sql/table.cc')
-rw-r--r--sql/table.cc13
1 files changed, 11 insertions, 2 deletions
diff --git a/sql/table.cc b/sql/table.cc
index 370ad5eff1d..992f6df0401 100644
--- a/sql/table.cc
+++ b/sql/table.cc
@@ -495,8 +495,17 @@ int openfrm(const char *name, const char *alias, uint db_stat, uint prgflag,
char *from, *to;
for (from= to= (char*) interval->type_names[pos]; *from; )
{
- *to++= (char) (hexchar_to_int(*from++) << 4) +
- hexchar_to_int(*from++);
+ /*
+ Note, hexchar_to_int(*from++) doesn't work
+ one some compilers, e.g. IRIX. Looks like a compiler
+ bug in inline functions in combination with arguments
+ that have a side effect. So, let's use from[0] and from[1]
+ and increment 'from' by two later.
+ */
+
+ *to++= (char) (hexchar_to_int(from[0]) << 4) +
+ hexchar_to_int(from[1]);
+ from+= 2;
}
interval->type_lengths[pos] /= 2;
}