- Dec 09, 2024
-
-
In order to avoid collision with the upcoming core default_value. Also rename tuple_field::default_value_expr to tuple_field::sql_default_value_expr. Part of #8157 NO_DOC=refactoring NO_TEST=refactoring NO_CHANGELOG=refactoring
-
PG protocol run queries by calling dispatch_query, which stores the response in port_c contained in box_function_ctx structure. NO_DOC=exports NO_CHANGELOG=exports NO_TEST=exports
-
This function is used to determine the authentication method when authenticating a postgres client. part of picodata/picodata/sbroad!292 NO_DOC=exports NO_CHANGELOG=exports NO_TEST=exports
-
These exports allow us to perform user authentication and network communication. part of picodata/picodata/sbroad!292 NO_DOC=exports NO_CHANGELOG=exports NO_TEST=exports
-
NO_DOC=picodata internal patch NO_CHANGELOG=picodata internal patch NO_TEST=picodata internal patch
-
Dmitry Ivanov authored
NO_DOC=picodata internal patch NO_CHANGELOG=picodata internal patch NO_TEST=picodata internal patch
-
Dmitry Ivanov authored
NO_DOC=picodata internal patch NO_CHANGELOG=picodata internal patch NO_TEST=picodata internal patch
-
Dmitry Ivanov authored
Better late than never.
-
Dmitry Ivanov authored
Unfortunately, Centos 7 provides only openssl 1.0.2 (at lest if we disregard epel), so we can't build the bundled libldap & libsasl2. "Okay", one might think, "we can link against the distro's libs". Well, turns out libldap 2.4, which is what we have to deal with in that case, doesn't have ldap_connect! Luckily, we don't have to connect explicitly. According to man pages: ``` ldap_init() acts just like ldap_open(), but does not open a connection to the LDAP server. The actual connection open will occur when the first operation is attempted. ldap_initialize() acts like ldap_init()... ``` This is still true for libldap up to and including version 2.6. NO_DOC=picodata internal patch NO_CHANGELOG=picodata internal patch NO_TEST=picodata internal patch
-
Dmitry Ivanov authored
This is needed to fix Ninja, which requires them to build a dependency graph. NO_DOC=picodata internal patch NO_CHANGELOG=picodata internal patch NO_TEST=picodata internal patch
-
Dmitry Ivanov authored
Now it's possible to specify the desired authentication method during user creation via `auth_type`, e.g. ```lua box.schema.user.create('mickey', { auth_type = 'chap-sha1', password = 'foobar' }) ``` Furthermore, authentication methods may now specify that they don't require password to create stored authentication info. This is used in LDAP authentication (`auth_type = 'ldap'`): ```lua box.schema.user.create('mickey', { auth_type = 'ldap' }) ``` NO_DOC=picodata internal patch NO_CHANGELOG=picodata internal patch NO_TEST=picodata internal patch
-
Dmitry Ivanov authored
This authentication method doesn't store any secrets; instead, we delegate the whole auth to a pre-configured LDAP server. In the method's implementation, we connect to the LDAP server and perform a BIND operation which checks user's credentials. Usage example: ```lua -- Set the default auth method to LDAP and create a new user. -- NOTE that we still have to provide a dummy password; otherwise -- box.schema.user.create will setup an empty auth data. box.cfg({auth_type = 'ldap'}) box.schema.user.create('demo', { password = '' }) -- Configure LDAP server connection URL and DN format string. os = require('os') os.setenv('TT_LDAP_URL', 'ldap://localhost:1389') os.setenv('TT_LDAP_DN_FMT', 'cn=$USER,ou=users,dc=example,dc=org') -- Authenticate using the LDAP authentication method via net.box. conn = require('net.box').connect(uri, { user = 'demo', password = 'password', auth_type = 'ldap', }) ``` NO_DOC=picodata internal patch NO_CHANGELOG=picodata internal patch NO_TEST=picodata internal patch
-
Dmitry Ivanov authored
This is required for LDAP authentication, because we need username to format the corresponding DN. NO_DOC=picodata internal patch NO_CHANGELOG=picodata internal patch NO_TEST=picodata internal patch
-
box.schema.user.passwd doesn't change the password for the current user because new password is passed instead of the user name. NO_CHANGELOG=fix an unreleased bug NO_DOC=fix an unreleased bug
-
It fixes the following assertion ```bash tarantool: ./src/lib/core/crypt.c:84: md5_encrypt: Assertion `password_len + salt_len > 0' failed. ``` caused by the following code ```lua box.cfg{auth_type='md5'} box.schema.user.password("") ``` NO_CHANGELOG=fix an unreleased feature NO_DOC=fix an unreleased feature
-
part of picodata/tarantool#21 NO_CHANGELOG=refactoring NO_DOC=refactoring
-
NO_DOC=ci change NO_TEST=ci change NO_CHANGELOG=ci change
-
Previous commit caused CI `pack` job to fail on some linux distros. This commit fixes the warnings from compiler. NO_DOC=picodata internal patch NO_CHANGELOG=picodata internal patch NO_TEST=picodata internal patch
-
- Add a configurable non-negative session parameter "sql_vdbe_max_steps" -- max number of opcodes that Vdbe is allowed to execute for sql query. - Default value can be specified in box.cfg. If not set via box.cfg, default value is 45000. Value 0 means that no checks for number of executed Vdbe opcodes will be made. - Add the third argument to box.execute function, that allows to specify options for query execution. The only option supported: sql_vdbe_max_steps. Usage example: ``` box.execute([[select * from t]], {}, {{sql_vdbe_max_steps = 1000}}) ``` part of picodata/picodata/sbroad!461 NO_DOC=picodata internal patch NO_CHANGELOG=picodata internal patch
-
It prevents password sniffing and avoids storing passwords on the server in plain text but provides no protection if an attacker manages to steal the password hash from the server. Usage example: ```lua -- Enable the md5 authentication method for all new users. box.cfg({auth_type = 'md5'}) -- Reset existing user passwords to use the md5 authentication method. box.schema.user.passwd('alice', 'topsecret') -- Authenticate using the md5 authentication method via net.box. conn = require('net.box').connect(uri, { user = 'alice', password = 'topsecret', -- Specifying the authentication method isn't strictly necessary: -- by default the client will use the method set in the remote -- server config (box.cfg.auth_type) auth_type = 'md5', }) ``` part of picodata/picodata/sbroad!377 @TarantoolBot document Title: md5 authentication method See the commit message.
-
User name is usually used as a salt for user password in order to avoid password repeating. For instance, postgres md5 authentication stores passwords as md5("password", "user"), so that the same passwords are represented by different hashes. part of picodata/picodata/sbroad!377 @TarantoolBot document Title: Document updated `box.schema.user.password` declaration. Since auth methods can use user name for hashing, user name is added to argument list of `box.schema.user.password`. NO_TEST=there are no methods that use user name
-
Calling a `TRASH` macro after calling the `free` function dereferences the pointer to the already freed memory. NO_DOC=picodata internal patch NO_CHANGELOG=picodata internal patch NO_TEST=picodata internal patch
-
There used to be a rare error when failed to connect via tarantoolctl to listening cartridge console. It was caused by unclear console.local_print() contract. Starting from gh-7031 fix, the function assumed string-only arguments, while in some cases cdata error was passed. Now console.local_print() prints all non-string arguments as is, without modifying potential local_eos. Closes #8374 NO_DOC=bugfix NO_TEST=very hard to test
-
Tuple hash calculation tests for the C API were incorrect. Thanks to the full pipeline with DEBUG build we detected the problem and fixed it. NO_DOC=picodata internal patch NO_CHANGELOG=picodata internal patch
-
Picodata supports cluster-wide SQL and needs some predictable method to calculate tuple hashes for the bucket ids. Method should be available for Lua, C and Rust users. It was decided to expose a murmur3 hash calculation method of the key_def module. NO_DOC=picodata internal patch NO_CHANGELOG=picodata internal patch
-
Introduced a new type of cbus pipe - lcpipe. The current pipe in the cbus - cpipe, has a number of limitations, first of all - the cpipe cannot be used from the 3rd party threads, cpipe only works as a channel between two cords. That why lcpipe is needed. Its main responsibility - create channel between any thread and tarantool cord. Internally lcpipe is a cpipe, but: - on flush triggers removed, cause triggers use thread-local mem-pool, this is not possible on a third party thread - producer event loop removed, cause there is no libev event loop in third party thread Also, lcpipe interface is exported to the outside world. NO_DOC=core feature
-
NO_DOC=disable feedback NO_TEST=disable feedback
-
NO_DOC=core feature NO_TEST=no Lua API NO_CHANGELOG=bugfix
-
Due to inconsistency of Tarantool type casting while using strict data types as "double" or "unsigned" it is needed to use "number" data type in a whole bunch of cases. However "number" may contain "decimal" that will be serialized into string by JSON builtin module. This commit adds "encode_decimal_as_number" parameter to json.cfg{}. That forces to encode `decimal` as JSON number to force type consistency in JSON output. Use with catious - most of JSON parsers assume that number is restricted to float64. NO_DOC=we do not host doc
-
Previously, select "t1"."a" from (select "a" from "t") as "t1"; returned a result column name `t1` instead of `t1.a` because of incorrect work of a dequoting function. The reason was that previously sqlDequote() function finished its work when found the first closing quote. Old logic worked for simple selects where the column name doesn't contain an explicit scan name ("a" -> a). But for the sub-queries results sqlDequote() finished its work right after the scan name ("t1"."a" -> t1). Now the function continues its deqouting till it gets the null terminator at the end of the string. Closes #7063 NO_DOC=don't change any public API, only a bug fix Co-authored-by:
Mergen Imeev <imeevma@gmail.com>
-
Actually there is no reason to throw an error and make a user manually recreate prepared statement when it expires. A much more user friendly way is to recreate it under hood when statement's schema version differs from the box one. NO_DOC=refactoring NO_TEST=refactoring NO_CHANGELOG=refactoring
-
Problem description. When we prepare a statement with parameters in the result columns (for example box.prepare('select ?')) Tarantool has no information about the type of the output column and set it to default boolean. Then, on the execution phase, the type would be recalculated during the parameter binding. Tarantool expects that there is no way for parameter to appear in the result tuple other than exactly be mentioned in the final projection. But it is incorrect - we can easily propagate parameter from the inner part of the join. For example box.prepare([[select COLUMN_1 from t1 join (values (?)) as t2 on true]]) In this case column COLUMN_1 in the final projection is not a parameter, but a "reference" to it and its type depends on the parameter from the inner part of the join. But as Tarantool recalculates only binded parameters in the result projection, it doesn't change the default boolean metadata type of the COLUMN_1 and the query fails on comparison with the actual type of the tuple. Solution. As we don't want to patch Vdbe to make COLUMN_1 refer inner parameter, it was decided to make a simple workaround: change the default column type from BOOLEAN to ANY for parameters. It fixes the comparison with the actual tuple type (we do not fail), but in some cases get ANY column in the results where we would like to have explicitly defined type. Also NULL parameters would also have ANY type, though Tarantool prefers to have BOOLEAN in this case. Closes https://github.com/tarantool/tarantool/issues/7283 NO_DOC=bug fix
-
sql: add sql_execute_prepared_ext function, same as sql_execute_prepared but without `region` parameter closes #2 NO_DOC=minor NO_TEST=minor
-
- add box_tuple_data_offset function (return offset of the messagePack encoded data from the beginning of the tuple) - add more export functions closes #1 NO_DOC=build NO_TEST=build
-
Add to .gitlab.ci.yml test_linux, test_debian_docker_luacheck, coverage from .travis.mk. Also sign package on build Add checkpatch linter. Add docker image build. Image copies original tarantool/tarantool from Dockerhub NO_DOC=ci change NO_TEST=ci change NO_CHANGELOG=ci change
-
- Nov 22, 2024
-
-
Serge Petrenko authored
Also, remove unreleased/ entries. NO_DOC=changelog NO_TEST=changelog NO_CHANGELOG=changelog
-
- Nov 21, 2024
-
-
Andrey Saranchin authored
Currently, we use raw index for count operation instead of `box_index_count`. As a result, we skip a check if current transaction can continue and we don't begin transaction in engine if needed. So, if count statement is the first in a transaction, it won't be tracked by MVCC since it wasn't notified about the transaction. The commit fixes the mistake. Also, the commit adds a check if count was successful and covers it with a test. In order to backport the commit to 2.11, space name was wrapped with quotes since it is in lower case and addressing such spaces with SQL without quotes is Tarantool 3.0 feature. Another unsupported feature is prohibition of data access in transactional triggers - it was used in a test case so it was rewritten. Closes #10825 NO_DOC=bugfix (cherry picked from commit 0656a9231149663a0f13c4be7466d4776ccb0e66)
-
- Nov 12, 2024
-
-
Vladimir Davydov authored
The test expects at least 10 dumps to be created in 60 seconds. It usually works but sometimes, when the host is heavy loaded, Vinyl doesn't produce enough dumps in time and fails the test. On CI the test usually fails with 7-9 dumps. To avoid flaky failures, let's reduce the expected dump count down to 5. Closes #10752 NO_DOC=test fix NO_CHANGELOG=test fix (cherry picked from commit 5325abd3441ecb4b589799c32ec181d88724b8a8)
-
Vladimir Davydov authored
`vy_mem_insert()` and `vy_mem_insert_upsert()` increment the row count statistic of `vy_mem` only if no statement is replaced, which is correct, while `vy_lsm_commit()` increments the row count of `vy_lsm` unconditionally. As a result, `vy_lsm` may report a non-zero statement count (via `index.stat()` or `index.len()`) after a dump. This may happen only with a non-unique multikey index, when the statement has duplicates in the indexed array, and only if the `deferred_deletes` option is enabled, because otherwise we drop duplicates when we form the transaction write set, see `vy_tx_set()`. With `deferred_deletes`, we may create a `txv` for each multikey entry at the time when we prepare to commit the transaction, see `vy_tx_handle_deferred_delete()`. Another problem is that `vy_mem_rollback_stmt()` always decrements the row count, even if it didn't find the rolled back statement in the tree. As a result, if the transaction with duplicate multikey entries is rolled back on WAL error, we'll decrement the row count of `vy_mem` more times than necessary. To fix this issue, let's make the `vy_mem` methods update the in-memory statistic of `vy_lsm`. This way they should always stay in-sync. Also, we make `vy_mem_rollback_stmt()` skip updating the statistics in case the rolled back statement isn't present in the tree. This issue results in `vinyl-luatest/select_consistency_test.lua` flakiness when checking `index.len()` after compaction. Let's make the test more thorough and also check that `index.len()` equals `index.count()`. Closes #10751 Part of #10752 NO_DOC=bug fix (cherry picked from commit e8810c555d4e6ba56e6c798e04216aa11efb5304)
-
- Nov 07, 2024
-
-
Nikita Zheleztsov authored
This commit fixes some cases of upgrading schema from 1.6.9: 1. Fix updating empty password for users. In 1.6 credentials were array in _user, in 1.7.5 they became map. 2. Automatically update the format of user spaces. Format of system spaces have been properly fixed during upgrade to 1.7.5. However, commit 519bc82e ("Parse and validate space formats") introduced strict checking of format field in 1.7.6. So, the format of user spaces should be also fixed. Back in 1.6 days, it was allowed to write anything in space format. This commit only fixes valid uses of format: {name = 'a', type = 'number'} {'a', type = 'number'} {'a', 'num'} {'a'} Invalid use of format (e.g. {{}}, or {{5, 'number'}} will cause error anyway. User has to fix the format on old version and only after that start a new one. This commit also introduces the test, which checks, that we can properly upgrade from 1.6.9 to the latest versions, at least in basic cases. Closes #10180 NO_DOC=bugfix (cherry picked from commit f69e2ae488b3620e31f1a599d8fb78a66917dbfd)
-