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
4 answers

Pass SELECT MAX(`Id`) FROM Table to setval()

I want to pass (SELECT MAX(Id) FROM Table to mariadb's setval() function I tried with: SELECT setval(`MySequence`, (SELECT MAX(`Id`) FROM `Table`)); but it doesn't work, I also tried: SET @max_value = (SELECT MAX(`Id`) FROM `Table`); SELECT…
Pablo Recalde
  • 3,334
  • 1
  • 22
  • 47
0
votes
1 answer

MariaDB loop for items in a list

I want to loop through a pre-generated list of values and for each item i want to insert some data into a table. DELIMITER // START TRANSACTION; FOR myitem IN (1, 5, 6, 14, 73, 811) DO INSERT INTO `TestTable` (`userid`, `info`) VALUES (myitem,…
Scott Paterson
  • 392
  • 2
  • 17
0
votes
0 answers

MariaDB 10.3.32 mysqldump not escaping single quotes in string

I have a bash script that runs mysqldump on my backup NAS (where I have MariaDB 10.3.32) to make a backup of my MariaDB 11 on my primary NAS. From reading many articles, mysqldump should escape single quotes in a string by default, but it does not…
Joost
  • 82
  • 1
  • 9
0
votes
1 answer

change / rename column if exists mariadb

I couldn't remane my column if it existed, this is what i tried (i'm adding the different lines tested in same ALTER my_table to summarize) : ALTER TABLE my_table RENAME IF EXISTS column_name TO column_name_new; RENAME IF EXISTS column_name…
Brice B
  • 103
  • 1
  • 1
  • 8
0
votes
0 answers

FULLTEXT search ORDER BY

I have tabl_1 records follow: Balvenie 12 Balvenie 13 Balvenie 14 Balvenie 15 Balvenie 16 **Balvenie 17** Balvenie 18 Balvenie 19 Balvenie 20 Balvenie 21 Balvenie 22 How do I state the search query? with type FULLTEXT: SELECT * FROM table_1 WHERE…
Bang Andre
  • 471
  • 7
  • 11
0
votes
2 answers

Creating sub query to count how many rows follow current row by date

I have a table of events and a table of event dates. For each row returned from the database, I would like to show the total number of dates for that event and to show the total number of dates remaining after that event. For example, if 'Event 1'…
TheCarver
  • 19,391
  • 25
  • 99
  • 149
0
votes
0 answers

Store Unique counter in column based on other column

I have table with primary auto increment and i want another column to set unique counter considering other column as primary. Here is table structure i have, primary_id order_id 567 200 568 200 569 200 570 201 And i want to add new…
Himanshu Bhardiya
  • 1,047
  • 14
  • 37
0
votes
0 answers

Perimeter search with a maximum of 1 item of a specific group

I have a table of shops with some chains among them. When I do a proximity search, I want only the closest shop of each chain to be included in the result. However, I want all shops from the non-chains to be found. My idea is to assign a group to…
EnumaElis
  • 1
  • 2
0
votes
0 answers

Unkown Error MariaDB Python Connector Exception

The following piece of code throws an "Unkown error" exception when inserting into the database. The MariaDB error logs do not show anything. My versions are: Python 3.10, MariaDb 10.3. import sys import mariadb def execute(sql, args=[],…
0
votes
0 answers

SQL How to get last ID from each GROUP in JOINED table

How to get the last row (last itemStoreUnitID) from table of each grouped items? SELECT * FROM itemStoreUnits isu LEFT JOIN storeUnits su ON isu.itemStoreUnitStoreUnitID=su.storeUnitID LEFT JOIN items i ON isu.itemStoreUnitItemID=i.itemID LEFT…
Rudi
  • 77
  • 1
  • 10
0
votes
0 answers

MariaDb system tables corrupted during a new installation

I am installing MariaD 10.3.9. It is a new installation on Windows Server 2016. There are no errors during installations or even in any java application which is using MariaDb database. But I observed an error in Windows event viewer and the error…
Vandana
  • 1
  • 1
0
votes
0 answers

Could not create database for connection named default An exception occurred in the driver: SQLSTATE[HY000] [1045] Access denied 'root'@'localhost'

When i try to create database for this educational project I get this error: Could not create database for connection named default An exception occurred in the driver: SQLSTATE[HY000] [1045] Access denied 'root'@'localhost' What i did (followed…
Alexey Nikonov
  • 4,958
  • 5
  • 39
  • 66
0
votes
0 answers

query duplicates from multiple matching JSON fields in a row

JSON format is new to me and I am trying to understand how I can apply searches within those JSON strings. In this situation I have a player table where two critical columns exists. The first column is a standard text Names. The next is a JSON…
Rigz Gx
  • 29
  • 3
0
votes
0 answers

How can I use Python 3.10 to connect to a MariaDB database on a NAS from a Linux machine?

Good day, I have a Synology NAS DS120J hosting a MariaDB 10 (10.3.32-1040) database, on the same local network, I have a Linux machine running Ubuntu 22.04. I am trying to connect the Linux machine to the MariaDB database using Python 3.10 and the…
0
votes
0 answers

I want to know the jobcount between 6 AM to 6 AM of the next day of a selected day MARIA DB(Heidi sql 11.3)

have got a task to take the jobcount between 6 am to next 6 am of the day. for example if i need yesterdays jobcount it should be calculated from yesterday's 6 am to today's 6 am. SELECT DATE(`panel_end` - interval (6*60) MINUTE) AS dt, COUNT(*) AS…