summaryrefslogtreecommitdiff
path: root/sql/share
diff options
context:
space:
mode:
authorunknown <anozdrin/alik@quad.opbmk>2008-03-28 18:59:13 +0300
committerunknown <anozdrin/alik@quad.opbmk>2008-03-28 18:59:13 +0300
commit4ec65151dc8e1b30b05a84c2f3a8bd2b9ce641c6 (patch)
tree3da9187f61f42e5a0993052dfefdd40d9f13e8a6 /sql/share
parent7c156537cc51c42ae58c61f6bb70a307b8216334 (diff)
downloadmariadb-git-4ec65151dc8e1b30b05a84c2f3a8bd2b9ce641c6.tar.gz
Fix for Bug#35469: server crash with LOAD DATA INFILE to a VIEW.
The problem was that LOAD DATA code (sql_load.cc) didn't take into account that there may be items, representing references to other columns. This is a usual case in views. The crash happened because Item_direct_view_ref was casted to Item_user_var_as_out_param, which is not a base class. The fix is to 1) Handle references properly; 2) Ensure that an item is treated as a user variable only when it is a user variable indeed; 3) Report an error if LOAD DATA is used to load data into non-updatable column. mysql-test/r/loaddata.result: Update result file. mysql-test/t/loaddata.test: Add a test case form Bug#35469: server crash with LOAD DATA INFILE to a VIEW. sql/share/errmsg.txt: Introduce a new error. sql/sql_load.cc: Handle reference-items properly. mysql-test/std_data/bug35649.data: Add a data file for the test case.
Diffstat (limited to 'sql/share')
-rw-r--r--sql/share/errmsg.txt4
1 files changed, 4 insertions, 0 deletions
diff --git a/sql/share/errmsg.txt b/sql/share/errmsg.txt
index 9e6cf462113..a3514776d6e 100644
--- a/sql/share/errmsg.txt
+++ b/sql/share/errmsg.txt
@@ -5641,3 +5641,7 @@ ER_NAME_BECOMES_EMPTY
eng "Name '%-.64s' has become ''"
ER_AMBIGUOUS_FIELD_TERM
eng "First character of the FIELDS TERMINATED string is ambiguous; please use non-optional and non-empty FIELDS ENCLOSED BY"
+
+ER_LOAD_DATA_INVALID_COLUMN
+ eng "Invalid column reference (%-.64s) in LOAD DATA"
+