Bug #40158 | Falcon assertion in StorageInterface::encodeRecord() line 2635 on CREATE TABLE | ||
---|---|---|---|
Submitted: | 19 Oct 2008 20:16 | Modified: | 13 Dec 2008 10:04 |
Reporter: | Philip Stoev | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Falcon storage engine | Severity: | S1 (Critical) |
Version: | 6.0-falcon-team | OS: | Any |
Assigned to: | Lars-Erik Bjørk | CPU Architecture: | Any |
Tags: | F_ENCODING |
[19 Oct 2008 20:16]
Philip Stoev
[29 Oct 2008 15:18]
Kevin Lewis
Lars-Erik, This bug hits the same ASSERT(field) as in Bug#39388: Falcon crashes when doing INSERT if column name in Falcon table contains "" In this case, the problem is the double quotes in the assumed column name; month("2002-08-02") If I change the create table statement to this, it works OK. create table t1 engine=falcon select if(1,'1','0'), month('2002-08-02'); StorageShare::cleanupFieldName() converts month("2002-08-02") to month(""2002-08-02"") From there, I am not sure why the column name is not accepted. Since you looked at this before, maybe you can figure it out.
[29 Oct 2008 15:21]
Ann Harrison
The problem is the double quotes in the month expression create table t1 engine=falcon select if(1,'1','0'), month("2002-08-02"); this statement works correctly: create table t1 engine=falcon select if(1,'1','0'), month('2002-08-02');
[29 Oct 2008 18:07]
Lars-Erik Bjørk
Just looking briefly at this, it does look like the same bug as bug#39388 (as Kevin suggested). The reason it fails (copied from the other bug report) is: "In StorageInterface::mapFields, when populating the fieldMap, before we try to look up the fieldId, we do: storageShare->cleanupFieldName(field->field_name, nameBuffer, sizeof(nameBuffer)); This does, for some reason, add an additional " for every " in the name, turning the "clean" field name into ""name"". This doesn't match with "name" when comparing before (not) inserting into the fieldMap." I will look at it more thoroughly tomorrow, but I reckon it can be closed as a duplicate. However, if it is the same bug, then they probably should have the same Triage and priority?
[5 Nov 2008 10:30]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/57866 2901 lars-erik.bjork@sun.com 2008-11-05 This is a commit for bug#40158 (Falcon assertion in StorageInterface::encodeRecord() line 2635 on CREATE TABLE) The nature of this bug is explained earlier. This patch adds a bool argument to StorageTableShare::cleanupFieldName telling if the function should double the number of quotes or not. So far, StorageInterface::mapFields, is the only place this method is called, passing 'false'. All other places it is called passing 'true'. This will ensure that the parser still gets the expected number of quotes and we are able to look up the fields correctly. I have also added a regression test for this bug, creating - and inserting into - a table with a field name containing quotes.
[5 Nov 2008 12:30]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/57878 2901 lars-erik.bjork@sun.com 2008-11-05 This is a commit for bug#40158 (Falcon assertion in StorageInterface::encodeRecord() line 2635 on CREATE TABLE) The nature of this bug is explained earlier. This patch adds a bool argument to StorageTableShare::cleanupFieldName telling if the function should double the number of quotes or not. So far, StorageInterface::mapFields, is the only place this method is called, passing 'false'. All other places it is called passing 'true'. This will ensure that the parser still gets the expected number of quotes and we are able to look up the fields correctly. I have also added a regression test for this bug, creating - and inserting into - a table with a field name containing quotes.
[5 Nov 2008 12:42]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/57882 2901 lars-erik.bjork@sun.com 2008-11-05 This is a commit for bug#40158 (Falcon assertion in StorageInterface::encodeRecord() line 2635 on CREATE TABLE) The nature of this bug is explained earlier. This patch adds a bool argument to StorageTableShare::cleanupFieldName telling if the function should double the number of quotes or not. So far, StorageInterface::mapFields, is the only place this method is called, passing 'false'. All other places it is called passing 'true'. This will ensure that the parser still gets the expected number of quotes and we are able to look up the fields correctly. I have also added a regression test for this bug, creating - and inserting into - a table with a field name containing quotes. added mysql-test/suite/falcon/r/falcon_bug_40158.result ------------------------------------------------------- Result file for the regression test added mysql-test/suite/falcon/t/falcon_bug_40158.test ----------------------------------------------------- * Regression test, testing differently quoted field names modified storage/falcon/StorageTableShare.cpp --------------------------------------------- * Modified StorageTableShare::cleanupFieldName to handle the new argument. modified storage/falcon/StorageTableShare.h ------------------------------------------- * Added new argument to the signature of StorageTableShare::cleanupFieldName * Made sure that all usages of StorageTableShare::cleanupFieldName passes the new argument modified storage/falcon/ha_falcon.cpp ------------------------------------- * Made sure that all usages of StorageTableShare::cleanupFieldName passes the new argument
[5 Nov 2008 12:44]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/57883 2901 lars-erik.bjork@sun.com 2008-11-05 This is a commit for bug#40158 (Falcon assertion in StorageInterface::encodeRecord() line 2635 on CREATE TABLE) The nature of this bug is explained earlier. This patch adds a bool argument to StorageTableShare::cleanupFieldName telling if the function should double the number of quotes or not. So far, StorageInterface::mapFields, is the only place this method is called, passing 'false'. All other places it is called passing 'true'. This will ensure that the parser still gets the expected number of quotes and we are able to look up the fields correctly. I have also added a regression test for this bug, creating - and inserting into - a table with a field name containing quotes. added mysql-test/suite/falcon/r/falcon_bug_40158.result ------------------------------------------------------- Result file for the regression test added mysql-test/suite/falcon/t/falcon_bug_40158.test ----------------------------------------------------- * Regression test, testing differently quoted field names modified storage/falcon/StorageTableShare.cpp --------------------------------------------- * Modified StorageTableShare::cleanupFieldName to handle the new argument. modified storage/falcon/StorageTableShare.h ------------------------------------------- * Added new argument to the signature of StorageTableShare::cleanupFieldName * Made sure that all usages of StorageTableShare::cleanupFieldName passes the new argument modified storage/falcon/ha_falcon.cpp ------------------------------------- * Made sure that all usages of StorageTableShare::cleanupFieldName passes the new argument
[5 Nov 2008 12:49]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/57885 2901 lars-erik.bjork@sun.com 2008-11-05 This is a commit for bug#40158 (Falcon assertion in StorageInterface::encodeRecord() line 2635 on CREATE TABLE) The nature of this bug is explained earlier. This patch adds a bool argument to StorageTableShare::cleanupFieldName telling if the function should double the number of quotes or not. So far, StorageInterface::mapFields, is the only place this method is called, passing 'false'. All other places it is called passing 'true'. This will ensure that the parser still gets the expected number of quotes and we are able to look up the fields correctly. I have also added a regression test for this bug, creating - and inserting into - a table with a field name containing quotes. added mysql-test/suite/falcon/r/falcon_bug_40158.result ------------------------------------------------------- Result file for the regression test added mysql-test/suite/falcon/t/falcon_bug_40158.test ----------------------------------------------------- * Regression test, testing differently quoted field names modified storage/falcon/StorageTableShare.cpp --------------------------------------------- * Modified StorageTableShare::cleanupFieldName to handle the new argument. modified storage/falcon/StorageTableShare.h ------------------------------------------- * Added new argument to the signature of StorageTableShare::cleanupFieldName * Made sure that all usages of StorageTableShare::cleanupFieldName passes the new argument modified storage/falcon/ha_falcon.cpp ------------------------------------- * Made sure that all usages of StorageTableShare::cleanupFieldName passes the new argument
[5 Nov 2008 14:52]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/57897 2901 lars-erik.bjork@sun.com 2008-11-05 This is a commit for bug#40158 (Falcon assertion in StorageInterface::encodeRecord() line 2635 on CREATE TABLE) The nature of this bug is explained earlier. This patch adds a bool argument to StorageTableShare::cleanupFieldName telling if the function should double the number of quotes or not. So far, StorageInterface::mapFields, is the only place this method is called, passing 'false'. All other places it is called passing 'true'. This will ensure that the parser still gets the expected number of quotes and we are able to look up the fields correctly. I have also added a regression test for this bug, creating - and inserting into - a table with a field name containing quotes. added mysql-test/suite/falcon/r/falcon_bug_40158.result ------------------------------------------------------- Result file for the regression test added mysql-test/suite/falcon/t/falcon_bug_40158.test ----------------------------------------------------- * Regression test, testing differently quoted field names modified storage/falcon/StorageTableShare.cpp --------------------------------------------- * Modified StorageTableShare::cleanupFieldName to handle the new argument. modified storage/falcon/StorageTableShare.h ------------------------------------------- * Added new argument to the signature of StorageTableShare::cleanupFieldName * Made sure that all usages of StorageTableShare::cleanupFieldName passes the new argument modified storage/falcon/ha_falcon.cpp ------------------------------------- * Made sure that all usages of StorageTableShare::cleanupFieldName passes the new argument
[20 Nov 2008 12:55]
Bugs System
Pushed into 6.0.8-alpha (revid:lars-erik.bjork@sun.com-20081105145137-17o6ljadgbmucst0) (version source revid:lars-erik.bjork@sun.com-20081105145137-17o6ljadgbmucst0) (pib:5)
[13 Dec 2008 10:04]
MC Brown
A note has been added to the 6.0.8 changelog: Creating a table, or selecting from a table using the FALCON storage engine and with a double quote in the name would cause an assertion failure.