summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorunknown <pem@mysql.com>2005-06-03 12:58:23 +0200
committerunknown <pem@mysql.com>2005-06-03 12:58:23 +0200
commit29f3b76f5811ad550ab542d9c12f26db5542b59a (patch)
tree107716156eb142043fbed775e076a5044899762c
parent33992678e21c74b671de1e5ead1d8c6ae6ddaf21 (diff)
parent6de5ae6816ceb682f2856d7d45704d80d75adef8 (diff)
downloadmariadb-git-29f3b76f5811ad550ab542d9c12f26db5542b59a.tar.gz
Merge mysql.com:/usr/local/bk/mysql-5.0
into mysql.com:/home/pem/work/mysql-5.0
-rw-r--r--sql/item.h8
-rw-r--r--sql/sql_yacc.yy6
2 files changed, 8 insertions, 6 deletions
diff --git a/sql/item.h b/sql/item.h
index f2e8e582780..4f5ed9934c5 100644
--- a/sql/item.h
+++ b/sql/item.h
@@ -585,10 +585,12 @@ public:
}
/* For error printing */
- inline void my_name(char **strp, uint *lengthp)
+ inline LEX_STRING *my_name(LEX_STRING *get_name)
{
- *strp= m_name.str;
- *lengthp= m_name.length;
+ if (!get_name)
+ return &m_name;
+ (*get_name)= m_name;
+ return get_name;
}
bool is_splocal() { return 1; } /* Needed for error checking */
diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy
index c0f5d6e296c..2f584bc6b4e 100644
--- a/sql/sql_yacc.yy
+++ b/sql/sql_yacc.yy
@@ -4346,11 +4346,11 @@ simple_expr:
{
if ($3->is_splocal())
{
- LEX_STRING name;
+ LEX_STRING *name;
Item_splocal *il= static_cast<Item_splocal *>($3);
- il->my_name(&name.str, &name.length);
- my_error(ER_WRONG_COLUMN_NAME, MYF(0), name.str);
+ name= il->my_name(NULL);
+ my_error(ER_WRONG_COLUMN_NAME, MYF(0), name->str);
YYABORT;
}
$$= new Item_default_value($3);