Questions tagged [mariadb-10.3]

MariaDB 10.3 is an open source database server that offers similar functionality compared to MySQL.

MariaDB 10.3 is an open source database server that offers similar functionality compared to MySQL. Since version 10.0 MariaDB has veered off MySQL and now implements a different set of features.

MariaDB 10.3 implements system-versioning tables, PERCENTILE_CONT(), PERCENTILE_DISC(), and MEDIAN() window functions, INTERSECT and EXCEPT clauses, cursors with parameters, LIMIT in multi-table updates, LIMIT in GROUP_CONCAT(), and many other new features.

171 questions
1
vote
0 answers

Query execution time increased after changing a server

I have changed the test database server from windows to synology. After this change, there is one query which takes 9-10 sec to get a result on synology. On the Windows server ,it took 0.18sec to get data. When I exported data , indexes and triggers…
kreya
  • 1,091
  • 5
  • 24
  • 52
1
vote
2 answers

MySQL dense_rank not skipping numbers

I fairly new to MYSQL and I'm having trouble getting dense rank to work correctly, I was hoping someone would be able to help adjust my query to get the desired results. Issue I'm having is after a ranking that is the same it goes to the next…
Syndct
  • 21
  • 2
1
vote
1 answer

Using SQL to count number of matches in JSON?

Here's an example table: id, json_txt 1, [5,18,23,50] 2, [] 3, [4,5,12,18,22] 4, [18,22,50] 5, [3,12,70] I want to get the sum of the number of matches from row 3's json_txt in the other rows. Here's what the counts should come out to for each…
Exo
  • 61
  • 6
1
vote
1 answer

SQL permissions behaving unexpectedly

Recently I started learning php and sql because I have a fair bit of front end understanding, so I wanted to strengthen my understanding of back end systems. I bought a raspberry pi, and set up a simple LAMP server, which works great(ish). I can run…
Angus
  • 78
  • 8
1
vote
1 answer

Add value with previous date to actual date in query result

DB-Fiddle: CREATE TABLE logistics ( id int auto_increment primary key, flow_date DATE, flow_type VARCHAR(255), flow_quantity INT ); INSERT INTO logistics (flow_date, flow_type, flow_quantity ) VALUES ("2020-04-18", "inbound",…
Michi
  • 4,663
  • 6
  • 33
  • 83
1
vote
1 answer

Knex.js Error parseLengthCodedNumber: JS precision range exceeded, number is >= 53 bit: "18446744073709551615"

I am trying to insert a few rows to a table from an express.js controller, using knex.js: yield knex.withSchema(MySchema).insert(something).into('MyTable'); but I get this error: Error: parseLengthCodedNumber: JS precision range exceeded, number is…
1
vote
2 answers

Update nested Json in Mysql/Mariadb

{ "people": { "Man": { "Employee": "50", "Student": "91", "Artist": "80", "Clark": "50" }, "Woman": { "Employee": "21", "Student": "01", "Artist": "00", "k3": "30", "Clark": "68" …
1
vote
1 answer

Get full tree of parent/child relationships in mysql of any node in the tree with all parents

Example data: +----+-------+----------+ | org_id | Name | ParentID | +----+-------+----------+ | 1 | Org1 | 2 | | 2 | Org2 | NULL | | 3 | Org3 | 5 | | 5 | Org5 | 1 | | 14 | Org14 | 1 …
Dennis
  • 3,044
  • 2
  • 33
  • 52
1
vote
1 answer

Why its mysqld error occurs during Mariabackup

The error message is shown below. Using server version 10.4.8-MariaDB-log mariabackup based on MariaDB server 10.4.11-MariaDB Linux (x86_64) [00] 2020-01-11 11:05:41 uses posix_fadvise(). [00] 2020-01-11 11:05:41 cd to /home/data/mysql/ [00]…
1
vote
1 answer

MariaDB Procedure with ROW TYPE OF variable based on cursor

delimiter $$ CREATE PROCEDURE `proc_test`() BEGIN DECLARE rec ROW TYPE OF c_data; DECLARE c_data CURSOR FOR SELECT * FROM agents; END$$ This procedure when called gives below error Error Code: 1146. Table 'db_nvocc_local.c_data'…
1
vote
2 answers

How to confirm data at rest encrypted by MariaDB?

I am using MariaDB's Data at rest encryption. When firing the select query I can see the data as decrypted. After studying further this is the correct behavior. But how do I even ensure that the data is even protected? How do I prove it to other…
1
vote
1 answer

MySQL select orderby date returns duplicate values

I want to get every user and the last payment they do. I got 2 tables here the users and finances. I tried to add groupby and I got the result I want but, it gets the oldest record in the other table. Does anyone know how could I achieve this? My…
draw134
  • 1,053
  • 4
  • 35
  • 84
1
vote
1 answer

JSON_ARRAY not sending an empty list on MariaDB

I have a problem in MariaDB (10.3.18) when I use JSON_ARRAY function, if my subqueries doesn't have any results it doesn't give me an empty array, it gives me a array with 1 null results. Exemple: SELECT JSON_ARRAY() // -> [] this is what I want to…
Simon Trichereau
  • 721
  • 11
  • 19
1
vote
1 answer

MariaDB/Mysql SELECT on CASE Statement inside CAST causes an error

I'm working with a frustrating set of data that contains null, 0, 1, and 2 values for the 'active' column in my users table. Why does this work: SELECT u.id AS LegacyContactKey, u.first_name …
Chris Stage
  • 187
  • 12
1
vote
1 answer

Return the record with the date closest to but greater than now NOW() in table b, for each record in table a

Server Version: 10.3.15-MariaDB-log I have a data structure like this TABLE A - Participant participantID -------------- 1 2 3 4 TABLE B - Appointment appointmentID | participantID | locationID |…
Xenology
  • 2,357
  • 2
  • 21
  • 39