Bug #15213 | Unable to insert "whitespace-only" values into a column through Connector/J | ||
---|---|---|---|
Submitted: | 24 Nov 2005 3:26 | Modified: | 29 Nov 2005 9:33 |
Reporter: | Edwin Lee | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | Connector / J | Severity: | S3 (Non-critical) |
Version: | mysql-connector-java-3.1.11 | OS: | Windows (MS Windows XP Professional) |
Assigned to: | Vasily Kishkin | CPU Architecture: | Any |
[24 Nov 2005 3:26]
Edwin Lee
[24 Nov 2005 11:33]
Vasily Kishkin
According to mysql documentation for 4.1 : VARCHAR values are not padded when they are stored. Trailing spaces in MySQL version up to and including 4.1 are removed from values when stored in a VARCHAR column; this also means that the spaces are absent from retrieved values. I would like to know how you inserted whitespace in Query Browser ?
[25 Nov 2005 2:40]
Edwin Lee
This is what i did to insert the whitespace character using MySQL Query Browser: 1. Double-double-click on "testtable" in the Schemata view to bring up the table contents in the Resultset view. 2. Click on "Edit" to enable edit. 3. Double-click on the first row of the TestColumn column of the testtable table in the Resultset view to bring up the caret to start editing the cell. 4. Press "spacebar" and "enter" to insert a whitespace character. 5. Click on "Apply Changes" to commit the change. 6. Click on "Edit" to disable editing. Now, 1. Right-click on the cell that was previously edited, and click on "Copy Row Values" from the popup menu to copy the row value onto clipboard 2. Open notepad and press "Ctrl-v" to "paste" the value from clipboard to notepad. 3. The whitespace character can be seen there. In any case, what i am more interested in, is, how can i programmatically insert a whitespace-character into a MySQL table from a Java application?
[29 Nov 2005 9:33]
Vasily Kishkin
I was not able to insert whitespace in MySQL Query Browser. Only empty string. As fa as I know you are not avaible to insert single whitespace into a table.