Commit Graph

35 Commits

Author SHA1 Message Date
alexey-milovidov
6db73152d2
Hardening debug build (experimental) (#4632)
* Hardening debug build: more granular memory mappings and ASLR; add memory protection for mark cache and index

* Addition to prev. revision

* Addition to prev. revision

* Addition to prev. revision
2019-03-10 06:16:51 +03:00
Alexey Milovidov
4905cd2b0a Added missing include 2019-03-08 15:59:06 +03:00
Alexey Milovidov
9d89cc0fc1 Debugging PODArray 2019-03-08 06:23:02 +03:00
Alexey Milovidov
c3fabfb93f Improvement #4564 2019-03-04 03:03:20 +03:00
Alexey Milovidov
315b6f3878 Better string comparison (development) 2019-03-03 23:08:39 +03:00
Vitaly Baranov
4b6cba9a8e IColumn::getPermutation() and IColumn::permutate() functions, "limit" parameter: change type UInt64 -> size_t. 2019-02-19 14:56:09 +03:00
Vitaly Baranov
833aa9189b IColumn::index() function, "limit" parameter: change type UInt64 -> size_t. 2019-02-19 14:47:41 +03:00
Alexey Milovidov
c603d270f4 Cleanups #4246 2019-02-10 18:17:45 +03:00
Alexey Milovidov
4e2c1132d9 Fixed UB #3920 2018-12-27 23:48:21 +03:00
Alexey Milovidov
5abb2d02b9 Fixed UB #3926 2018-12-26 08:34:25 +03:00
Amos Bird
8736a3908f left pad 2018-12-24 23:51:06 +08:00
Nikolai Kochetov
ec59f65a1e Update ReverseIndex. Added tests. 2018-12-13 22:02:28 +03:00
Alexey Milovidov
141e9799e4 Fixed error with "extractURLParameter" function (read after buffer); improved performance; added support for zero bytes in URLs; renamed Chars_t type [#CLICKHOUSE-2] 2018-11-25 03:08:50 +03:00
Alexey Milovidov
26587dd2bb Addition to prev. revision [#CLICKHOUSE-2] 2018-09-02 08:23:20 +03:00
Amos Bird
ea84430864 Get rid of useless std::move to get NRVO
http://eel.is/c++draft/class.copy.elision#:constructor,copy,elision

Some quote:

> Speaking of RVO, return std::move(w); prohibits it. It means "use move constructor or fail to compile", whereas return w; means "use RVO, and if you can't, use move constructor, and if you can't, use copy constructor, and if you can't, fail to compile."

There is one exception to this rule:
```cpp
Block FilterBlockInputStream::removeFilterIfNeed(Block && block)
{
    if (block && remove_filter)
        block.erase(static_cast<size_t>(filter_column));

    return std::move(block);
}
```

because references are not eligible for NRVO, which is another rule "always move rvalue references and forward universal references" that takes precedence.
2018-08-27 22:15:48 +08:00
Nikolai Kochetov
9f591b8d02 Merged with master. 2018-06-26 17:41:29 +03:00
Nikolai Kochetov
f56d16769b Added pre and post serialization for IDataType BinaryBulkWithMultipleStreams. Supported dictionary serialization format with single global dictionary (limited wit max_dictionary_size) and additional keys which are stored per granule. Changed IDataType::enumerateStream interface. Added (de)serialization params for binary bulk with multiple stream (de)serialization. Changed IColumn::index interface. 2018-06-26 17:12:21 +03:00
Alexey Milovidov
1c2b024c39 Non significant changes according to clang's -Weverything, part 2 [#CLICKHOUSE-2] 2018-06-03 20:43:56 +03:00
Nikolai Kochetov
4369613435 added IColumn::select 2018-04-23 19:40:25 +03:00
alexey-milovidov
f358dc4125
Update ColumnString.h 2018-03-30 00:15:14 +03:00
alexey-milovidov
db53190854
Update ColumnString.h 2018-03-29 23:21:40 +03:00
Brett Hoerner
fef91af96f Fix build when using GCC 7.3.1: -Wmaybe-uninitialized error
Before adding this ignore you would receive the following when using GCC
7.3.1:

[ 82%] Building CXX object dbms/src/Storages/System/CMakeFiles/clickhouse_storages_system.dir/StorageSystemAsynchronousMetrics.cpp.o
In file included from /ClickHouse/dbms/src/Storages/System/StorageSystemAsynchronousMetrics.cpp:5:0:
/ClickHouse/dbms/src/Columns/ColumnString.h: In member function ‘virtual DB::BlockInputStreams DB::StorageSystemAsynchronousMetrics::read(const Names&, const DB::SelectQueryInfo&, const DB::Context&, DB::QueryProcessingStage::Enum&, size_t, unsigned int)’:
/ClickHouse/dbms/src/Columns/ColumnString.h:96:45: error: ‘*((void*)&<anonymous> +8)’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
         const size_t size_to_append = s.size() + 1;
                                       ~~~~~~^~
cc1plus: all warnings being treated as errors
make[2]: *** [dbms/src/Storages/System/CMakeFiles/clickhouse_storages_system.dir/build.make:63: dbms/src/Storages/System/CMakeFiles/clickhouse_storages_system.dir/StorageSystemAsynchronousMetrics.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:9105: dbms/src/Storages/System/CMakeFiles/clickhouse_storages_system.dir/all] Error 2
make: *** [Makefile:163: all] Error 2
2018-03-29 12:02:09 -05:00
Nikolai Kochetov
476d4b339c Immutable construction for columns 2018-03-20 22:45:10 +03:00
Alexey Milovidov
7284a64740 Better semantic of sharing columns: development [#CLICKHOUSE-2]. 2017-12-16 00:32:25 +03:00
Alexey Milovidov
401fd2d6d8 Better semantic of sharing columns: development [#CLICKHOUSE-2]. 2017-12-15 05:36:40 +03:00
Alexey Milovidov
911d80ab51 Better semantic of sharing columns: development [#CLICKHOUSE-2]. 2017-12-14 07:25:22 +03:00
Alexey Milovidov
fb38ef9a8e Better semantic of sharing columns: development [#CLICKHOUSE-2]. 2017-12-14 06:56:56 +03:00
Alexey Milovidov
3def5f03f5 Cleanup semantics of data types [#CLICKHOUSE-2]. 2017-12-09 19:17:37 +03:00
Alexey Milovidov
d9c87bf4df Simplification of Nullable [#CLICKHOUSE-2] 2017-12-08 01:11:51 +03:00
Alexey Milovidov
bdd25b15bd Better [#CLICKHOUSE-2]. 2017-12-01 22:34:51 +03:00
Nikolai Kochetov
985e449bd3 added IDataType::updateAvgValueSizeHints; renamed PODArray::allocated_size to PODArray::allocated_bytes; renamed renamed IColumn::allocatedSize to IColumn::allocatedBytes; removed IColumn.h from IDataType.h 2017-07-13 19:49:09 +03:00
Nikolai Kochetov
d67a6c08cd fixed allocated size calculation for ColumnString and ColumnVector 2017-07-13 17:41:55 +03:00
Alexey Zatelepin
1cd936579d introduce IColumn::gather() [#CLICKHOUSE-3118] 2017-07-09 21:57:06 +03:00
Alexey Zatelepin
87fbfe0950 correct comparisons for strings with null bytes [#CLICKHOUSE-3070] 2017-06-22 23:10:43 +03:00
Alexey Milovidov
310736cd7e Moved headers and sources to same place [#CLICKHOUSE-3]. 2017-04-01 12:22:42 +03:00