Johan Wikman
255a5b53c1
Reindented server/core/hashtable.c
2015-11-30 13:54:46 +02:00
Markus Makela
6b88b6b17f
Merge branch 'develop' into MXS-329-develop-20151111
2015-11-13 07:48:59 +02:00
Markus Makela
8363673be6
Added number of inserted elements to hashtable
...
Added tracking of the number of inserted elements to the hashtable.
Also added utility function to get the size of the hashtable.
2015-11-11 17:57:35 +02:00
counterpoint
bb53eb0f6d
Put extra check in hashtable_fetch to return if zero entries (should never happen but will crash if not checked); remove dcb_close from mysql_backend where it closes backend DCBs, as these should be closed by the router.
2015-10-07 17:06:21 +01:00
counterpoint
15f042f083
On reflection, freeing keys and values in hashtable processing is not a good idea because we don't know what they are, and can put up with some small memory losses.
2015-09-21 15:49:57 +01:00
counterpoint
7aa36b77ea
Guarantee router session is present for call to clientReply; properly free callbacks; attempt to set all necessary values for dbusers; do more to ensure buffers freed.
2015-09-21 14:25:12 +01:00
Markus Makela
2fe6d837fc
Added null checks to hashtable functions and fixed possible crash with reload users.
2015-07-10 20:38:10 +03:00
Markus Makela
3bad5dc814
Fixes to Coverity defects 87308, 87307, 87306, 87074, 87068.
2015-02-14 07:54:17 +02:00
Markus Makela
46c0c70764
Fixed negative values from hashing functions causing segmentation faults.
2015-02-06 22:59:47 +02:00
Mark Riddoch
d4f5ca6bcb
Merge branch 'blr' into develop
...
Addition of hashtable load and save. Caching of auth information
2015-02-06 11:52:51 +00:00
Mark Riddoch
bc0d303b27
Add saving of hashtables to a file
...
Cache the user information to file in order to allow authentication without backend databases
2015-02-06 11:44:29 +00:00
Mark Riddoch
0083e62c41
Merge branch 'blr' into develop
2015-02-03 17:19:06 +00:00
Mark Riddoch
613ed8bb61
Cleanup some log messages
2015-01-07 17:37:32 +00:00
VilhoRaatikka
f4f537a3e2
Fix to bug #673 , http://bugs.skysql.com/show_bug.cgi?id=673
...
dcb.c:dcb_hashtable_stats:division by zero
hashtable.c:hashtable_get_stats: NULL-pointer reference
service.c:serviceStartPort:set service->users NULL to avoid referring to freed memory
users.c:dcb_usersPrintf: NULL-pointer reference
debugcmd.c:convert_arg: changed return value to 1 in case of error, 0 (==NULL) is valid but it indicates that there are no users loaded.
execute_cmd: fixed command handling
2014-12-31 21:06:28 +02:00
Mark Riddoch
3e37f0d0f6
Fixed race condition on hashtable n_readers field
2014-12-19 15:54:05 +00:00
VilhoRaatikka
5264a1abc9
Added function documentation, moved one non-error log entry to message log, cleaned up a bit.
2014-12-08 16:02:16 +02:00
MassimilianoPinto
237975ebcd
Coverity 72692
...
Coverity 72692
2014-10-30 17:16:59 +01:00
Markus Makela
b0683d9b4d
Updated the licensing year from 2013 to 2013-2014
2014-10-01 14:37:12 +03:00
Markus Makela
f4e591e382
Changed 'SkySQL Gateway' to 'MariaDB Corporation MaxScale'
2014-09-30 13:15:03 +03:00
Markus Makela
c344231f80
Renamed all occurences of SkySQL to MariaDB Corporation
2014-09-30 13:02:10 +03:00
MassimilianoPinto
8b5b4a17fe
Merge from Z3
...
Merge from Z3
2014-09-11 12:51:16 +02:00
MassimilianoPinto
7245d1baa1
blr branch merge
...
blr branch merge
2014-09-11 12:20:42 +02:00
MassimilianoPinto
190c05da5f
Merge branch 'develop' into release-1.0beta-refresh
2014-09-11 12:17:29 +02:00
VilhoRaatikka
5e5c59d322
Merge branch 'MAX-237' into Z3
2014-09-03 17:50:56 +03:00
Mark Riddoch
60d6b5b699
Fix bugs 484 and 485.
2014-09-01 16:51:05 +01:00
Mark Riddoch
531dfd017c
Addition of thread data to commands
2014-08-29 11:24:58 +01:00
VilhoRaatikka
531d8d7b47
query_classifier.cc: added detection for CREATE TEMPORARY TABLE and setting a new query type QUERY_TYPE_CREATE_TMP_TABLE for it.
...
query_classifier.h: added QUERY_TYPE_CREATE_TMP_TABLE and QUERY_TYPE_READ_TMP_TABLE for use of temporary table support.
hashtable.c:Added variant of hashtable which is 'flat', that is, stored to existing memory instead of allocating memory as a part of the call. Existing function declarations don't change but added hashtable_alloc_flat for the purpose. Both hashtable_alloc and hashtable_alloc_flat now call the real allocation function, hashtable_alloc_real. hashtable_free only frees memory which is allocated in hashtable_alloc_real.
hashtable.h: added a flag to HASHTABLE struct to indicate whether hashtable owns its memory or not.
readwritesplit.h: Added RSES_PROP_TYPE_TMPTABLES property type to be used for keeping the hashtable for tablenames.
readwritesplit.c: Added comments about temporary table support implementation.
2014-08-29 10:08:48 +03:00
counterpoint
eed40fef75
Extend hashtable scripts, fix hashtable with size of less than 1; correct text in spinlock tests.
2014-08-27 09:31:34 +01:00
MassimilianoPinto
5fd5aab2be
Added checks for possible handle hashtable_add() failure
...
Added checks for possible handle hashtable_add() failure with key,
value and copyfn
2014-02-14 10:49:06 +01:00
VilhoRaatikka
cb20f8ab8d
Initialized argument pointer values with zeroes in hashtable_get_stats.
2014-02-11 15:22:52 +02:00
MassimilianoPinto
dfc224c292
New routines for key/value copy and free in hash tables
...
With the routines for key/value copy and free it is possible to
duplicate or free different data types in the hash tables.
The user_alloc() routine is the first example.
2014-01-08 17:02:59 +01:00
Mark Riddoch
050ca7ac7e
Some fixes for doxygen generation
2013-11-25 10:12:08 +01:00
vraatikka
e1d7a5640d
Put structure check fields behind SS_DEBUG macros. Thus, they are only included in debug builds.
2013-09-09 10:05:46 +03:00
vraatikka
bc6fe8f6ef
hashtable_add now checks input parameter and returns with zero (indicating that no elements were added) if hashsize is zero. Caused floating point exception.
2013-08-05 15:01:36 +03:00
vraatikka
401d4920e4
Moved dcb_hashtable_stats from hastable.c to dcb.c to break dependency between hashtable and the rest of the maxscale. Added check fields to hashtable structure.
2013-08-05 11:51:10 +03:00
vraatikka
8b720f211e
in hastable_delete check if deleted entry's next pointer is NULL.
2013-08-03 23:10:45 +03:00
Timofey Turenko
a7c82310f9
moving files to /server to make merge possible
2013-07-28 05:31:11 +00:00