57 Commits

Author SHA1 Message Date
Johan Wikman
d632c195ff 2.4.19 Update change date 2022-01-04 15:47:38 +02:00
Johan Wikman
2a54224927 2.4.18 Update change date 2021-10-29 08:29:51 +03:00
Johan Wikman
a8bfbbe254 2.4.17 Update change date 2021-03-08 09:03:02 +02:00
Johan Wikman
0224f24077 2.4.16 Update Change Date 2021-02-16 14:59:00 +02:00
Johan Wikman
c5bcf7a8b1 2.4.15 Update change date 2021-01-18 15:30:30 +02:00
Johan Wikman
df36ef86d0 2.4.14 Update Change Date 2020-11-16 14:23:26 +02:00
Johan Wikman
faaf7f483e 2.4.13 Update Change Date 2020-10-14 09:15:46 +03:00
Johan Wikman
babcda3eca 2.4.12 Update Change Date 2020-08-24 09:42:48 +03:00
Johan Wikman
fc9c9fcd77 2.4.11 Update change date 2020-07-07 10:01:38 +03:00
Johan Wikman
5ebae9be90 Merge branch '2.3' into 2.4 2020-06-05 09:36:24 +03:00
Johan Wikman
aa11c960b1 2.3.20 Update change date 2020-06-05 09:31:45 +03:00
Markus Mäkelä
d3d7054639
Merge branch '2.3' into 2.4 2020-04-24 16:09:20 +03:00
Johan Wikman
f527a8f2e6 2.3.19 Update Change Date 2020-04-23 14:23:57 +03:00
Johan Wikman
d0ab797938 Merge branch '2.3' into 2.4 2020-03-12 10:33:57 +02:00
Johan Wikman
e0cd6adb26 Update change date for 2.3.18 2020-03-10 10:45:47 +02:00
Johan Wikman
8b763fb88b Merge branch '2.3' into 2.4 2020-02-12 08:27:48 +02:00
Johan Wikman
cfb3f79b54 Update 2.3.17 Change Date 2020-02-10 15:28:38 +02:00
Johan Wikman
a7e0142224 Merge branch '2.3' into 2.4 2020-01-15 11:29:37 +02:00
Johan Wikman
790d90f229 Update 2.3.16 Change Date 2020-01-15 11:08:51 +02:00
Johan Wikman
a9a2b753c0 Update 2.4.5 change date 2019-12-18 13:25:03 +02:00
Markus Mäkelä
babce13ec6
Add GWBUF pretty-printing
The gwbuf_hexdump_pretty displays the hex contents of the buffer alongside
the human-readable version of it. The text version helps identify parts of
the buffer that contain text which makes protocol data decoding easier.
2019-12-09 17:53:58 +02:00
Johan Wikman
f6731a898d Update change date 2019-11-13 08:37:17 +02:00
Johan Wikman
fdfbf3e133 Update 2.4.3 change date 2019-11-05 12:21:00 +02:00
Johan Wikman
861e27eb00 Merge branch '2.3' into 2.4 2019-10-29 14:04:31 +02:00
Johan Wikman
df6c56e7ca Update 2.3.13 Change Date 2019-10-29 12:51:31 +02:00
Johan Wikman
0ba779d5a2 Update 2.4.0 Change Date 2019-06-25 10:11:55 +03:00
Markus Mäkelä
fc997b9e38
Add mxs::Buffer::erase
Added range-erase method to mxs::Buffer. This makes it easier to modify
the contents of mxs::Buffer.

The intended use-case for now is to erase unexpected trailing ERR packets
from resultsets.
2019-06-14 15:18:02 +03:00
Markus Mäkelä
44d1b821c3
Merge branch '2.3' into develop 2019-06-03 13:54:55 +03:00
Markus Mäkelä
a4ee390fe5
Never construct mxs::Buffer from nullptr
A mxs::Buffer should never be constructed from a null pointer and if done,
it is very likely due to an error.
2019-05-31 14:01:15 +03:00
Markus Mäkelä
b04415d8da
Fix use of gwbuf_length in mxs::Buffer
Backend should use empty() instead of length() to see if the buffer is
empty. The length of a buffer should always be valid to call, even on
empty buffers.
2019-05-21 13:15:20 +03:00
Markus Mäkelä
c4fff21909
Fix gwbuf_apped assertion on writeq drain
The DCB writeq would be the tail pointer and it would be NULL.
2019-05-21 13:15:20 +03:00
Johan Wikman
6317a86c69 MXS-2495 No nulls for GWBUF_IS_CONTIGUOUS()
The macro GWBUF_IS_CONTIGOUS() and the actual implementation
gwbuf_is_contiguous() can only be called with a non-NULL pointer.
2019-05-21 10:52:34 +03:00
Johan Wikman
0f714e9ad4 MXS-2495 Cleanup GWBUF interface
All GWBUF macros that address a single link in a chain are now
simple wrappers for equivalent gwbuf_link-functions.

Next step is to drop the macros and replace their use with calls
to the functions.
2019-05-20 09:57:37 +03:00
Johan Wikman
a6c5e880c1 MXS-2470 Validate GWBUFs
A GWBUF given to any gwbuf-function:

- Must not be NULL. Exceptions are gwbuf_free() and gwbuf_append(),
  in analogy with free() and realloc() respectively.
- Must be the head of a chain.
- Must be owned by the calling thread.
2019-05-17 14:37:38 +03:00
Markus Mäkelä
b4e8f79c5f
Format core sources again
Formatted with nl_func_type_name and related options set to ignore. This
keeps the formatting intact for long return types in declarations and
definitions.
2019-05-10 09:21:52 +03:00
Markus Mäkelä
0e0342e657
Merge branch '2.3' into develop 2019-05-08 10:38:39 +03:00
Markus Mäkelä
a652b6bd5b
Add advance(int) to mxs::Buffer iterators
This makes iterating over packets in buffers faster while still
maintaining the requirements for forward iterators. Not using operator+=
makes it clear that this is not a random access iterator.
2019-05-08 10:33:27 +03:00
Markus Mäkelä
6042a53cb3
Replace raw GWBUF pointers with mxs::Buffer
Now that the query queue is stored in an actual container, it is only
logical to use mxs::Buffer instead of GWBUF as the stored type.
2019-03-18 13:18:52 +02:00
Markus Mäkelä
95317725ce
Merge branch '2.3' into develop 2019-03-07 16:21:03 +02:00
Esa Korhonen
3b55893a20 Combine maxscale/buffer.h with maxscale/buffer.hh 2019-01-17 12:37:40 +02:00
Niclas Antti
c447e5cf15 Uncrustify maxscale
See script directory for method. The script to run in the top level
MaxScale directory is called maxscale-uncrustify.sh, which uses
another script, list-src, from the same directory (so you need to set
your PATH). The uncrustify version was 0.66.
2018-09-09 22:26:19 +03:00
Johan Wikman
cb6096f84d Provide std::default_delete<GWBUF*>
Now GWBUFs can be placed in std::unique_ptr:s.
2018-08-27 14:20:36 +03:00
Johan Wikman
ab9a9f92cb MXS-2020 Remove maxscale/debug.h
- Removed from all files.
- maxbase/assert.h included where necessary.
2018-08-22 11:35:35 +03:00
Johan Wikman
3f53eddbde MXS-2020 Replace ss[_info]_dassert with mxb_assert[_message] 2018-08-22 11:34:59 +03:00
Niclas Antti
24ab3c099c Move top of the file "#pragma once" to after the following comment (swap them). If the comment is a BPL update it to the latest one 2018-08-21 13:13:15 +03:00
Johan Wikman
f14380243b Rename cppdefs.hh to ccdefs.hh
For obvious reasons; the c++ suffix is .cc and not .cpp
2018-08-10 07:50:18 +03:00
Johan Wikman
cc0299aee6 Update change date of 2.3 2018-06-25 10:07:52 +03:00
Markus Mäkelä
a61c9cfdfa
Make assignment operator unambiguous
Copying a std::deque<mxs::Buffer> would cause a compilation failure due to
ambiguity between the copy-assignment and move-assignment
operators. Explicitly constructing a temporary object retains the strong
exception guarantee but prevents the ambiguity.
2018-04-20 10:24:00 +03:00
Markus Mäkelä
23aa9cc492
Add Buffer::copy_from(GWBUF*)
This makes it easier to create a Buffer from GWBUF that the API functions
pass as arguments.
2018-04-10 15:32:23 +03:00
Markus Mäkelä
f06b2b5ab9
Fix mxs::Buffer::copy_from
The code failed to compile when the function is used with a warning that
`pBuffer` was used without initialization. This makes sense as the first
conditional block re-declares the same parameter.
2018-04-10 15:32:22 +03:00