To comment on the following update, log in, then open the issue: http://www.openoffice.org/issues/show_bug.cgi?id=115308 Issue #|115308 Summary|Base: Auto-type recognition reads extra line on import Component|Database access Version|OOO330m12 Platform|PC URL| OS/Version|All Status|UNCONFIRMED Status whiteboard| Keywords| Resolution| Issue type|DEFECT Priority|P3 Subcomponent|none Assigned to|dbaneedsconfirm Reported by|yutgor
------- Additional comments from yut...@openoffice.org Fri Oct 29 07:51:11 +0000 2010 ------- Base: Auto-type recognition reads extra line on import When importing into Base a spreadsheet with a header row, if the max lines for auto-type recognition is /x/, OOo actually auto-recognises /x/+1 data rows. This results in incorrect field lengths being set. This problem is attested in the following builds and OS: 1. OOO300m9 on 32-bit Simplified Chinese Windows XP Professional SP3 The error occurs when importing from Calc but not from Excel 2003 SP3. 2. OOO320m12 on Ubuntu 10.04 in Oracle VM VirtualBox 3.2.10 r66523 on 64-bit English Windows Vista Business SP2 The error occurs when importing from Calc. Excel is not available for testing in this OS. 3. OOO320m18 on 64-bit English Windows Vista Business SP2 The error occurs when importing from either Calc or Excel 2007 SP2. 4. OOO330m12 on 32-bit English Windows XP Professional SP3 The error occurs when importing from either Calc or Excel 2003 SP3. This is a regression from a previous build, for although importing from Calc has always been incorrect, at least importing from Excel worked correctly before (OOO300m9) but now doesn't. This may be due to the introduction of the option 'Use first line as column names' in the later builds unmasking an existing bug. Test case: 1. Open the attached .ods file, which contains 4 rows of data of various lengths. 2. Copy all data: a. Place <ctrl-home>. b. Press <ctrl-shift-end>. c. Press <ctrl-c>. 3. Create new database: a. Go to File|New|Database. b. Select 'Create a new database'. c. Click 'Next'. d. Select 'Yes, register...'. e. Check 'Open the database for editing'. f. Uncheck 'Create tables...'. g. Click 'Finish'. h. Type an arbitrary file name. i. Click 'Save'. 4. Set up table: a. Select 'Tables' in the Database panel. b. Right-click in the 'Tables' pane. c. Select 'Paste'. d. Give the table an arbitrary name (or use default). e. Select 'Definition and data'. f. Check or uncheck 'Use first line...' (makes no difference) if this option is available. g. Check or uncheck 'Create primary key'. (Doesn't matter.) h. Click 'Next'. i. Click double right arrows. j. Click 'Next'. 5. Set field types: a. Set max lines for auto-type recognition to 1. b. Click 'Auto'. One would expect 10 is enough for the field length since data 1 only has 3 chars, but the resulting length is actually 70, the length of data 2 rounded up. c. Repeat steps a-b with max lines = 2. Length remains 70. d. Repeat steps a-b with max lines = 3. One would expect the length to be the same (70) since data 3 is even shorter than data 2, but the resulting length is now 130, the rounded up length of data 4. e. Repeat steps a-b with max lines = 4. Length remains 130. f. Repeat steps a-b with max lines = 0. This should not have been allowed as a valid value since it doesn't make sense to 'auto-recognise' anything with zero lines of input. However, Base accepts it and the resulting length is now 10, the length of data 1 rounded up. Repeating the test case with the attached .xls file, which has the same content as the .ods file, yields the same erroneous result in OOO320m18 and OOO330m12 but not in OOO300m9. The above confirms that auto-recognition is reading /x/+1 data rows vs. the expected /x/ and thereby setting incorrect field lengths. --------------------------------------------------------------------- Please do not reply to this automatically generated notification from Issue Tracker. Please log onto the website and enter your comments. http://qa.openoffice.org/issue_handling/project_issues.html#notification --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@dba.openoffice.org For additional commands, e-mail: issues-h...@dba.openoffice.org --------------------------------------------------------------------- To unsubscribe, e-mail: allbugs-unsubscr...@openoffice.org For additional commands, e-mail: allbugs-h...@openoffice.org