-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DBD::MariaDB 1.23 not updating cardinality in MariaDB 10.6.5 #204
Comments
Could you provide more details? Code sample demonstrating the problem would be the best. |
sorry for late reply. Sample Perl script you can try: Please change the username,password and port as needed. basically create any table and insert data then check cardinality.#!/usr/bin/env perl use warnings; #change and with db credentials my $mariadb_socket = "<mysql.sock>"; my ($cardhash, $sth, $stmt ,$dbh, $sql); #create db #create table with no. of messages #getcardinality before inserting messages #insert number of messages #getcardinality after inserting messages #drop the db #get cardinality of specified table
} #insert messages #create table
} #drop the db if it exists #create the database #connect database |
I'm not sure it's Perl related. I tried the following bash script: #! /bin/bash
{
cat <<EOF
USE test;
CREATE TABLE messages (id INT AUTO_INCREMENT PRIMARY KEY, message_text TEXT);
SHOW INDEXES FROM messages;
EOF
for i in {1..100} ; do
echo "INSERT INTO messages (message_text) VALUES ('message $i');"
done
cat <<EOF
SHOW INDEXES FROM messages;
DROP TABLE messages;
EOF
} | mariadb The output shows
i.e. the cardinality is 4, which is the same as what your Perl script shows me. |
It was observed that DBD::MariaDB 1.23 seems not updating cardinality in MariadB 10.6.5. Once we replace 1.23 binaries with 1.21, everything seems started working.
The text was updated successfully, but these errors were encountered: