Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

selecting long strings fails #4

Closed
JohannesMunk opened this issue May 17, 2015 · 1 comment
Closed

selecting long strings fails #4

JohannesMunk opened this issue May 17, 2015 · 1 comment

Comments

@JohannesMunk
Copy link

In some cases, as soon as a selected string is longer than 72 characters, only 64 characters are returned correctly.

Example 1:

CREATE TABLE A (U TEXT);
CREATE INDEX I ON A (U);

INSERT INTO A VALUES('ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789ABCDEFIJKLM');
SELECT * FROM A;
-- returns:
-- ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789AB,
--                                                                 ��;�A�

Example 2:

CREATE TABLE ABCDEFG (HIJKLMN TEXT, OPQRSTU INT NOT NULL, VWXYZABCD TEXT);
SELECT type,name,sql,tbl_name FROM sqlite_master 
UNION SELECT type,name,sql,tbl_name FROM sqlite_temp_master;
-- returns:
-- table|ABCDEFG|CREATE TABLE ABCDEFG (HIJKLMN TEXT, OPQRSTU INT NOT NULL, VWXYZAT\�:|ABCDEFG

-- Fun fact: Using UNION ALL instead of UNION works.
SELECT type,name,sql,tbl_name FROM sqlite_master 
UNION ALL SELECT type,name,sql,tbl_name FROM sqlite_temp_master;
-- returns:
-- table|ABCDEFG|CREATE TABLE ABCDEFG (HIJKLMN TEXT, OPQRSTU INT NOT NULL, VWXYZABCD TEXT)|ABCDEFG
@hyc
Copy link
Contributor

hyc commented Jun 3, 2015

Dup of issue #1

@hyc hyc closed this as completed Jun 3, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants