Commit Graph

53948 Commits

Author SHA1 Message Date
Tomasz Grabiec
c11de0476e net: Add overload of ntoh()/hton() for int8_t/uint8_t
They're no-op but make templating easier.
2015-02-16 20:26:36 +02:00
Avi Kivity
63700d8ae6 Merge branch 'tgrabiec/cql3' of github.com:cloudius-systems/seastar-dev into db
Wire up query_processor into the CQL server, from Tomasz.
2015-02-16 14:05:45 +02:00
Avi Kivity
e5ee1f1d0f build: reinstate errors for antlr3 generated code builds
Since we mangle the generated code to compile without warnings, we can
re-enable them.
2015-02-16 13:51:30 +02:00
Avi Kivity
7b21b49ec0 build: generalize antlr grammar build rule
Currently it contains hard-coded target file names.  Replace with a variable.
2015-02-16 13:49:43 +02:00
Tomasz Grabiec
204bb79d33 transport: Make CQL3 server use query_processor
This change also converts parsing of query options.
2015-02-16 12:27:04 +01:00
Tomasz Grabiec
29f02b5c65 enum_set: Add more operations 2015-02-16 12:15:11 +01:00
Tomasz Grabiec
8c013c8b1a cql3: Fix option types
Lost in translation.
2015-02-16 12:15:10 +01:00
Tomasz Grabiec
b23180b6be cql3: Convert QueryOptionsWrapper and QueryOptions.OptionsWithNames 2015-02-16 12:15:10 +01:00
Tomasz Grabiec
f943555571 service: Convert client_state constructors 2015-02-16 12:15:08 +01:00
Tomasz Grabiec
a37baeb81b transport: server: Guard against buffer overrun when parsing CQL3 frame 2015-02-16 12:00:03 +01:00
Tomasz Grabiec
a51460508d exceptions: Convert ProtocolException 2015-02-16 12:00:03 +01:00
Tomasz Grabiec
83a78055eb transport: Import ProtocolException.java 2015-02-16 12:00:03 +01:00
Tomasz Grabiec
edbdd1dd1a exceptions: Make exception_code an enum class 2015-02-16 12:00:03 +01:00
Tomasz Grabiec
73b143c491 db: Compare serialized bytes when reconciling cells
That's what Origin does, it does not use cell's actual type.
2015-02-16 12:00:03 +01:00
Tomasz Grabiec
f074aa6a15 cql3: Add missing header inclusion guard 2015-02-16 12:00:03 +01:00
Tomasz Grabiec
a6fd48e334 unimplemented: Warn about mising features only once 2015-02-16 12:00:03 +01:00
Tomasz Grabiec
e5e9723023 build: Use sed on the correct target file
Current code worked always on the 'release' version of the generated
file, leaving the 'debug' one unchanged.
2015-02-16 12:52:01 +02:00
Gleb Natapov
9ee05fdddc seawreck: exit after test is done 2015-02-16 09:54:08 +02:00
Vlad Zolotarov
b8cc243b17 tcp: Pass the correct value of TSO segment size downstream
Signed-off-by: Vlad Zolotarov <vladz@cloudius-systems.com>
2015-02-15 19:11:06 +02:00
Nadav Har'El
e3b34a9efc build: fix annoying warning messages
It seems antlr has a bug: It takes code which looks like this in Cql.g:

	t=IDENT

and compiles it into the following in CqlParser.cpp:

	ImplTraits::CommonTokenType* t = NULL;
	...
	t =  this->matchToken(IDENT, &FOLLOW_IDENT_in_cident976);

But matchToken is declared as

	const CommonTokenType* matchToken( ANTLR_UINT32 ttype, BitsetListType* follow );

Obviously, assigning a const pointer into a non-const pointer generates a
warning, and on a clean compilation of Urchin we get dozens of these
annoying messages.

I'm not sure why Antlr has this bug and why nobody noticed it before or
who to report it to (I'm new to Antlr...), but it's easy to work around:
This patch adds to our build an ugly "sed" command which changes lines like

	ImplTraits::CommonTokenType* varname = NULL;

into
	const ImplTraits::CommonTokenType* varname = NULL;

and now Urchin compiles without annoying warning messages.

Signed-off-by: Nadav Har'El <nyh@cloudius-systems.com>
2015-02-15 17:28:11 +02:00
Avi Kivity
3aada4735a Merge branch 'master' of github.com:cloudius-systems/seastar into db 2015-02-15 16:01:33 +02:00
Avi Kivity
8ca0f21ae6 posix: add missing include 2015-02-15 15:55:35 +02:00
Avi Kivity
39596a0334 Merge branch 'master' of github.com:cloudius-systems/seastar into db
Conflicts:
	configure.py
2015-02-15 09:58:29 +02:00
Avi Kivity
adcefcf694 Merge branch 'tgrabiec/cql3' of github.com:cloudius-systems/seastar-dev into db
Enable parsing of INSERT and UPDATE CQL3 statements, from Tomasz.
2015-02-15 09:52:00 +02:00
Tomasz Grabiec
6a998e2d78 tests: Add test for parsing and execution of CQL3 queries 2015-02-12 19:40:59 +01:00
Tomasz Grabiec
ebb8a11206 types: Add helper tuple_type::serialize_value_deep()
It works on fully deserialized values.
2015-02-12 19:40:59 +01:00
Tomasz Grabiec
14546bf5c5 cql3: Convert rules for parsing UPDATE statements 2015-02-12 19:40:59 +01:00
Tomasz Grabiec
87821f2d12 Add missing copyright banners 2015-02-12 19:40:59 +01:00
Tomasz Grabiec
572b61a2bb cql3: Convert more of ColumnCondition and ColumnCondition::Raw 2015-02-12 19:40:59 +01:00
Tomasz Grabiec
08eed72021 cql3: Convert more of SingleColumnRelation 2015-02-12 19:40:59 +01:00
Tomasz Grabiec
6ca084fdb3 cql3: Implement operator== for column_identifier::raw 2015-02-12 19:40:59 +01:00
Tomasz Grabiec
ee699bff1c cql3: Convert more of constants:: 2015-02-12 19:40:58 +01:00
Tomasz Grabiec
aaf9463568 db: Take names by const& in find_*() functions 2015-02-12 19:40:58 +01:00
Tomasz Grabiec
6cd524988d db: Add more methods to schema 2015-02-12 19:40:58 +01:00
Tomasz Grabiec
bd2892c8fb cql3: Cleanup code formatting 2015-02-12 19:40:58 +01:00
Tomasz Grabiec
3b2c32a9fd cql3: Fix misinitialization of relation::_relation_type 2015-02-12 19:40:58 +01:00
Tomasz Grabiec
abaf309b6c cql3: Add operator_type::operator!=() 2015-02-12 19:40:58 +01:00
Tomasz Grabiec
0293b151dc cql3: Fix bug in modification_statement::process_where_clause() 2015-02-12 19:40:58 +01:00
Tomasz Grabiec
43300e9998 cql3: Use find() instead of [] when looking up processed keys
find() is sufficient and it has less surprising side effects. This
doesn't fix any issue.
2015-02-12 19:40:58 +01:00
Tomasz Grabiec
5e742cc13d cql3: Convert QueryProcessor 2015-02-12 19:40:58 +01:00
Tomasz Grabiec
42049e0671 cql3: Convert ErrorListener and ErrorCollector 2015-02-12 19:40:58 +01:00
Tomasz Grabiec
0c5e2da0e0 cql3: Convert more of query_options
Needed by query_processor.
2015-02-12 19:40:58 +01:00
Tomasz Grabiec
63d152ece8 types: Introduce abstract_type::as_cql3_type()
Origin also has it.
2015-02-12 19:40:58 +01:00
Tomasz Grabiec
863d305a66 types: Make from_string() work on sstring_view 2015-02-12 19:40:58 +01:00
Tomasz Grabiec
3aea084f2b types: Add sstring_view type alias 2015-02-12 19:40:58 +01:00
Tomasz Grabiec
b3544238d1 service: Implement query_state:: get_client_state() and get_timestamp()
Needed by query_options and query_processor.
2015-02-12 19:40:58 +01:00
Tomasz Grabiec
9a307918ef db: Cleanup comment 2015-02-12 19:40:58 +01:00
Tomasz Grabiec
0f2a1dffb6 cql3: Pass bound term count around as unsigned integer
It's compared with size_t and is set from size_t. To avoid ugly casts
we can store it as unsigned int. It's always positive anyway. Origin
uses signed int ("int") because there is no unsigned int in Java.
2015-02-12 19:40:58 +01:00
Tomasz Grabiec
0973d7df7c cql3: Avoid unnecessary copy of a string 2015-02-12 19:40:58 +01:00
Tomasz Grabiec
ca4688540f cql3: Drop redundant optional<> around shared_ptr<> 2015-02-12 19:40:58 +01:00