Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/MariaDB/mysql-test/main/   (MariaDB Server Version 8.1-8.4©)  Datei vom 1.9.2026 mit Größe 6 kB image not shown  

Quelle  vector2_notembedded.result   Sprache: Lisp

 

#
# mysqldump
#
create table t1 (id int auto_increment primary key, v vector(5) not null);
insert t1 (v) values (Vec_Fromtext('[0.418,0.809,0.823,0.598,0.033]')),
(Vec_Fromtext('[0.186,0.696,0.035,0.668,0.847]')),
(Vec_Fromtext('[0.415,0.609,0.426,0.988,0.475]'));
select id from t1 order by vec_distance_euclidean(v, Vec_FromText('[1,0,0,0,0]')) limit 3;
id
1
3
2
/*M!999999\- enable the sandbox mode */ 
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `t1` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `v` vector(5) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
SET @OLD_AUTOCOMMIT=@@AUTOCOMMIT, @@AUTOCOMMIT=0;
INSERT INTO `t1` VALUES
(1,0x1904D63EA01A4F3F21B0523F8716193F022B073D),
(2,0xC9763E3E0E2D323F295C0F3D0C022B3FFED4583F),
(3,0xE17AD43E6DE71B3FAC1CDA3E91ED7C3F3333F33E);
COMMIT;
SET AUTOCOMMIT=@OLD_AUTOCOMMIT;
<?xml version="1.0"?>
<mysqldump xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<database name="test">
 <table_structure name="t1">
  <field Field="id" Type="int(11)" Null="NO" Key="PRI" Extra="auto_increment" Comment="" />
  <field Field="v" Type="vector(5)" Null="NO" Key="" Extra="" Comment="" />
  <key Table="t1" Non_unique="0" Key_name="PRIMARY" Seq_in_index="1" Column_name="id" Collation="A" Cardinality="3" Null="" Index_type="BTREE" Comment="" Index_comment="" Ignored="NO" />
  <options Name="t1" Engine="MyISAM" Version="10" Row_format="Dynamic" Rows="3" Avg_row_length="32" Data_length="96" Max_data_length="281474976710655" Index_length="2048" Data_free="0" Auto_increment="4" Create_time="YYYY-MM-DD hh:mm:ss" Update_time="YYYY-MM-DD hh:mm:ss" Collation="utf8mb4_uca1400_ai_ci" Create_options="" Comment="" Max_index_length="288230376151710720" Temporary="N" />
 </table_structure>
 <table_data name="t1">
 <row>
  <field name="id">1</field>
  <field name="v" xsi:type="xs:hexBinary">1904D63EA01A4F3F21B0523F8716193F022B073D</field>
 </row>
 <row>
  <field name="id">2</field>
  <field name="v" xsi:type="xs:hexBinary">C9763E3E0E2D323F295C0F3D0C022B3FFED4583F</field>
 </row>
 <row>
  <field name="id">3</field>
  <field name="v" xsi:type="xs:hexBinary">E17AD43E6DE71B3FAC1CDA3E91ED7C3F3333F33E</field>
 </row>
 </table_data>
</database>
</mysqldump>
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `v` vector(5) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
select id, Vec_ToText(v) from t1;
id Vec_ToText(v)
1 [0.418,0.809,0.823,0.598,0.033]
2 [0.186,0.696,0.035,0.668,0.847]
3 [0.415,0.609,0.426,0.988,0.475]
select id from t1 order by vec_distance_euclidean(v, Vec_FromText('[1,0,0,0,0]')) limit 3;
id
1
3
2
drop table t1;
#
# MDEV-35044 ALTER on a table with vector index attempts to bypass unsupported locking limitation, server crashes in THD::free_tmp_table_share
#
create table t (a int primary key, v vector(10) not null, vector index(v));
alter table t modify a int auto_increment, lock=none;
ERROR 0A000: LOCK=NONE is not supported. Reason: CHANGE COLUMN ... AUTO_INCREMENT. Try LOCK=SHARED
drop table t;
#
# MDEV-35061 XA PREPARE "not supported by the engine" from storage engine mhnsw, memory leak
#
create table t1 (v vector(1) not null, vector(v)) engine=innodb;
insert into t1 select 0x00000000 as v from seq_1_to_1000;
connect con1,localhost,root;
alter table t1 add column x int, algorithm=copy;;
connection default;
xa start 'x';
select * from non_existing_table;
ERROR 42S02: Table 'test.non_existing_table' doesn't exist
delete from t1;
xa end 'x';
xa prepare 'x';
ERROR HY000: Got error 138 "Unsupported extension used for table" from storage engine mhnsw
connection con1;
disconnect con1;
connection default;
drop table t1;
#
# MDEV-35223 REPAIR does not fix MyISAM table with vector key after crash recovery
#
call mtr.add_suppression('t#i#00'' is marked as crashed and should be repaired');
create table t (v vector(1) not null, vector(v)) engine=myisam;
insert into t (v) values (0x30303030),(0x31313131);
# restart
check table t extended;
Table Op Msg_type Msg_text
test.t check warning 1 client is using or hasn't closed the table properly
test.t check Error Table './test/t#i#00' is marked as crashed and should be repaired
test.t check status Operation failed
repair table t extended;
Table Op Msg_type Msg_text
test.t repair note Table does not support optimize, doing recreate + analyze instead
test.t repair status OK
check table t extended;
Table Op Msg_type Msg_text
test.t check status OK
select v from t order by vec_distance_euclidean(0x32323232,v) limit 1;
v
1111
drop table t;
#
# MDEV-40793 User has access to vector info in VECTOR_INDEXES without access to column
#
create database db;
create table db.t(a int, u int, v vector(1) not null, unique(u), vector(v));
create user u@localhost;
grant select(a) on db.t to u@localhost;
connect u,localhost,u;
select a from db.t;
a
select u from db.t;
ERROR 42000: SELECT command denied to user 'u'@'localhost' for column 'u' in table 't'
select v from db.t;
ERROR 42000: SELECT command denied to user 'u'@'localhost' for column 'v' in table 't'
select table_name, index_name from information_schema.statistics where table_schema = 'db';
table_name index_name
select table_name, constraint_name from information_schema.table_constraints where table_schema = 'db';
table_name constraint_name
select table_name, index_name from information_schema.vector_indexes where table_schema = 'db';
table_name index_name
connection default;
grant update(a) on db.t to u@localhost;
connection u;
select table_name, index_name from information_schema.statistics where table_schema = 'db';
table_name index_name
select table_name, constraint_name from information_schema.table_constraints where table_schema = 'db';
table_name constraint_name
t u
select table_name, index_name from information_schema.vector_indexes where table_schema = 'db';
table_name index_name
connection default;
grant select(v) on db.t to u@localhost;
connection u;
select table_name, index_name from information_schema.vector_indexes where table_schema = 'db';
table_name index_name
t v
disconnect u;
connection default;
drop database db;
drop user u@localhost;
# End of 13.1 tests

Messung V0.5 in Prozent
C=60 H=100 G=82

¤ Dauer der Verarbeitung: 0.14 Sekunden  (vorverarbeitet am  2026-10-08) ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.