<?xml version="1.0" encoding="utf-8"?>
<launchpad-bug id="778915">
  <date_last_updated>2011-05-10 22:37:13.804534+00:00</date_last_updated>
  <api_links>
    <bug_api_link>https://api.launchpad.net/1.0/bugs/778915</bug_api_link>
    <bug_owner_link>https://api.launchpad.net/1.0/~pstoev-askmonty</bug_owner_link>
    <milestone_link>https://api.launchpad.net/1.0/maria/+milestone/5.3</milestone_link>
    <linked_branches_collection_link>https://api.launchpad.net/1.0/bugs/778915/linked_branches</linked_branches_collection_link>
    <activity_link>https://api.launchpad.net/1.0/bugs/778915/activity</activity_link>
  </api_links>
  <bug_web_link>https://bugs.launchpad.net/bugs/778915</bug_web_link>
  <owner>Philip Stoev</owner>
  <assignee>Michael Widenius</assignee>
  <milestone_title>Maria 5.3</milestone_title>
  <duplicate_link></duplicate_link>
  <duplicate_bug_id></duplicate_bug_id>
  <title>Error  &quot;1660 Illegal value used as argument of dynamic column function&quot; is not helpful</title>
  <status>Won't Fix</status>
  <importance>Wishlist</importance>
  <created>2011-05-07 08:23:42.933717+00:00</created>
  <description>
<![CDATA[Error " 1660 Illegal value used as argument of dynamic column function" shows up when one tries to assign two values to the same dynamic column within a single statement. The same operation would be allowed in an INSERT, where the last value would be used. So, either make dynamic columns behave as INSERT, or provide a better error message, e.g. "duplicate field name"

For example:

 SELECT COLUMN_CREATE( 5 , 1 , 5 , 1 ) ;]]>  </description>
  <activities>
    <activity datechanged="2011-05-07T08:23:42.933717+00:00">
      <oldvalue>
<![CDATA[]]>      </oldvalue>
      <newvalue>
<![CDATA[]]>      </newvalue>
      <whatchanged>bug</whatchanged>
      <person>Philip Stoev</person>
      <message>added bug</message>
    </activity>
    <activity datechanged="2011-05-07T08:23:47.900978+00:00">
      <oldvalue>
<![CDATA[]]>      </oldvalue>
      <newvalue>
<![CDATA[5.3]]>      </newvalue>
      <whatchanged>maria: milestone</whatchanged>
      <person>Philip Stoev</person>
      <message></message>
    </activity>
    <activity datechanged="2011-05-07T08:23:53.975200+00:00">
      <oldvalue>
<![CDATA[]]>      </oldvalue>
      <newvalue>
<![CDATA[Michael Widenius (monty)]]>      </newvalue>
      <whatchanged>maria: assignee</whatchanged>
      <person>Philip Stoev</person>
      <message></message>
    </activity>
    <activity datechanged="2011-05-07T08:24:05.293233+00:00">
      <oldvalue>
<![CDATA[]]>      </oldvalue>
      <newvalue>
<![CDATA[lp:~maria-captains/maria/5.3-mwl34]]>      </newvalue>
      <whatchanged>branch linked</whatchanged>
      <person>Philip Stoev</person>
      <message></message>
    </activity>
    <activity datechanged="2011-05-07T08:24:20.222843+00:00">
      <oldvalue>
<![CDATA[Error  1660 Illegal value used as argument of dynamic column function is not exact]]>      </oldvalue>
      <newvalue>
<![CDATA[Error  "1660 Illegal value used as argument of dynamic column function" is not helpful]]>      </newvalue>
      <whatchanged>summary</whatchanged>
      <person>Philip Stoev</person>
      <message></message>
    </activity>
    <activity datechanged="2011-05-07T08:24:38.457588+00:00">
      <oldvalue>
<![CDATA[Error " 1660 Illegal value used as argument of dynamic column function" shows up when one tries to assign two values to the same dynamic column within a single statement. The same operation would be allowed in an INSERT, where the last value would be used. So, either make dynamic columns behave as INSERT, or provide a better error message.


For example:

 SELECT COLUMN_CREATE( 5 , 1 , 5 , 1 ) ;]]>      </oldvalue>
      <newvalue>
<![CDATA[Error " 1660 Illegal value used as argument of dynamic column function" shows up when one tries to assign two values to the same dynamic column within a single statement. The same operation would be allowed in an INSERT, where the last value would be used. So, either make dynamic columns behave as INSERT, or provide a better error message, e.g. "duplicate field name"

For example:

 SELECT COLUMN_CREATE( 5 , 1 , 5 , 1 ) ;]]>      </newvalue>
      <whatchanged>description</whatchanged>
      <person>Philip Stoev</person>
      <message></message>
    </activity>
    <activity datechanged="2011-05-10T22:33:35.736280+00:00">
      <oldvalue>
<![CDATA[Undecided]]>      </oldvalue>
      <newvalue>
<![CDATA[Wishlist]]>      </newvalue>
      <whatchanged>maria: importance</whatchanged>
      <person>Michael Widenius</person>
      <message></message>
    </activity>
    <activity datechanged="2011-05-10T22:33:44.567426+00:00">
      <oldvalue>
<![CDATA[New]]>      </oldvalue>
      <newvalue>
<![CDATA[Won't Fix]]>      </newvalue>
      <whatchanged>maria: status</whatchanged>
      <person>Michael Widenius</person>
      <message></message>
    </activity>
  </activities>
  <comments>
    <comment commentlink="https://api.launchpad.net/1.0/maria/+bug/778915/comments/0" datecreated="2011-05-07T08:23:42.933717+00:00">
      <person>Philip Stoev</person>
      <subject>
<![CDATA[Error  1660 Illegal value used as argument of dynamic column function is not exact]]>      </subject>
      <content>
<![CDATA[Error " 1660 Illegal value used as argument of dynamic column function" shows up when one tries to assign two values to the same dynamic column within a single statement. The same operation would be allowed in an INSERT, where the last value would be used. So, either make dynamic columns behave as INSERT, or provide a better error message.


For example:

 SELECT COLUMN_CREATE( 5 , 1 , 5 , 1 ) ;]]>      </content>
    </comment>
    <comment commentlink="https://api.launchpad.net/1.0/maria/+bug/778915/comments/1" datecreated="2011-05-10T22:33:27.317500+00:00">
      <person>Michael Widenius</person>
      <subject>
<![CDATA[Re: Error  "1660 Illegal value used as argument of dynamic column function" is not helpful]]>      </subject>
      <content>
<![CDATA[This is a restriction of the current implementation. I will for now document this in the manual.
The idea is that in the future it will behave as INSERT in this case.]]>      </content>
    </comment>
    <comment commentlink="https://api.launchpad.net/1.0/maria/+bug/778915/comments/2" datecreated="2011-05-10T22:37:13.564314+00:00">
      <person>Michael Widenius</person>
      <subject>
<![CDATA[Re: Error  "1660 Illegal value used as argument of dynamic column function" is not helpful]]>      </subject>
      <content>
<![CDATA[For now, you can only get the error: "Illegal value used as argument of dynamic column function" if you provide a too big column number (> 65535) or if you have the same column number twice in a COLUMN_CREATE or COLUM_ADD function.]]>      </content>
    </comment>
  </comments>
</launchpad-bug>
