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

Warning: unpack(): Type l: not enough input #35

Open
penfold45 opened this issue Oct 22, 2014 · 5 comments · May be fixed by #47
Open

Warning: unpack(): Type l: not enough input #35

penfold45 opened this issue Oct 22, 2014 · 5 comments · May be fixed by #47
Assignees

Comments

@penfold45
Copy link

Hi I just pulled the latest version of dev-master and I now get this error

Warning: unpack(): Type l: not enough input, need 4, have 0 in vendor/evseevnn/php-cassandra-binary/src/Protocol/Response/DataStream.php on line 77

When I run a pretty simple CQL query

SELECT * FROM basket WHERE global_id = :global_id AND tag = :tag ORDER BY id,hotel_id, room_id

I tried to debug it but got a bit lost in what is going on in there.

@LarsFronius
Copy link
Collaborator

Thanks for opening the issue.
Can you tell me what data types you have inserted and also what data was inserted so I can write a regression test and patch?

@penfold45
Copy link
Author

Hi yeh there is no data at all. It is empty and the structure is

CREATE TABLE basket (                                                                                                                                                                                                                                          
                 id uuid,                                                                                                                                                                                                                                                      
                 tag text,                                                                                                                                                                                                                                                
                 global_id text,                                                                                                                                                                                                                                               
                 hotel_id int,                                                                                                                                                                                                                                                 
                 room_id int,                                                                                                                                                                                                                                                  
                 date_from text,                                                                                                                                                                                                                                               
                 date_to text,                                                                                                                                                                                                                                                 
                 adults int,                                                                                                                                                                                                                                                   
                 number_of_children int,                                                                                                                                                                                                                                                                                                                                                                                                                                                                               
                 PRIMARY KEY ( (tag, global_id), id, hotel_id, room_id, date_from, date_to)

@LarsFronius
Copy link
Collaborator

It's true, that there are issues with empty fields. Check #33 as well.
I'm gonna check for your case what is going on.

@andreassolberg
Copy link

I'm getting the same error, with a very simple query:

$data = $database->query('SELECT * FROM "client" WHERE "id" = :id', ['id' => 'a5b9491e-372d-49d9-943c-63d40dcb67f4']);

I am getting the data I need, but I get this warning:

Warning: unpack(): Type l: not enough input, need 4, have 1 in /var/www/cassa/vendor/evseevnn/php-cassandra-binary/src/Protocol/Response/DataStream.php on line 77

@andreassolberg
Copy link

I've found the cause of this issue. It is introduced in 6f1cae9

Please revert this patch. Until then I have to rely on:

    "require": {
        "evseevnn/php-cassandra-binary": "dev-master#31fa28eb756e5d06470a1e4ae4698d44250231b8"
    }

@evseevnn-zz evseevnn-zz self-assigned this Dec 8, 2014
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

Successfully merging a pull request may close this issue.

4 participants